WordPress.org

Make WordPress Core

Ticket #15301: 15301.1.diff

File 15301.1.diff, 1004 bytes (added by caesarsgrunt, 8 years ago)

filter the admin title before printing it

  • wp-admin/admin-header.php

     
    1111        require_once( './admin.php' );
    1212
    1313get_admin_page_title();
     14$page_title = sprintf('%1$s ‹ %2$s — WordPress', esc_html(strip_tags($title)), get_bloginfo('name'));
     15$page_title = apply_filters('admin_title', $page_title, esc_html(strip_tags($title)));
    1416
    15 $title = esc_html( strip_tags( $title ) );
    16 
    1717wp_user_settings();
    1818wp_menu_unfold();
    1919
     
    3030<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
    3131<head>
    3232<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
    33 <title><?php echo $title; ?> &lsaquo; <?php bloginfo('name') ?>  &#8212; WordPress</title>
     33<title><?php echo $page_title; ?></title>
    3434<?php
    3535
    3636wp_admin_css( 'global' );