Making WordPress.org


Ignore:
Timestamp:
07/04/2024 04:01:44 PM (2 years ago)
Author:
renyot
Message:

Learn: Sync with git WordPress/learn@909b85c

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  
    55 */
    66function enqueue_assets() {
     7        if ( ! is_singular( 'course' ) ) {
     8                return;
     9        }
     10
    711        $script_asset_path = get_stylesheet_directory() . '/build/course-outline/index.asset.php';
    812        if ( ! file_exists( $script_asset_path ) ) {
    … …  
    1923        );
    2024
    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        );
    2931}
    3032add_action( 'wp_enqueue_scripts', 'enqueue_assets' );
Note: See TracChangeset for help on using the changeset viewer.