Changeset 56870 for branches/6.0/src/wp-includes/media.php
- Timestamp:
- 10/12/2023 02:59:09 PM (18 months ago)
- Location:
- branches/6.0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.0
- Property svn:mergeinfo changed
/trunk merged: 56833-56838
- Property svn:mergeinfo changed
-
branches/6.0/src/wp-includes/media.php
r55773 r56870 2378 2378 } 2379 2379 } elseif ( ! empty( $atts['exclude'] ) ) { 2380 $post_parent_id = $id; 2380 2381 $attachments = get_children( 2381 2382 array( … … 2390 2391 ); 2391 2392 } else { 2393 $post_parent_id = $id; 2392 2394 $attachments = get_children( 2393 2395 array( … … 2400 2402 ) 2401 2403 ); 2404 } 2405 2406 if ( ! empty( $post_parent_id ) ) { 2407 $post_parent = get_post( $post_parent_id ); 2408 2409 // terminate the shortcode execution if user cannot read the post or password-protected 2410 if ( 2411 ( ! is_post_publicly_viewable( $post_parent->ID ) && ! current_user_can( 'read_post', $post_parent->ID ) ) 2412 || post_password_required( $post_parent ) ) { 2413 return ''; 2414 } 2402 2415 } 2403 2416 … … 2728 2741 } 2729 2742 2743 if ( ! empty( $args['post_parent'] ) ) { 2744 $post_parent = get_post( $id ); 2745 2746 // terminate the shortcode execution if user cannot read the post or password-protected 2747 if ( ! current_user_can( 'read_post', $post_parent->ID ) || post_password_required( $post_parent ) ) { 2748 return ''; 2749 } 2750 } 2751 2730 2752 if ( empty( $attachments ) ) { 2731 2753 return '';
Note: See TracChangeset
for help on using the changeset viewer.