Skip to content

Commit

Permalink
update what new page
Browse files Browse the repository at this point in the history
  • Loading branch information
harunollyo committed Sep 21, 2023
1 parent 8755360 commit 1fc5c8e
Showing 1 changed file with 6 additions and 72 deletions.
78 changes: 6 additions & 72 deletions views/pages/whats-new.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,73 +8,7 @@
* @since 2.2.4
*/

$changelogs = array(
'new' => array(
array(
'title' => 'Option to secure course content against hotlinking',
'is_pro' => true,
),
array(
'title' => 'Option to disable right-click to prevent content copying',
'is_pro' => true,
),
array(
'title' => 'Hide recommended YouTube videos on Tutor Player',
'is_pro' => true,
),
array(
'title' => 'Course review submission popup on automatic course completion',
),
array(
'title' => 'Course permalink base is now updatable (supports any language)',
),
),
'update' => array(
array(
'title' => 'The "Mark as complete" button is visible after the start of the Zoom/Google Meet meeting',
),
array(
'title' => 'Tutor LMS settings navigation bar is now sticky',
),
),
'fix' => array(
array(
'title' => 'Email formatting issues on Gmail and Outlook web versions',
),
array(
'title' => 'Resolved incorrect time issue on the on-site notification system',
),
array(
'title' => 'Addressed various translation-related issues',
),
array(
'title' => 'Resolved known security issues',
),
array(
'title' => 'Several other known issues',
),
),
);


/**
* Whats new item.
*
* @param string $type type of item.
* @param string $log changelog item.
*
* @return void
*/
function tutor_whatnew_item( $type, $log ) {
$obj = (object) $log;
?>
<li class="tutor-fs-7"><strong><?php echo esc_html( $type ); ?>:</strong> <span><?php echo esc_html( $obj->title ); ?></span>
<?php
if ( isset( $obj->is_pro ) && $obj->is_pro ) :
?>
<span class="tutor-pro-badge">Pro</span> <?php endif; ?></li>
<?php
}
use TUTOR\WhatsNew;
?>

<div class="wrap">
Expand Down Expand Up @@ -137,11 +71,11 @@ function tutor_whatnew_item( $type, $log ) {
</div>

<h1>What's New 🥳 in Tutor LMS</h1>

<p>You are using <strong>Tutor LMS (v<?php echo esc_html( $installed_version ); ?>)</strong> <br>
Here are features and improvements made to this version!
</p>

<div class="tutor-logo-head">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 61 80" fill="none">
<path fill-rule="evenodd" clip-rule="evenodd" d="M43.9167 50.9466C43.4065 50.9537 42.8999 50.8591 42.4266 50.6685C41.9533 50.4779 41.5227 50.1949 41.16 49.8362C40.7973 49.4775 40.5097 49.0502 40.3141 48.5793C40.1184 48.1083 40.0186 47.6032 40.0204 47.0932V38.2799C40.0204 37.2579 40.4267 36.2778 41.1499 35.5552C41.8731 34.8326 42.8539 34.4266 43.8767 34.4266C44.8994 34.4266 45.8803 34.8326 46.6035 35.5552C47.3267 36.2778 47.733 37.2579 47.733 38.2799V47.0932C47.7347 47.5998 47.6362 48.1016 47.443 48.5699C47.2498 49.0382 46.9659 49.4637 46.6074 49.8219C46.249 50.1801 45.8232 50.4638 45.3545 50.6569C44.8858 50.8499 44.3836 50.9483 43.8767 50.9466" fill="#0049F8"/>
Expand All @@ -157,15 +91,15 @@ function tutor_whatnew_item( $type, $log ) {
<ul class="tutor-changelog-list">
<?php
foreach ( $changelogs['new'] as $log ) {
tutor_whatnew_item( 'New', $log );
WhatsNew::render_item( 'New', $log );
}

foreach ( $changelogs['update'] as $log ) {
tutor_whatnew_item( 'Update', $log );
WhatsNew::render_item( 'Update', $log );
}

foreach ( $changelogs['fix'] as $log ) {
tutor_whatnew_item( 'Fix', $log );
WhatsNew::render_item( 'Fix', $log );
}
?>
</ul>
Expand Down

0 comments on commit 1fc5c8e

Please sign in to comment.