Changeset 4276
- Timestamp:
- 10/20/2016 04:07:33 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-capabilities.php
r4260 r4276 61 61 if ( ! $plugin_edit_cap ) { 62 62 // Contributors can view, but not edit. 63 $contributors = (array) wp_list_pluck( get_the_terms( $post, 'plugin_contributors' ), 'name' ); 64 if ( in_array( $user->user_nicename, $contributors, true ) ) { 65 $required_caps[] = 'exist'; // All users are allowed to exist, even when they have no role. 66 break; 63 $terms = get_the_terms( $post, 'plugin_contributors' ); 64 if ( is_array( $terms ) ) { 65 $contributors = (array) wp_list_pluck( $terms, 'name' ); 66 if ( in_array( $user->user_nicename, $contributors, true ) ) { 67 $required_caps[] = 'exist'; // All users are allowed to exist, even when they have no role. 68 break; 69 } 67 70 } 68 71 }
Note: See TracChangeset
for help on using the changeset viewer.