WordPress.org

Making WordPress.org


Ignore:
Timestamp:
03/24/2016 06:43:18 PM (3 years ago)
Author:
obenland
Message:

Plugin Directory: Show Plugin Committers their unpublished plugins as well.

See #1571.

File:
1 edited

Legend:

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

    r2790 r2791  
    100100
    101101    /**
    102      * Filter the query in wp-admin to list only.
     102     * Filter the query in wp-admin to list only plugins relevant to the current user.
    103103     */
    104104    public function pre_get_posts( $query ) {
     
    111111            $query->query_vars['author'] = get_current_user_id();
    112112            $plugins = Tools::get_users_write_access_plugins( get_current_user_id() );
     113
    113114            if ( $plugins ) {
    114115                $query->query_vars['post_name__in'] = $plugins;
     116                $query->query_vars['post_status']   = 'any';
     117
    115118                add_filter( 'posts_where', array( $this, 'pre_get_posts_sql_name_or_user' ) );
    116119            }
Note: See TracChangeset for help on using the changeset viewer.