Don’t fuction “add media button” when I create a new post
I find only
function wp_localize_script( $handle, $object_name, $l10n ) {
global $wp_scripts;
if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
return false;
}
return $wp_scripts->localize( $handle, $object_name, $l10n );
}
I don’t find in wp-includes/functions.wp-scripts.php your suggestion
Excuse me , but it’s the first time I write.
I have the follow code:
function wp_localize_script( $handle, $object_name, $l10n ) {
global $wp_scripts;
if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
return false;
}
return $wp_scripts->localize( $handle, $object_name, $l10n );
}