Changeset 2791
- Timestamp:
- 03/24/2016 06:43:18 PM (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
r2790 r2791 100 100 101 101 /** 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. 103 103 */ 104 104 public function pre_get_posts( $query ) { … … 111 111 $query->query_vars['author'] = get_current_user_id(); 112 112 $plugins = Tools::get_users_write_access_plugins( get_current_user_id() ); 113 113 114 if ( $plugins ) { 114 115 $query->query_vars['post_name__in'] = $plugins; 116 $query->query_vars['post_status'] = 'any'; 117 115 118 add_filter( 'posts_where', array( $this, 'pre_get_posts_sql_name_or_user' ) ); 116 119 }
Note: See TracChangeset
for help on using the changeset viewer.