Ticket #31126: add-return-to-wp_register_script.diff
File add-return-to-wp_register_script.diff, 1.0 KB (added by , 10 years ago) |
---|
-
wp-includes/functions.wp-scripts.php
106 106 * If set to null, no version is added. Default 'false'. Accepts 'false', 'null', or 'string'. 107 107 * @param bool $in_footer Optional. Whether to enqueue the script before </head> or before </body>. 108 108 * Default 'false'. Accepts 'false' or 'true'. 109 * @return bool Whether the script has been registered. True on success, false on failure. 109 110 */ 110 111 function wp_register_script( $handle, $src, $deps = array(), $ver = false, $in_footer = false ) { 111 112 $wp_scripts = wp_scripts(); 112 113 _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ ); 113 114 114 $ wp_scripts->add( $handle, $src, $deps, $ver );115 $return = $wp_scripts->add( $handle, $src, $deps, $ver ); 115 116 if ( $in_footer ) { 116 117 $wp_scripts->add_data( $handle, 'group', 1 ); 117 118 } 119 120 return $return; 118 121 } 119 122 120 123 /**