Making WordPress.org


Ignore:
Timestamp:
11/21/2016 01:38:13 AM (9 years ago)
Author:
dd32
Message:

Plugin Directory: Reviewer admin UX tweaks

  • Rename the menu from 'My Plugins' to 'Repo Plugins' to match theme directory
  • Extend the 'slug' and 'author' inputs to be longer, accomodating longer slugs
  • Add the 'submitter' column to the list view (post_author)
  • Add the taxonomies columns to the list view (committer, contributors, tags

Plugin reviewers will most likely need to remove some of the columns through Screen Options to make the page usable, we can also remove some of the columns if they're not likely to be used.

See #2249.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/list-table/class-plugin-posts.php

    r3332 r4383  
    105105            /* translators: manage posts column name */
    106106            'title'     => _x( 'Title', 'column name', 'wporg-plugins' ),
     107            'author'    => __( 'Submitter', 'wporg-plugins' ),
    107108            'tested'    => __( 'Tested up to', 'wporg-plugins' ),
    108109            'rating'    => __( 'Rating', 'wporg-plugins' ),
     
    112113        );
    113114
    114         if ( current_user_can( 'plugin_review' ) ) {
    115             $posts_columns['comments'] = '<span class="vers comment-grey-bubble" title="' . esc_attr__( 'Internal Notes', 'wporg-plugins' ) . '"><span class="screen-reader-text">' . __( 'Internal Notes', 'wporg-plugins' ) . '</span></span>';
    116         }
    117 
     115        $taxonomies = get_object_taxonomies( $post_type, 'objects' );
     116        $taxonomies = wp_filter_object_list( $taxonomies, array( 'show_admin_column' => true ), 'and', 'name' );
     117        $taxonomies = apply_filters( "manage_taxonomies_for_{$post_type}_columns", $taxonomies, $post_type );
     118        $taxonomies = array_filter( $taxonomies, 'taxonomy_exists' );
     119
     120        foreach ( $taxonomies as $taxonomy ) {
     121            $column_key = 'taxonomy-' . $taxonomy;
     122            $posts_columns[ $column_key ] = get_taxonomy( $taxonomy )->labels->name;
     123        }
     124
     125        $posts_columns['comments'] = '<span class="vers comment-grey-bubble" title="' . esc_attr__( 'Internal Notes', 'wporg-plugins' ) . '"><span class="screen-reader-text">' . __( 'Internal Notes', 'wporg-plugins' ) . '</span></span>';
    118126        $posts_columns['date'] = __( 'Date', 'wporg-plugins' );
    119127
Note: See TracChangeset for help on using the changeset viewer.