wp-admin/admin-header.php
Lines:
1 to 100 of 334
<?php /** * WordPress Administration Template Header * * @package WordPress * @subpackage Administration */ header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) ); if ( ! defined( 'WP_ADMIN' ) ) { require_once __DIR__ . '/admin.php'; } /** * In case admin-header.php is included in a function. * * @global string $title * @global string $hook_suffix * @global WP_Screen $current_screen WordPress current screen object. * @global WP_Locale $wp_locale WordPress date and time locale object. * @global string $pagenow The filename of the current screen. * @global string $update_title * @global int $total_update_count * @global string $parent_file * @global string $typenow The post type of the current screen. */ global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, $update_title, $total_update_count, $parent_file, $typenow; // Catch plugins that include admin-header.php before admin.php completes. if ( empty( $current_screen ) ) { set_current_screen(); } get_admin_page_title(); $title = strip_tags( $title ); if ( is_network_admin() ) { /* translators: Network admin screen title. %s: Network title. */ $admin_title = sprintf( __( 'Network Admin: %s' ), get_network()->site_name ); } elseif ( is_user_admin() ) { /* translators: User dashboard screen title. %s: Network title. */ $admin_title = sprintf( __( 'User Dashboard: %s' ), get_network()->site_name ); } else { $admin_title = get_bloginfo( 'name' ); } if ( $admin_title === $title ) { /* translators: Admin screen title. %s: Admin screen name. */ $admin_title = sprintf( __( '%s — WordPress' ), $title ); } else { $screen_title = $title; if ( 'post' === $current_screen->base && 'add' !== $current_screen->action ) { $post_title = get_the_title(); if ( ! empty( $post_title ) ) { $post_type_obj = get_post_type_object( $typenow ); $screen_title = sprintf( /* translators: Editor admin screen title. 1: "Edit item" text for the post type, 2: Post title. */ __( '%1$s “%2$s”' ), $post_type_obj->labels->edit_item, $post_title ); } } /* translators: Admin screen title. 1: Admin screen name, 2: Network or site name. */ $admin_title = sprintf( __( '%1$s ‹ %2$s — WordPress' ), $screen_title, $admin_title ); } if ( wp_is_recovery_mode() ) { /* translators: %s: Admin screen title. */ $admin_title = sprintf( __( 'Recovery Mode — %s' ), $admin_title ); } /** * Filters the title tag content for an admin page. * * @since 3.1.0 * * @param string $admin_title The page title, with extra context added. * @param string $title The original page title. */ $admin_title = apply_filters( 'admin_title', $admin_title, $title ); wp_user_settings(); _wp_admin_html_begin(); ?> <title><?php echo esc_html( $admin_title ); ?></title> <?php wp_enqueue_style( 'colors' ); wp_enqueue_script( 'utils' ); wp_enqueue_script( 'svg-painter' ); $admin_body_class = preg_replace( '/[^a-z0-9_-]+/i', '-', $hook_suffix );
Called by
Invoked by
Calls
Call hooks
1 to 14 of 14
- admin_body_class – filter
- admin_enqueue_scripts – action
- admin_head – action
- admin_head-$hook_suffix – action
- admin_notices – action
- admin_print_scripts – action
- admin_print_scripts-$hook_suffix – action
- admin_print_styles – action
- admin_print_styles-$hook_suffix – action
- admin_title – filter
- all_admin_notices – action
- in_admin_header – action
- network_admin_notices – action
- user_admin_notices – action