[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-admin/ -> font-library.php (source)

   1  <?php
   2  /**
   3   * Font Library administration screen.
   4   *
   5   * @package WordPress
   6   * @subpackage Administration
   7   * @since 7.0.0
   8   */
   9  
  10  /** WordPress Administration Bootstrap */
  11  require_once  __DIR__ . '/admin.php';
  12  
  13  if ( ! current_user_can( 'edit_theme_options' ) ) {
  14      wp_die(
  15          '<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
  16          '<p>' . __( 'Sorry, you are not allowed to manage fonts on this site.' ) . '</p>',
  17          403
  18      );
  19  }
  20  
  21  // Check if Gutenberg build files are available
  22  if ( ! function_exists( 'wp_font_library_wp_admin_render_page' ) ) {
  23      wp_die(
  24          '<h1>' . __( 'Font Library is not available.' ) . '</h1>' .
  25          '<p>' . __( 'The Font Library requires Gutenberg build files. Please run <code>npm install</code> to build the necessary files.' ) . '</p>',
  26          503
  27      );
  28  }
  29  
  30  // Set the page title
  31  $title = _x( 'Fonts', 'Font Library admin page title' );
  32  
  33  require_once  ABSPATH . 'wp-admin/admin-header.php';
  34  
  35  // Render the Font Library page
  36  wp_font_library_wp_admin_render_page();
  37  
  38  require_once  ABSPATH . 'wp-admin/admin-footer.php';


Generated : Tue Feb 10 08:20:09 2026 Cross-referenced by PHPXref