Ticket #5687: 5687.diff
File 5687.diff, 1.6 KB (added by , 3 years ago) |
---|
-
functions.php
110 110 wp_enqueue_style( 'wporg-style', get_theme_file_uri( '/css/style.css' ), [ 'dashicons', 'open-sans' ], '20200403' ); 111 111 wp_style_add_data( 'wporg-style', 'rtl', 'replace' ); 112 112 113 // phpcs:ignore Squiz.PHP.CommentedOutCode.Found, Squiz.Commenting.InlineComment.InvalidEndChar114 // wp_enqueue_script( 'wporg-navigation', get_template_directory_uri() . "/js/navigation$suffix.js", array(), '20151215', true );115 113 wp_enqueue_script( 'wporg-plugins-skip-link-focus-fix', get_template_directory_uri() . "/js/skip-link-focus-fix$suffix.js", array(), '20151215', true ); 116 114 117 115 if ( ! is_front_page() && is_singular() && comments_open() && get_option( 'thread_comments' ) ) { … … 133 131 add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\scripts' ); 134 132 135 133 /** 134 * Set up any scripts and styles for use in the child themes. 135 * 136 * This is given an earlier priority to ensure the assets are registered before the child theme uses them. 137 */ 138 function register_assets() { 139 $script_debug = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG; 140 $suffix = $script_debug ? '' : '.min'; 141 142 wp_register_script( 143 'wporg-navigation', 144 get_template_directory_uri() . "/js/navigation$suffix.js", 145 array(), 146 '20210331', 147 true 148 ); 149 } 150 add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\register_assets', 5 ); 151 152 /** 136 153 * Filters an enqueued style's fully-qualified URL. 137 154 * 138 155 * @param string $src The source URL of the enqueued style.