Changeset 57120 for trunk/src/wp-includes/media.php
- Timestamp:
- 11/17/2023 01:27:23 PM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r57053 r57120 2637 2637 $post_parent = get_post( $post_parent_id ); 2638 2638 2639 // terminate the shortcode execution if user cannot read the post or password-protected2640 if ( 2641 ( ! is_post_publicly_viewable( $post_parent->ID ) && ! current_user_can( 'read_post', $post_parent->ID ))2642 || post_password_required( $post_parent )) {2639 // Terminate the shortcode execution if the user cannot read the post or it is password-protected. 2640 if ( ! is_post_publicly_viewable( $post_parent->ID ) && ! current_user_can( 'read_post', $post_parent->ID ) 2641 || post_password_required( $post_parent ) 2642 ) { 2643 2643 return ''; 2644 2644 } … … 2980 2980 $post_parent = get_post( $id ); 2981 2981 2982 // terminate the shortcode execution if user cannot read the post or password-protected2982 // Terminate the shortcode execution if the user cannot read the post or it is password-protected. 2983 2983 if ( ! current_user_can( 'read_post', $post_parent->ID ) || post_password_required( $post_parent ) ) { 2984 2984 return '';
Note: See TracChangeset
for help on using the changeset viewer.