# gutenberg/23.4.0/lib/experimental/guidelines/load.php

Gutenberg, version 23.4.0. 44 lines.

- Page: https://pluginprobe.com/plugins/gutenberg/23.4.0/code/lib/experimental/guidelines/load.php
- Raw: https://pluginprobe.com/plugins/gutenberg/23.4.0/raw/lib/experimental/guidelines/load.php
- Modified: 2026-04-22T13:01:50+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/gutenberg/23.4.0/code/lib/experimental/guidelines/load.php#L10-L20`.

```php
<?php
/**
 * Bootstraps the Guidelines page in wp-admin under Settings.
 *
 * @package gutenberg
 */

add_action( 'admin_menu', 'gutenberg_register_guidelines_settings_submenu', 10 );
add_action( 'admin_enqueue_scripts', 'gutenberg_guidelines_enqueue_block_registry_scripts', 5 );

/**
 * Registers the Guidelines submenu item under Settings.
 * Uses the same layout/style as the Font Library admin page (wp-admin integrated).
 */
function gutenberg_register_guidelines_settings_submenu() {
	add_submenu_page(
		'options-general.php',
		__( 'Guidelines', 'gutenberg' ),
		__( 'Guidelines', 'gutenberg' ),
		'manage_options',
		'guidelines-wp-admin',
		'gutenberg_guidelines_wp_admin_render_page'
	);
}

/**
 * Enqueues wp-block-library on the Guidelines admin page so
 * registerCoreBlocks() is available when the app bootstraps the block
 * registry (Core blocks only) on the client.
 *
 * Priority 5 ensures this runs before the main asset enqueue (priority 10).
 */
function gutenberg_guidelines_enqueue_block_registry_scripts( $hook_suffix ) {
	if ( ! current_user_can( 'manage_options' ) ) {
		return;
	}

	if ( 'settings_page_guidelines-wp-admin' !== $hook_suffix ) {
		return;
	}

	wp_enqueue_script( 'wp-block-library' );
}

```
