WordPress.org

Make WordPress Core

Ticket #4331: admin-title-filter-and-upload-header.patch

File admin-title-filter-and-upload-header.patch, 3.7 KB (added by oaoao, 7 years ago)

patch

  • wp-admin/admin-header.php

     
    1616<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>> 
    1717<head> 
    1818<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> 
    19 <title><?php bloginfo('name') ?> &rsaquo; <?php echo wp_specialchars( strip_tags( $title ) ); ?> &#8212; WordPress</title> 
     19<title><?php echo apply_filters('admin_title', bloginfo('name')." &rsaquo; ".wp_specialchars( strip_tags( $title ) )." &#8212; WordPress"); ?></title> 
    2020<link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 
    2121<?php if ( ('rtl' == $wp_locale->text_direction) ) : ?> 
    2222<link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/rtl.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 
  • wp-admin/bookmarklet.php

     
    4949?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    5050<html xmlns="http://www.w3.org/1999/xhtml"> 
    5151<head> 
    52 <title><?php bloginfo('name') ?> &rsaquo; Bookmarklet &#8212; WordPress</title> 
     52<title><?php echo apply_filters('admin_title', bloginfo('name',false)." &rsaquo; Bookmarklet &#8212; WordPress"); ?></title> 
    5353<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> 
    5454<link rel="stylesheet" href="wp-admin.css" type="text/css" /> 
    5555 
  • wp-admin/upload-functions.php

     
    354354                echo "\t#upload-file { position: absolute; top: 15px; }\n"; 
    355355                echo "</style>"; 
    356356        } 
     357 
     358        do_action('admin_head-upload'); 
    357359} 
    358360 
     361 
    359362?> 
     363 No newline at end of file 
  • wp-admin/upload.php

     
    6262<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>> 
    6363<head> 
    6464<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> 
    65 <title><?php bloginfo('name') ?> &rsaquo; <?php _e('Uploads'); ?> &#8212; WordPress</title> 
     65<title><?php echo apply_filters('admin_title', bloginfo('name',false)." &rsaquo; ".__('Uploads')." &#8212; WordPress"); ?></title> 
    6666<link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 
    6767<?php if ( ('rtl' == $wp_locale->text_direction) ) : ?> 
    6868<link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/rtl.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 
  • wp-includes/general-template.php

     
    5959} 
    6060 
    6161 
    62 function bloginfo($show='') { 
     62function bloginfo($show='', $display=true) { 
    6363        $info = get_bloginfo($show); 
    6464         
    6565        // Don't filter URL's. 
     
    7272                $info = apply_filters('bloginfo_url', $info, $show); 
    7373        } 
    7474 
    75         echo $info; 
     75        if ( $display ) echo $info; 
     76        else return $info; 
    7677} 
    7778 
    7879/**