Changeset 10229 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-block-validator.php
- Timestamp:
- 09/02/2020 04:13:40 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-block-validator.php
r10225 r10229 122 122 if ( $post && wp_verify_nonce( $_POST['block-directory-nonce'], 'block-directory-edit-' . $post->ID ) ) { 123 123 if ( current_user_can( 'edit_post', $post->ID ) || current_user_can( 'plugin_admin_edit', $post->ID ) ) { 124 $terms = wp_list_pluck( get_the_terms( $post->ID, 'plugin_section' ) , 'slug' );124 $terms = wp_list_pluck( get_the_terms( $post->ID, 'plugin_section' ) ?: [], 'slug' ); 125 125 if ( 'add' === $_POST['block-directory-edit'] ) { 126 126 $terms[] = 'block';
Note: See TracChangeset
for help on using the changeset viewer.