wp_register_tinymce_scripts example

/** * Registers all the WordPress packages scripts. * * @since 5.0.0 * * @param WP_Scripts $scripts WP_Scripts object. */
function wp_default_packages( $scripts ) {
    wp_default_packages_vendor( $scripts );
    wp_register_development_scripts( $scripts );
    wp_register_tinymce_scripts( $scripts );
    wp_default_packages_scripts( $scripts );

    if ( did_action( 'init' ) ) {
        wp_default_packages_inline_scripts( $scripts );
    }
}

/** * Returns the suffix that can be used for the scripts. * * There are two suffix types, the normal one and the dev suffix. * * @since 5.0.0 * * @param string $type The type of suffix to retrieve. * @return string The script suffix. */
break;
            }
        }

        if ( ! $has_custom_theme ) {
            return;
        }

        $wp_scripts = wp_scripts();

        $wp_scripts->remove( 'wp-tinymce' );
        wp_register_tinymce_scripts( $wp_scripts, true );
    }

    /** * Print (output) the main TinyMCE scripts. * * @since 4.8.0 * * @global bool $concatenate_scripts */
    public static function print_tinymce_scripts() {
        global $concatenate_scripts;

        
Home | Imprint | This part of the site doesn't use cookies.