PluginProbe
Gutenberg / 23.6.2
Gutenberg v23.6.2
23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 12.6.0 7.4.0 All 402 releases
gutenberg / lib / compat / wordpress-7.0 / fonts.php

fonts.php in Gutenberg 23.6.2, at lib/compat/wordpress-7.0/fonts.php

28 lines 735 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Bootstraps the Fonts library page in wp-admin.
4 *
5 * @package gutenberg
6 */
7
8 // Priority 11 to run after Core's menu.php sets up the fonts menu.
9 add_action( 'admin_menu', 'gutenberg_register_fonts_menu_item', 11 );
10
11 /**
12 * Registers the Fonts menu item under Appearance using the font-library page.
13 * Removes Core's fonts menu item first to prevent duplication.
14 */
15 function gutenberg_register_fonts_menu_item() {
16 // Remove Core's fonts menu item if it exists.
17 remove_submenu_page( 'themes.php', 'font-library.php' );
18
19 add_submenu_page(
20 'themes.php',
21 __( 'Fonts', 'gutenberg' ),
22 __( 'Fonts', 'gutenberg' ),
23 'edit_theme_options',
24 'font-library-wp-admin',
25 'gutenberg_font_library_wp_admin_render_page'
26 );
27 }
28