Changeset 2831
- Timestamp:
- 03/28/2016 07:11:35 PM (9 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php
r2798 r2831 155 155 */ 156 156 public function pre_get_posts_sql_name_or_user( $where ) { 157 global $wpdb; 158 157 159 remove_filter( 'posts_where', array( $this, 'pre_get_posts_sql_name_or_user' ) ); 158 160 159 161 // Replace `post_name IN(..) AND post_author IN (..)` 160 162 // With `( post_name IN() OR post_author IN() )` 161 162 163 $where = preg_replace( "!\s(\S+\.post_name IN .+?)\s*AND\s*(\s\S+\.post_author.+?)AND!i", ' ( $1 OR $2 ) AND', $where ); 164 165 // Allow reviewers to also see all pending plugins. 166 if ( current_user_can( 'plugin_edit_pending' ) ) { 167 $where .= " OR {$wpdb->posts}.post_status = 'pending'"; 168 } 169 163 170 return $where; 164 171 } -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/list-table/class-plugin-posts.php
r2798 r2831 331 331 ); 332 332 333 if ( ! current_user_can( 'plugin_edit_others' ) ) {333 if ( ! current_user_can( 'plugin_edit_others' ) && ! current_user_can( 'plugin_edit_pending' ) ) { 334 334 $status_links['mine'] = $this->get_edit_link( $mine_args, $mine_inner_html, 'current' );; 335 335 return $status_links;
Note: See TracChangeset
for help on using the changeset viewer.