Changeset 56867 for branches/6.1/src/wp-includes/media.php
- Timestamp:
- 10/12/2023 02:54:10 PM (22 months ago)
- Location:
- branches/6.1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.1
- Property svn:mergeinfo changed
/trunk merged: 56833-56838
- Property svn:mergeinfo changed
-
branches/6.1/src/wp-includes/media.php
r55771 r56867 2454 2454 } 2455 2455 } elseif ( ! empty( $atts['exclude'] ) ) { 2456 $post_parent_id = $id; 2456 2457 $attachments = get_children( 2457 2458 array( … … 2466 2467 ); 2467 2468 } else { 2469 $post_parent_id = $id; 2468 2470 $attachments = get_children( 2469 2471 array( … … 2476 2478 ) 2477 2479 ); 2480 } 2481 2482 if ( ! empty( $post_parent_id ) ) { 2483 $post_parent = get_post( $post_parent_id ); 2484 2485 // terminate the shortcode execution if user cannot read the post or password-protected 2486 if ( 2487 ( ! is_post_publicly_viewable( $post_parent->ID ) && ! current_user_can( 'read_post', $post_parent->ID ) ) 2488 || post_password_required( $post_parent ) ) { 2489 return ''; 2490 } 2478 2491 } 2479 2492 … … 2804 2817 } 2805 2818 2819 if ( ! empty( $args['post_parent'] ) ) { 2820 $post_parent = get_post( $id ); 2821 2822 // terminate the shortcode execution if user cannot read the post or password-protected 2823 if ( ! current_user_can( 'read_post', $post_parent->ID ) || post_password_required( $post_parent ) ) { 2824 return ''; 2825 } 2826 } 2827 2806 2828 if ( empty( $attachments ) ) { 2807 2829 return '';
Note: See TracChangeset
for help on using the changeset viewer.