Skip to content

Commit

Permalink
= 4.2.7.4 =
Browse files Browse the repository at this point in the history
~ Security: added course-id, item-id to element, for js handle.
  • Loading branch information
tungnxt89 committed Nov 28, 2024
1 parent 1d72fd1 commit b76b66c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion inc/TemplateHooks/Course/CourseMaterialTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace LearnPress\TemplateHooks\Course;

use LearnPress\Helpers\Template;
use LP_Global;
use LP_WP_Filesystem;
use LP_Settings;
use Throwable;
Expand Down Expand Up @@ -37,8 +38,15 @@ public function sections( array $data = [] ) {
],
$data
);

$item = LP_Global::course_item();
$item_id = 0;
if ( $item ) {
$item_id = $item->get_id();
}
?>
<div class="lp-material-skeleton">
<div class="lp-material-skeleton" data-course-id="<?php echo esc_attr( get_the_ID() ); ?>"
data-item-id="<?php echo esc_attr( $item_id ); ?>">
<?php do_action( 'learn-press/course-material/before' ); ?>
<?php lp_skeleton_animation_html( 5, 100 ); ?>
<table class="course-material-table" >
Expand Down

0 comments on commit b76b66c

Please sign in to comment.