Changeset 13878 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2024/src/course-outline/index.php
- Timestamp:
- 07/04/2024 04:01:44 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2024/src/course-outline/index.php
r13873 r13878 5 5 */ 6 6 function enqueue_assets() { 7 if ( ! is_singular( 'course' ) ) { 8 return; 9 } 10 7 11 $script_asset_path = get_stylesheet_directory() . '/build/course-outline/index.asset.php'; 8 12 if ( ! file_exists( $script_asset_path ) ) { … … 19 23 ); 20 24 21 if ( is_singular( 'course' ) ) { 22 $lesson_data = get_lesson_data(); 23 wp_localize_script( 24 'wporg-learn-2024-course-outline', 25 'wporgCourseOutlineData', 26 $lesson_data 27 ); 28 } 25 $lesson_data = get_lesson_data(); 26 wp_localize_script( 27 'wporg-learn-2024-course-outline', 28 'wporgCourseOutlineData', 29 $lesson_data 30 ); 29 31 } 30 32 add_action( 'wp_enqueue_scripts', 'enqueue_assets' );
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)