Done !
| Server IP : 54.36.91.62 / Your IP : 216.73.216.38 Web Server : Apache System : Linux webm008.cluster127.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : awaywithxm ( 25098) PHP Version : 7.0.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/awaywithxm/www/wp-content/plugins/gutenberg/lib/ |
Upload File : |
<?php
/**
* Bootstraping the Gutenberg Navigation page.
*
* @package gutenberg
*/
/**
* The main entry point for the Gutenberg Navigation page.
*
* @since 7.8.0
*/
function gutenberg_navigation_page() {
?>
<div
id="navigation-editor"
class="edit-navigation"
>
</div>
<?php
}
/**
* Initialize the Gutenberg Navigation page.
*
* @since 7.8.0
*
* @param string $hook Page.
*/
function gutenberg_navigation_init( $hook ) {
if ( 'gutenberg_page_gutenberg-navigation' !== $hook ) {
return;
}
// Media settings.
$max_upload_size = wp_max_upload_size();
if ( ! $max_upload_size ) {
$max_upload_size = 0;
}
/** This filter is documented in wp-admin/includes/media.php */
$image_size_names = apply_filters(
'image_size_names_choose',
array(
'thumbnail' => __( 'Thumbnail', 'gutenberg' ),
'medium' => __( 'Medium', 'gutenberg' ),
'large' => __( 'Large', 'gutenberg' ),
'full' => __( 'Full Size', 'gutenberg' ),
)
);
$available_image_sizes = array();
foreach ( $image_size_names as $image_size_slug => $image_size_name ) {
$available_image_sizes[] = array(
'slug' => $image_size_slug,
'name' => $image_size_name,
);
}
$settings = array(
'imageSizes' => $available_image_sizes,
'isRTL' => is_rtl(),
'maxUploadFileSize' => $max_upload_size,
'blockNavMenus' => get_theme_support( 'block-nav-menus' ),
);
list( $font_sizes, ) = (array) get_theme_support( 'editor-font-sizes' );
if ( false !== $font_sizes ) {
$settings['fontSizes'] = $font_sizes;
}
$settings = gutenberg_experimental_global_styles_settings( $settings );
wp_add_inline_script(
'wp-edit-navigation',
sprintf(
'wp.domReady( function() {
wp.editNavigation.initialize( "navigation-editor", %s );
} );',
wp_json_encode( gutenberg_experiments_editor_settings( $settings ) )
)
);
// Preload server-registered block schemas.
wp_add_inline_script(
'wp-blocks',
'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings() ) . ');'
);
wp_enqueue_script( 'wp-edit-navigation' );
wp_enqueue_style( 'wp-edit-navigation' );
wp_enqueue_style( 'wp-block-library' );
wp_enqueue_script( 'wp-format-library' );
wp_enqueue_style( 'wp-format-library' );
}
add_action( 'admin_enqueue_scripts', 'gutenberg_navigation_init' );