Making WordPress.org

Changeset 4383


Ignore:
Timestamp:
11/21/2016 01:38:13 AM (10 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.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
Files:
5 edited

Legend:

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

    r4260 r4383  
    108108                        switch ( $hook_suffix ) {
    109109                                case 'post.php':
    110                                         wp_enqueue_style( 'plugin-admin-post-css', plugins_url( 'css/edit-form.css', Plugin_Directory\PLUGIN_FILE ), array( 'edit' ), 1 );
     110                                        wp_enqueue_style( 'plugin-admin-post-css', plugins_url( 'css/edit-form.css', Plugin_Directory\PLUGIN_FILE ), array( 'edit' ), 2 );
    111111                                        wp_enqueue_script( 'plugin-admin-post-js', plugins_url( 'js/edit-form.js', Plugin_Directory\PLUGIN_FILE ), array( 'wp-util', 'wp-lists' ), 1 );
    112112                                        wp_localize_script( 'plugin-admin-post-js', 'pluginDirectory', array(
     
    116116
    117117                                case 'edit.php':
    118                                         wp_enqueue_style( 'plugin-admin-edit-css', plugins_url( 'css/plugin-list.css', Plugin_Directory\PLUGIN_FILE ), array(), 1 );
     118                                        wp_enqueue_style( 'plugin-admin-edit-css', plugins_url( 'css/plugin-list.css', Plugin_Directory\PLUGIN_FILE ), array(), 2 );
    119119                                        break;
    120120                        }
  • 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
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php

    r4372 r4383  
    8888                register_post_type( 'plugin', array(
    8989                        'labels'       => array(
    90                                 'name'               => __( 'Plugins',                   'wporg-plugins' ),
    91                                 'singular_name'      => __( 'Plugin',                    'wporg-plugins' ),
    92                                 'menu_name'          => __( 'My Plugins',                'wporg-plugins' ),
     90                                'name'               => __( 'Repo Plugins',              'wporg-plugins' ),
     91                                'singular_name'      => __( 'Repo Plugin',               'wporg-plugins' ),
     92                                'menu_name'          => __( 'Repo Plugins',              'wporg-plugins' ),
    9393                                'add_new'            => __( 'Add New',                   'wporg-plugins' ),
    9494                                'add_new_item'       => __( 'Add New Plugin',            'wporg-plugins' ),
     
    126126                        'rewrite'           => false,
    127127                        'public'            => true,
    128                         'show_ui'           => current_user_can( 'plugin_set_section' ),
    129                         'show_admin_column' => current_user_can( 'plugin_set_section' ),
     128                        'show_ui'           => true,
     129                        'show_admin_column' => false,
    130130                        'capabilities'      => array(
    131131                                'assign_terms' => 'plugin_set_section',
     
    156156                        'public'            => true,
    157157                        'show_ui'           => true,
    158                         'show_admin_column' => true,
     158                        'show_admin_column' => false,
    159159                        'capabilities'      => array(
    160160                                'assign_terms' => 'plugin_set_category',
     
    170170                        ),
    171171                        'public'            => true,
    172                         'show_ui'           => true,
     172                        'show_ui'           => false,
    173173                        'show_admin_column' => false,
    174174                        'meta_box_cb'       => false,
     
    186186                        ),
    187187                        'public'            => true,
    188                         'show_ui'           => true,
     188                        'show_ui'           => false,
    189189                        'show_admin_column' => false,
    190190                        'meta_box_cb'       => false,
     
    204204                        'public'            => true,
    205205                        'show_ui'           => true,
    206                         'show_admin_column' => false,
     206                        'show_admin_column' => true,
    207207                        'capabilities'      => array(
    208208                                'assign_terms' => 'do_not_allow',
     
    220220                        'public'            => true,
    221221                        'show_ui'           => true,
    222                         'show_admin_column' => false,
     222                        'show_admin_column' => true,
    223223                        'capabilities'      => array(
    224224                                'assign_terms' => 'do_not_allow',
     
    246246                        'public'            => true,
    247247                        'show_ui'           => true,
    248                         'show_admin_column' => false,
     248                        'show_admin_column' => true,
    249249                        'meta_box_cb'       => false,
    250250                        'capabilities'      => array(
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/css/edit-form.css

    r3099 r4383  
    3434}
    3535
     36input#post_name,
     37input#post_author_username {
     38        width: 350px;
     39}
     40
    3641.button-link:not(.handlediv) {
    3742        color: #0073aa;
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/css/plugin-list.css

    r2776 r4383  
    1 .fixed .column-tested,
    2 .fixed .column-rating,
    3 .fixed .column-installs,
    4 .fixed .column-downloads,
    5 .fixed .column-support {
    6         width: 12%;
     1.fixed .column-rating {
     2        width: 100px;
    73}
    84
Note: See TracChangeset for help on using the changeset viewer.