Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r14933 r15201  
    397397 */
    398398function _tag_row( $tag, $level, $taxonomy = 'post_tag' ) {
    399         global $post_type;
     399        global $post_type, $current_screen;
    400400        static $row_class = '';
    401401        $row_class = ($row_class == '' ? ' class="alternate"' : '');
     
    423423
    424424
    425         $columns = get_column_headers('edit-tags');
    426         $hidden = get_hidden_columns('edit-tags');
     425        $columns = get_column_headers($current_screen);
     426        $hidden = get_hidden_columns($current_screen);
    427427        $default_term = get_option('default_' . $taxonomy);
    428428        foreach ( $columns as $column_name => $column_display_name ) {
     
    14331433        case 'author':
    14341434        ?>
    1435         <td <?php echo $attributes ?>><a href="edit.php?author=<?php the_author_meta('ID'); ?>"><?php the_author() ?></a></td>
     1435        <td <?php echo $attributes ?>><a href="edit.php?post_type=<?php echo $post->post_type; ?>&amp;author=<?php the_author_meta('ID'); ?>"><?php the_author() ?></a></td>
    14361436        <?php
    14371437        break;
     
    15301530    case 'cb':
    15311531        ?>
    1532         <th scope="row" class="check-column"><input type="checkbox" name="post[]" value="<?php the_ID(); ?>" /></th>
     1532        <th scope="row" class="check-column"><?php if ( current_user_can( $post_type_object->cap->edit_post, $page->ID ) ) { ?><input type="checkbox" name="post[]" value="<?php the_ID(); ?>" /><?php } ?></th>
    15331533        <?php
    15341534        break;
     
    16231623    case 'author':
    16241624        ?>
    1625         <td <?php echo $attributes ?>><a href="edit-pages.php?author=<?php the_author_meta('ID'); ?>"><?php the_author() ?></a></td>
     1625        <td <?php echo $attributes ?>><a href="edit.php?post_type=<?php echo $post_type; ?>&amp;author=<?php the_author_meta('ID'); ?>"><?php the_author() ?></a></td>
    16261626        <?php
    16271627        break;
     
    24022402    $r .= "\n\t\t<div class='submit'><input name='deletemeta[{$entry['meta_id']}]' type='submit' ";
    24032403    $r .= "class='delete:the-list:meta-{$entry['meta_id']}::_ajax_nonce=$delete_nonce deletemeta' tabindex='6' value='". esc_attr__( 'Delete' ) ."' />";
    2404     $r .= "\n\t\t<input name='updatemeta' type='submit' tabindex='6' value='". esc_attr__( 'Update' ) ."' class='add:the-list:meta-{$entry['meta_id']}::_ajax_nonce=$update_nonce updatemeta' /></div>";
     2404    $r .= "\n\t\t<input name='updatemeta' type='submit' tabindex='6' value='". esc_attr__( 'Update' ) ."' class='add:the-list:meta-{$entry['meta_id']}::_ajax_nonce-add-meta=$update_nonce updatemeta' /></div>";
    24052405    $r .= wp_nonce_field( 'change-meta', '_ajax_nonce', false, false );
    24062406    $r .= "</td>";
     
    29662966 * Add settings fields to your section with add_settings_field()
    29672967 *
    2968  * The $callback argument should be the name of a function that echos out any
     2968 * The $callback argument should be the name of a function that echoes out any
    29692969 * content you want to show at the top of the settings section before the actual
    29702970 * fields. It can output nothing if you want.
     
    29732973 *
    29742974 * @global $wp_settings_sections Storage array of all settings sections added to admin pages
    2975 
     2975 *
    29762976 * @param string $id Slug-name to identify the section. Used in the 'id' attribute of tags.
    29772977 * @param string $title Formatted title of the section. Shown as the heading for the section.
    2978  * @param string $callback Function that echo's out content for the section heading.
    2979  * @param string $page The slug-name of the settings page on which to show the section (general, reading, writing, ...).
     2978 * @param string $callback Function that echos out any content at the top of the section (between heading and fields).
     2979 * @param string $page The slug-name of the settings page on which to show the section. Built-in pages include 'general', 'reading', 'writing', 'discussion', 'media', etc. Create your own using add_options_page();
    29802980 */
    29812981function add_settings_section($id, $title, $callback, $page) {
     
    37493749            break;
    37503750        case 'ms-sites':
    3751             $per_page_label = __('Sites');
     3751            $per_page_label = _x( 'Sites', 'sites per page (screen options)' );
    37523752            break;
    37533753        case 'ms-users':
    3754             $per_page_label = __('Users');
     3754            $per_page_label = _x( 'Users', 'users per page (screen options)' );
    37553755            break;
    37563756        case 'edit-comments':
    3757             $per_page_label = __('Comments');
     3757            $per_page_label = _x( 'Comments', 'comments per page (screen options)' );
    37583758            break;
    37593759        case 'upload':
    3760             $per_page_label = __('Media items');
     3760            $per_page_label = _x( 'Media items', 'items per page (screen options)' );
    37613761            break;
    37623762        case 'edit-tags':
     
    37653765            break;
    37663766        case 'plugins':
    3767             $per_page_label = __('Plugins');
     3767            $per_page_label = _x( 'Plugins', 'plugins per page (screen options)' );
    37683768            break;
    37693769        default:
     
    39013901 */
    39023902function set_current_screen( $id =  '' ) {
    3903     global $current_screen, $hook_suffix, $typenow;
     3903    global $current_screen, $hook_suffix, $typenow, $taxnow;
    39043904
    39053905    if ( empty($id) ) {
     
    39103910        $current_screen = array('id' => $current_screen, 'base' => $current_screen);
    39113911    } else {
    3912         if ( false !== strpos($id, '-') )
     3912        $id = sanitize_key($id);
     3913        if ( false !== strpos($id, '-') ) {
    39133914            list( $id, $typenow ) = explode('-', $id, 2);
     3915            if ( is_taxonomy($typenow) ) {
     3916                $id = 'edit-tags';
     3917                $taxnow = $typenow;
     3918                $typenow = '';
     3919            }
     3920        }
    39143921        $current_screen = array('id' => $id, 'base' => $id);
    39153922    }
     
    39333940        $current_screen->id = $typenow;
    39343941        $current_screen->post_type = $typenow;
     3942    } elseif ( 'edit-tags' == $current_screen->id ) {
     3943        if ( empty($taxnow) )
     3944            $taxnow = 'post_tag';
     3945        $current_screen->id = 'edit-' . $taxnow;
     3946        $current_screen->taxonomy = $taxnow;
    39353947    }
    39363948
Note: See TracChangeset for help on using the changeset viewer.