Changeset 10298 for sites/trunk/wordpress.org/public_html/wp-content/plugins/trac-notifications/trac-components.php
- Timestamp:
- 09/29/2020 02:34:43 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/trac-notifications/trac-components.php
r9917 r10298 226 226 */ 227 227 public function map_meta_cap( $required_caps, $cap, $user_id, $context ) { 228 if ( in_array( $cap, [ 'edit_post', 'publish_post', 'edit_others_posts' ], true ) ) {228 if ( $user_id && in_array( $cap, [ 'edit_post', 'publish_post', 'edit_others_posts' ], true ) ) { 229 229 if ( empty( $context[0] ) ) { 230 230 $context[0] = isset( $_POST['post_ID'] ) ? absint( $_POST['post_ID'] ) : 0;
Note: See TracChangeset
for help on using the changeset viewer.