Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r18018 r18314  
    426426    <thead>
    427427    <tr>
    428         <th class="left">' . __( 'Name' ) . '</th>
     428        <th class="left">' . _x( 'Name', 'meta name' ) . '</th>
    429429        <th>' . __( 'Value' ) . '</th>
    430430    </tr>
     
    441441    <thead>
    442442    <tr>
    443         <th class="left"><?php _e( 'Name' ) ?></th>
     443        <th class="left"><?php _ex( 'Name', 'meta name' ) ?></th>
    444444        <th><?php _e( 'Value' ) ?></th>
    445445    </tr>
     
    536536<thead>
    537537<tr>
    538 <th class="left"><label for="metakeyselect"><?php _e( 'Name' ) ?></label></th>
     538<th class="left"><label for="metakeyselect"><?php _ex( 'Name', 'meta name' ) ?></label></th>
    539539<th><label for="metavalue"><?php _e( 'Value' ) ?></label></th>
    540540</tr>
     
    943943        // Grab the ones the user has manually sorted. Pull them out of their previous context/priority and into the one the user chose
    944944        if ( !$already_sorted && $sorted = get_user_option( "meta-box-order_$page" ) ) {
    945             foreach ( $sorted as $box_context => $ids )
    946                 foreach ( explode(',', $ids) as $id )
     945            foreach ( $sorted as $box_context => $ids ) {
     946                foreach ( explode(',', $ids ) as $id ) {
    947947                    if ( $id )
    948948                        add_meta_box( $id, null, null, $page, $box_context, 'sorted' );
     949                }
     950            }
    949951        }
    950952        $already_sorted = true;
     
    962964                    $hidden_class = in_array($box['id'], $hidden) ? ' hide-if-js' : '';
    963965                    echo '<div id="' . $box['id'] . '" class="postbox ' . postbox_classes($box['id'], $page) . $hidden_class . '" ' . '>' . "\n";
    964                     echo '<div class="handlediv" title="' . esc_attr__('Click to toggle') . '"><br /></div>';
     966                    if ( 'dashboard_browser_nag' != $box['id'] )
     967                        echo '<div class="handlediv" title="' . esc_attr__('Click to toggle') . '"><br /></div>';
    965968                    echo "<h3 class='hndle'><span>{$box['title']}</span></h3>\n";
    966969                    echo '<div class="inside">' . "\n";
     
    16281631
    16291632    if ( !empty($post->post_password) )
    1630         $post_states[] = __('Password protected');
     1633        $post_states['protected'] = __('Password protected');
    16311634    if ( 'private' == $post->post_status && 'private' != $post_status )
    1632         $post_states[] = __('Private');
     1635        $post_states['private'] = __('Private');
    16331636    if ( 'draft' == $post->post_status && 'draft' != $post_status )
    1634         $post_states[] = __('Draft');
     1637        $post_states['draft'] = __('Draft');
    16351638    if ( 'pending' == $post->post_status && 'pending' != $post_status )
    16361639        /* translators: post state */
    1637         $post_states[] = _x('Pending', 'post state');
     1640        $post_states['pending'] = _x('Pending', 'post state');
    16381641    if ( is_sticky($post->ID) )
    1639         $post_states[] = __('Sticky');
     1642        $post_states['sticky'] = __('Sticky');
    16401643
    16411644    $post_states = apply_filters( 'display_post_states', $post_states );
     
    16561659}
    16571660
     1661function _media_states( $post ) {
     1662    $media_states = array();
     1663    $stylesheet = get_option('stylesheet');
     1664
     1665    if ( current_theme_supports( 'custom-header') ) {
     1666        $meta_header = get_post_meta($post->ID, '_wp_attachment_is_custom_header', true );
     1667        if ( ! empty( $meta_header ) && $meta_header == $stylesheet )
     1668            $media_states[] = __( 'Header Image' );
     1669    }
     1670
     1671    if ( current_theme_supports( 'custom-background') ) {
     1672        $meta_background = get_post_meta($post->ID, '_wp_attachment_is_custom_background', true );
     1673        if ( ! empty( $meta_background ) && $meta_background == $stylesheet )
     1674            $media_states[] = __( 'Background Image' );
     1675    }
     1676
     1677    $media_states = apply_filters( 'display_media_states', $media_states );
     1678
     1679    if ( ! empty( $media_states ) ) {
     1680        $state_count = count( $media_states );
     1681        $i = 0;
     1682        echo ' - ';
     1683        foreach ( $media_states as $state ) {
     1684            ++$i;
     1685            ( $i == $state_count ) ? $sep = '' : $sep = ', ';
     1686            echo "<span class='post-state'>$state$sep</span>";
     1687        }
     1688    }
     1689}
     1690
    16581691/**
    16591692 * Convert a screen string to a screen object
     
    17171750    if ( !empty($wp_current_screen_options) )
    17181751        $show_screen = true;
     1752
     1753    $show_screen = apply_filters('screen_options_show_screen', $show_screen, $screen);
    17191754
    17201755?>
     
    19231958}
    19241959
    1925 function screen_icon($screen = '') {
     1960function screen_icon( $screen = '' ) {
     1961    echo get_screen_icon( $screen );
     1962}
     1963
     1964function get_screen_icon( $screen = '' ) {
    19261965    global $current_screen, $typenow;
    19271966
     
    19511990    }
    19521991
    1953 ?>
    1954     <div id="icon-<?php echo $name; ?>" class="<?php echo $class; ?>"><br /></div>
    1955 <?php
     1992    return '<div id="icon-' . esc_attr( $name ) . '" class="' . $class . '"><br /></div>';
    19561993}
    19571994
     
    21902227    return $button;
    21912228}
    2192 
Note: See TracChangeset for help on using the changeset viewer.