Make WordPress Core

Changeset 26518


Ignore:
Timestamp:
12/02/2013 03:52:23 AM (11 years ago)
Author:
azaozz
Message:

Remove all screen_icon() calls and deprecate the functions, props TobiasBg, fixes #26119

Location:
trunk/src/wp-admin
Files:
55 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/comment.php

    r25880 r26518  
    116116<div class="narrow">
    117117
    118 <?php screen_icon(); ?>
    119118<h2><?php echo esc_html( $title ); ?></h2>
    120119
  • trunk/src/wp-admin/custom-background.php

    r26352 r26518  
    180180?>
    181181<div class="wrap" id="custom-background">
    182 <?php screen_icon(); ?>
    183182<h2><?php _e('Custom Background'); ?></h2>
    184183<?php if ( !empty($this->updated) ) { ?>
  • trunk/src/wp-admin/custom-header.php

    r25868 r26518  
    451451
    452452<div class="wrap">
    453 <?php screen_icon(); ?>
    454453<h2><?php _e('Custom Header'); ?></h2>
    455454
     
    725724
    726725<div class="wrap">
    727 <?php screen_icon(); ?>
    728726<h2><?php _e( 'Crop Header Image' ); ?></h2>
    729727
  • trunk/src/wp-admin/edit-comments.php

    r25616 r26518  
    141141
    142142<div class="wrap">
    143 <?php screen_icon(); ?>
    144143<h2><?php
    145144if ( $post_id )
  • trunk/src/wp-admin/edit-form-advanced.php

    r25991 r26518  
    360360
    361361<div class="wrap">
    362 <?php screen_icon(); ?>
    363362<h2><?php
    364363echo esc_html( $title );
  • trunk/src/wp-admin/edit-form-comment.php

    r25983 r26518  
    1414<?php wp_nonce_field('update-comment_' . $comment->comment_ID) ?>
    1515<div class="wrap">
    16 <?php screen_icon(); ?>
    1716<h2><?php _e('Edit Comment'); ?></h2>
    1817
  • trunk/src/wp-admin/edit-link-form.php

    r26081 r26518  
    7171
    7272<div class="wrap">
    73 <?php screen_icon(); ?>
    7473<h2><?php echo esc_html( $title ); ?>  <a href="link-add.php" class="add-new-h2"><?php echo esc_html_x('Add New', 'link'); ?></a></h2>
    7574
  • trunk/src/wp-admin/edit-tag-form.php

    r26339 r26518  
    2828
    2929<div class="wrap">
    30 <?php screen_icon(); ?>
    3130<h2><?php echo $tax->labels->edit_item; ?></h2>
    3231<div id="ajax-response"></div>
  • trunk/src/wp-admin/edit-tags.php

    r26339 r26518  
    302302
    303303<div class="wrap nosubsub">
    304 <?php screen_icon(); ?>
    305304<h2><?php echo esc_html( $title );
    306305if ( !empty($_REQUEST['s']) )
  • trunk/src/wp-admin/edit.php

    r25616 r26518  
    266266?>
    267267<div class="wrap">
    268 <?php screen_icon(); ?>
    269268<h2><?php
    270269echo esc_html( $post_type_object->labels->name );
  • trunk/src/wp-admin/export.php

    r25616 r26518  
    145145
    146146<div class="wrap">
    147 <?php screen_icon(); ?>
    148147<h2><?php echo esc_html( $title ); ?></h2>
    149148
  • trunk/src/wp-admin/import.php

    r25616 r26518  
    5353
    5454<div class="wrap">
    55 <?php screen_icon(); ?>
    5655<h2><?php echo esc_html( $title ); ?></h2>
    5756<?php if ( ! empty( $_GET['invalid'] ) ) : ?>
  • trunk/src/wp-admin/includes/class-wp-upgrader-skins.php

    r26015 r26518  
    5252        $this->done_header = true;
    5353        echo '<div class="wrap">';
    54         screen_icon();
    5554        echo '<h2>' . $this->options['title'] . '</h2>';
    5655    }
  • trunk/src/wp-admin/includes/deprecated.php

    r26220 r26518  
    11351135    _deprecated_function( __FUNCTION__, '3.7' );
    11361136}
     1137
     1138/**
     1139 * Displays a screen icon.
     1140 *
     1141 * @uses get_screen_icon()
     1142 * @since 2.7.0
     1143 * @deprecated 3.8.0
     1144 *
     1145 * @param string|WP_Screen $screen Optional. Accepts a screen object (and defaults to the current screen object)
     1146 *  which it uses to determine an icon HTML ID. Or, if a string is provided, it is used to form the icon HTML ID.
     1147 */
     1148function screen_icon( $screen = '' ) {
     1149    _deprecated_function( __FUNCTION__, '3.8' );
     1150    echo get_screen_icon( $screen );
     1151}
     1152
     1153/**
     1154 * Gets a screen icon.
     1155 *
     1156 * @since 3.2.0
     1157 * @deprecated 3.8.0
     1158 *
     1159 * @global $post_ID
     1160 * @param string|WP_Screen $screen Optional. Accepts a screen object (and defaults to the current screen object)
     1161 *  which it uses to determine an icon HTML ID. Or, if a string is provided, it is used to form the icon HTML ID.
     1162 * @return string HTML for the screen icon.
     1163 */
     1164function get_screen_icon( $screen = '' ) {
     1165    _deprecated_function( __FUNCTION__, '3.8' );
     1166    if ( empty( $screen ) )
     1167        $screen = get_current_screen();
     1168    elseif ( is_string( $screen ) )
     1169        $icon_id = $screen;
     1170
     1171    $class = 'icon32';
     1172
     1173    if ( empty( $icon_id ) ) {
     1174        if ( ! empty( $screen->parent_base ) )
     1175            $icon_id = $screen->parent_base;
     1176        else
     1177            $icon_id = $screen->base;
     1178
     1179        if ( 'page' == $screen->post_type )
     1180            $icon_id = 'edit-pages';
     1181
     1182        if ( $screen->post_type )
     1183            $class .= ' ' . sanitize_html_class( 'icon32-posts-' . $screen->post_type );
     1184    }
     1185
     1186    return '<div id="icon-' . esc_attr( $icon_id ) . '" class="' . $class . '"><br /></div>';
     1187}
  • trunk/src/wp-admin/includes/screen.php

    r26456 r26518  
    123123
    124124    $current_screen->add_option( $option, $args );
    125 }
    126 
    127 /**
    128  * Displays a screen icon.
    129  *
    130  * @uses get_screen_icon()
    131  * @since 2.7.0
    132  *
    133  * @param string|WP_Screen $screen Optional. Accepts a screen object (and defaults to the current screen object)
    134  *  which it uses to determine an icon HTML ID. Or, if a string is provided, it is used to form the icon HTML ID.
    135  */
    136 function screen_icon( $screen = '' ) {
    137     echo get_screen_icon( $screen );
    138 }
    139 
    140 /**
    141  * Gets a screen icon.
    142  *
    143  * @since 3.2.0
    144  *
    145  * @global $post_ID
    146  * @param string|WP_Screen $screen Optional. Accepts a screen object (and defaults to the current screen object)
    147  *  which it uses to determine an icon HTML ID. Or, if a string is provided, it is used to form the icon HTML ID.
    148  * @return string HTML for the screen icon.
    149  */
    150 function get_screen_icon( $screen = '' ) {
    151     if ( empty( $screen ) )
    152         $screen = get_current_screen();
    153     elseif ( is_string( $screen ) )
    154         $icon_id = $screen;
    155 
    156     $class = 'icon32';
    157 
    158     if ( empty( $icon_id ) ) {
    159         if ( ! empty( $screen->parent_base ) )
    160             $icon_id = $screen->parent_base;
    161         else
    162             $icon_id = $screen->base;
    163 
    164         if ( 'page' == $screen->post_type )
    165             $icon_id = 'edit-pages';
    166 
    167         if ( $screen->post_type )
    168             $class .= ' ' . sanitize_html_class( 'icon32-posts-' . $screen->post_type );
    169     }
    170 
    171     return '<div id="icon-' . esc_attr( $icon_id ) . '" class="' . $class . '"><br /></div>';
    172125}
    173126
  • trunk/src/wp-admin/index.php

    r26183 r26518  
    9494
    9595<div class="wrap">
    96     <?php screen_icon(); ?>
    9796    <h2><?php echo esc_html( $title ); ?></h2>
    9897
  • trunk/src/wp-admin/link-manager.php

    r25616 r26518  
    7070
    7171<div class="wrap nosubsub">
    72 <?php screen_icon(); ?>
    7372<h2><?php echo esc_html( $title ); ?> <a href="link-add.php" class="add-new-h2"><?php echo esc_html_x('Add New', 'link'); ?></a> <?php
    7473if ( !empty($_REQUEST['s']) )
  • trunk/src/wp-admin/media-new.php

    r25616 r26518  
    6666?>
    6767<div class="wrap">
    68     <?php screen_icon(); ?>
    6968    <h2><?php echo esc_html( $title ); ?></h2>
    7069
  • trunk/src/wp-admin/media.php

    r25616 r26518  
    104104
    105105<div class="wrap">
    106 <?php screen_icon(); ?>
    107106<h2>
    108107<?php
  • trunk/src/wp-admin/ms-delete-site.php

    r25616 r26518  
    3333
    3434echo '<div class="wrap">';
    35 screen_icon();
    3635echo '<h2>' . esc_html( $title ) . '</h2>';
    3736
  • trunk/src/wp-admin/my-sites.php

    r26368 r26518  
    5757
    5858<div class="wrap">
    59 <?php screen_icon(); ?>
    6059<h2><?php echo esc_html( $title ); ?></h2>
    6160<?php
  • trunk/src/wp-admin/nav-menus.php

    r26024 r26518  
    534534?>
    535535<div class="wrap">
    536     <?php screen_icon(); ?>
    537536    <h2 class="nav-tab-wrapper">
    538537        <a href="<?php echo admin_url( 'nav-menus.php' ); ?>" class="nav-tab<?php if ( ! isset( $_GET['action'] ) || isset( $_GET['action'] ) && 'locations' != $_GET['action'] ) echo ' nav-tab-active'; ?>"><?php esc_html_e( 'Edit Menus' ); ?></a>
  • trunk/src/wp-admin/network.php

    r26478 r26518  
    137137?>
    138138<div class="wrap">
    139 <?php screen_icon('tools'); ?>
    140139<h2><?php echo esc_html( $title ); ?></h2>
    141140
  • trunk/src/wp-admin/network/index.php

    r26392 r26518  
    6666
    6767<div class="wrap">
    68 <?php screen_icon(); ?>
    6968<h2><?php echo esc_html( $title ); ?></h2>
    7069
  • trunk/src/wp-admin/network/settings.php

    r26478 r26518  
    8585
    8686<div class="wrap">
    87     <?php screen_icon('options-general'); ?>
    8887    <h2><?php echo esc_html( $title ); ?></h2>
    8988    <form method="post" action="settings.php">
  • trunk/src/wp-admin/network/site-info.php

    r25616 r26518  
    9797
    9898<div class="wrap">
    99 <?php screen_icon('ms-admin'); ?>
    10099<h2 id="edit-site"><?php echo $title_site_url_linked ?></h2>
    101100<h3 class="nav-tab-wrapper">
  • trunk/src/wp-admin/network/site-new.php

    r26236 r26518  
    112112
    113113<div class="wrap">
    114 <?php screen_icon('ms-admin'); ?>
    115114<h2 id="add-new-site"><?php _e('Add New Site') ?></h2>
    116115<?php
  • trunk/src/wp-admin/network/site-settings.php

    r25963 r26518  
    8888
    8989<div class="wrap">
    90 <?php screen_icon('ms-admin'); ?>
    9190<h2 id="edit-site"><?php echo $title_site_url_linked ?></h2>
    9291<h3 class="nav-tab-wrapper">
  • trunk/src/wp-admin/network/site-themes.php

    r25616 r26518  
    136136
    137137<div class="wrap">
    138 <?php screen_icon('ms-admin'); ?>
    139138<h2 id="edit-site"><?php echo $title_site_url_linked ?></h2>
    140139<h3 class="nav-tab-wrapper">
  • trunk/src/wp-admin/network/site-users.php

    r25939 r26518  
    185185
    186186<div class="wrap">
    187 <?php screen_icon('ms-admin'); ?>
    188187<h2 id="edit-site"><?php echo $title_site_url_linked ?></h2>
    189188<h3 class="nav-tab-wrapper">
  • trunk/src/wp-admin/network/sites.php

    r26298 r26518  
    232232
    233233<div class="wrap">
    234 <?php screen_icon( 'ms-admin' ); ?>
    235234<h2><?php _e( 'Sites' ) ?>
    236235
  • trunk/src/wp-admin/network/themes.php

    r25616 r26518  
    9191
    9292            echo '<div class="wrap">';
    93             screen_icon();
    9493            echo '<h2>' . esc_html( $title ) . '</h2>';
    9594
     
    138137                <?php
    139138                    $themes_to_delete = count( $themes );
    140                     screen_icon();
    141139                    echo '<h2>' . _n( 'Delete Theme', 'Delete Themes', $themes_to_delete ) . '</h2>';
    142140                ?>
     
    228226
    229227<div class="wrap">
    230 <?php screen_icon('themes'); ?>
    231228<h2><?php echo esc_html( $title ); if ( current_user_can('install_themes') ) { ?> <a href="theme-install.php" class="add-new-h2"><?php echo esc_html_x('Add New', 'theme'); ?></a><?php }
    232229if ( $s )
  • trunk/src/wp-admin/network/upgrade.php

    r25616 r26518  
    4040
    4141echo '<div class="wrap">';
    42 screen_icon('tools');
    4342echo '<h2>' . __( 'Upgrade Network' ) . '</h2>';
    4443
  • trunk/src/wp-admin/network/user-new.php

    r25631 r26518  
    7070
    7171<div class="wrap">
    72 <?php screen_icon(); ?>
    7372<h2 id="add-new-user"><?php _e('Add New User') ?></h2>
    7473<?php
  • trunk/src/wp-admin/network/users.php

    r26499 r26518  
    2121    if ( !is_array( $users ) )
    2222        return false;
    23 
    24     screen_icon();
    2523    ?>
    2624    <h2><?php esc_html_e( 'Users' ); ?></h2>
     
    276274    ?>
    277275<div class="wrap">
    278     <?php screen_icon(); ?>
    279276    <h2><?php esc_html_e( 'Users' );
    280277    if ( current_user_can( 'create_users') ) : ?>
  • trunk/src/wp-admin/options-discussion.php

    r25829 r26518  
    3232
    3333<div class="wrap">
    34 <?php screen_icon(); ?>
    3534<h2><?php echo esc_html( $title ); ?></h2>
    3635
  • trunk/src/wp-admin/options-general.php

    r25880 r26518  
    8585
    8686<div class="wrap">
    87 <?php screen_icon(); ?>
    8887<h2><?php echo esc_html( $title ); ?></h2>
    8988
  • trunk/src/wp-admin/options-media.php

    r25616 r26518  
    4141
    4242<div class="wrap">
    43 <?php screen_icon(); ?>
    4443<h2><?php echo esc_html( $title ); ?></h2>
    4544
  • trunk/src/wp-admin/options-permalink.php

    r25616 r26518  
    171171
    172172<div class="wrap">
    173 <?php screen_icon(); ?>
    174173<h2><?php echo esc_html( $title ); ?></h2>
    175174
  • trunk/src/wp-admin/options-reading.php

    r25880 r26518  
    7777
    7878<div class="wrap">
    79 <?php screen_icon(); ?>
    8079<h2><?php echo esc_html( $title ); ?></h2>
    8180
  • trunk/src/wp-admin/options-writing.php

    r26081 r26518  
    6363
    6464<div class="wrap">
    65 <?php screen_icon(); ?>
    6665<h2><?php echo esc_html( $title ); ?></h2>
    6766
  • trunk/src/wp-admin/options.php

    r25880 r26518  
    201201
    202202<div class="wrap">
    203 <?php screen_icon(); ?>
    204203  <h2><?php esc_html_e('All Settings'); ?></h2>
    205204  <form name="form" action="options.php" method="post" id="all-options">
  • trunk/src/wp-admin/plugin-editor.php

    r25616 r26518  
    168168<?php endif; ?>
    169169<div class="wrap">
    170 <?php screen_icon(); ?>
    171170<h2><?php echo esc_html( $title ); ?></h2>
    172171
  • trunk/src/wp-admin/plugin-install.php

    r25616 r26518  
    7474?>
    7575<div class="wrap">
    76 <?php screen_icon( 'plugins' ); ?>
    7776<h2><?php echo esc_html( $title ); ?></h2>
    7877
  • trunk/src/wp-admin/plugins.php

    r26345 r26518  
    117117
    118118            echo '<div class="wrap">';
    119             screen_icon();
    120119            echo '<h2>' . esc_html( $title ) . '</h2>';
    121120
     
    260259                        }
    261260                    }
    262                     screen_icon();
    263261                    $plugins_to_delete = count( $plugin_info );
    264262                    echo '<h2>' . _n( 'Delete Plugin', 'Delete Plugins', $plugins_to_delete ) . '</h2>';
     
    409407
    410408<div class="wrap">
    411 <?php screen_icon(); ?>
    412409<h2><?php echo esc_html( $title );
    413410if ( ( ! is_multisite() || is_network_admin() ) && current_user_can('install_plugins') ) { ?>
  • trunk/src/wp-admin/revision.php

    r25880 r26518  
    125125
    126126<div class="wrap">
    127     <?php screen_icon(); ?>
    128127    <h2 class="long-header"><?php echo $h2; ?></h2>
    129128</div>
  • trunk/src/wp-admin/theme-editor.php

    r25616 r26518  
    134134?>
    135135<div class="wrap">
    136 <?php screen_icon(); ?>
    137136<h2><?php echo esc_html( $title ); ?></h2>
    138137
  • trunk/src/wp-admin/theme-install.php

    r26466 r26518  
    7676?>
    7777<div class="wrap">
    78 <?php
    79 screen_icon();
    80 ?>
    8178<h2><?php echo esc_html( $title ); ?></h2>
    8279<?php
  • trunk/src/wp-admin/tools.php

    r25937 r26518  
    3434?>
    3535<div class="wrap">
    36 <?php screen_icon(); ?>
    3736<h2><?php echo esc_html( $title ); ?></h2>
    3837
  • trunk/src/wp-admin/update-core.php

    r26283 r26518  
    377377?>
    378378    <div class="wrap">
    379     <?php screen_icon('tools'); ?>
    380379    <h2><?php _e('Update WordPress'); ?></h2>
    381380<?php
     
    491490    ?>
    492491    <div class="wrap">
    493     <?php screen_icon('tools'); ?>
    494492    <h2><?php _e('WordPress Updates'); ?></h2>
    495493    <?php
     
    570568    require_once(ABSPATH . 'wp-admin/admin-header.php');
    571569    echo '<div class="wrap">';
    572     screen_icon('plugins');
    573570    echo '<h2>' . esc_html__('Update Plugins') . '</h2>';
    574571    echo "<iframe src='$url' style='width: 100%; height: 100%; min-height: 750px;' frameborder='0'></iframe>";
     
    599596    require_once(ABSPATH . 'wp-admin/admin-header.php');
    600597    echo '<div class="wrap">';
    601     screen_icon('themes');
    602598    echo '<h2>' . esc_html__('Update Themes') . '</h2>';
    603599    echo "<iframe src='$url' style='width: 100%; height: 100%; min-height: 750px;' frameborder='0'></iframe>";
  • trunk/src/wp-admin/upload.php

    r25616 r26518  
    178178
    179179<div class="wrap">
    180 <?php screen_icon(); ?>
    181180<h2>
    182181<?php
  • trunk/src/wp-admin/user-edit.php

    r26493 r26518  
    211211
    212212<div class="wrap" id="profile-page">
    213 <?php screen_icon(); ?>
    214213<h2>
    215214<?php
  • trunk/src/wp-admin/user-new.php

    r26493 r26518  
    234234?>
    235235<div class="wrap">
    236 <?php screen_icon(); ?>
    237236<h2 id="add-new-user"> <?php
    238237if ( current_user_can( 'create_users' ) ) {
  • trunk/src/wp-admin/users.php

    r25616 r26518  
    219219
    220220<div class="wrap">
    221 <?php screen_icon(); ?>
    222221<h2><?php _e('Delete Users'); ?></h2>
    223222<?php if ( isset( $_REQUEST['error'] ) ) : ?>
     
    324323
    325324<div class="wrap">
    326 <?php screen_icon(); ?>
    327325<h2><?php _e('Remove Users from Site'); ?></h2>
    328326<p><?php _e('You have specified these users for removal:'); ?></p>
     
    426424
    427425<div class="wrap">
    428 <?php screen_icon(); ?>
    429426<h2>
    430427<?php
  • trunk/src/wp-admin/widgets.php

    r26505 r26518  
    230230    require_once( ABSPATH . 'wp-admin/admin-header.php' ); ?>
    231231    <div class="wrap">
    232     <?php screen_icon(); ?>
    233232    <h2><?php echo esc_html( $title ); ?></h2>
    234233    <div class="editwidget"<?php echo $width; ?>>
     
    311310
    312311<div class="wrap">
    313 <?php screen_icon(); ?>
    314312<h2><?php echo esc_html( $title ); ?></h2>
    315313
Note: See TracChangeset for help on using the changeset viewer.