Changeset 54930
- Timestamp:
- 12/04/2022 12:44:21 PM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.wp-scripts.php
r54470 r54930 35 35 * @since 5.5.0 Added the `$handle` parameter. 36 36 * 37 * @param string $function Function name.38 * @param string $handle Optional. Name of the script or stylesheet that was39 * registered or enqueued too early. Default empty.40 */ 41 function _wp_scripts_maybe_doing_it_wrong( $function , $handle = '' ) {37 * @param string $function_name Function name. 38 * @param string $handle Optional. Name of the script or stylesheet that was 39 * registered or enqueued too early. Default empty. 40 */ 41 function _wp_scripts_maybe_doing_it_wrong( $function_name, $handle = '' ) { 42 42 if ( did_action( 'init' ) || did_action( 'wp_enqueue_scripts' ) 43 43 || did_action( 'admin_enqueue_scripts' ) || did_action( 'login_enqueue_scripts' ) … … 63 63 64 64 _doing_it_wrong( 65 $function ,65 $function_name, 66 66 $message, 67 67 '3.3.0' … … 390 390 * 391 391 * @param string $handle Name of the script. 392 * @param string $ listOptional. Status of the script to check. Default 'enqueued'.392 * @param string $status Optional. Status of the script to check. Default 'enqueued'. 393 393 * Accepts 'enqueued', 'registered', 'queue', 'to_do', and 'done'. 394 394 * @return bool Whether the script is queued. 395 395 */ 396 function wp_script_is( $handle, $ list= 'enqueued' ) {397 _wp_scripts_maybe_doing_it_wrong( __FUNCTION__, $handle ); 398 399 return (bool) wp_scripts()->query( $handle, $ list);396 function wp_script_is( $handle, $status = 'enqueued' ) { 397 _wp_scripts_maybe_doing_it_wrong( __FUNCTION__, $handle ); 398 399 return (bool) wp_scripts()->query( $handle, $status ); 400 400 } 401 401
Note: See TracChangeset
for help on using the changeset viewer.