Changeset 15007 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/views/block-course-status.php
- Timestamp:
- 07/27/2026 01:50:57 AM (6 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/views/block-course-status.php
r13775 r15007 16 16 */ 17 17 function render( $attributes, $content, $block ) { 18 $post_type = $block->context['postType']; 18 $post_type = $block->context['postType'] ?? ''; 19 $course_id = $block->context['postId'] ?? 0; 19 20 20 if ( 'course' !== $post_type || ! class_exists( 'Sensei_Main' ) ) {21 if ( ! $course_id || 'course' !== $post_type || ! class_exists( 'Sensei_Main' ) ) { 21 22 return ''; 22 23 } 23 24 24 $course_id = $block->context['postId'];25 25 $user_id = get_current_user_id(); 26 26 $is_completed = Sensei_Utils::user_completed_course( $course_id, $user_id );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)