Changeset 2927 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php
- Timestamp:
- 04/11/2016 11:33:19 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php
r2926 r2927 137 137 } 138 138 139 if ( empty( $query->query['post_status'] ) ) { 140 $query->query_vars['post_status'] = array( 'publish', 'future', 'draft', 'pending', 'disabled', 'closed', 'rejected' ); 141 } 142 139 143 if ( ! current_user_can( 'plugin_edit_others' ) || ( isset( $query->query['author'] ) && $query->query['author'] == get_current_user_id() ) ) { 140 144 $query->query_vars['author'] = get_current_user_id(); 145 141 146 $plugins = Tools::get_users_write_access_plugins( get_current_user_id() ); 142 143 147 if ( $plugins ) { 144 148 $query->query_vars['post_name__in'] = $plugins; … … 165 169 166 170 // Allow reviewers to also see all pending plugins. 167 if ( current_user_can( 'plugin_edit_pending' ) && ! isset( $_GET['author']) ) {171 if ( current_user_can( 'plugin_edit_pending' ) && ( ! isset( $_GET['author'] ) || ( isset( $_GET['post_status'] ) && 'pending' === $_GET['post_status'] ) ) ) { 168 172 $where .= " OR {$wpdb->posts}.post_status = 'pending'"; 169 173 } … … 183 187 if ( 'plugin' === $post_type ) { 184 188 $wp_list_table = new Plugin_Posts(); 189 $wp_list_table->prepare_items(); 185 190 } 186 191 }
Note: See TracChangeset
for help on using the changeset viewer.