Changeset 56875 for branches/5.9/src/wp-includes/media.php
- Timestamp:
- 10/12/2023 03:03:26 PM (16 months ago)
- Location:
- branches/5.9
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.9
- Property svn:mergeinfo changed
/trunk merged: 56833-56838
- Property svn:mergeinfo changed
-
branches/5.9/src/wp-includes/media.php
r55774 r56875 2355 2355 } 2356 2356 } elseif ( ! empty( $atts['exclude'] ) ) { 2357 $post_parent_id = $id; 2357 2358 $attachments = get_children( 2358 2359 array( … … 2367 2368 ); 2368 2369 } else { 2370 $post_parent_id = $id; 2369 2371 $attachments = get_children( 2370 2372 array( … … 2377 2379 ) 2378 2380 ); 2381 } 2382 2383 if ( ! empty( $post_parent_id ) ) { 2384 $post_parent = get_post( $post_parent_id ); 2385 2386 // terminate the shortcode execution if user cannot read the post or password-protected 2387 if ( 2388 ( ! is_post_publicly_viewable( $post_parent->ID ) && ! current_user_can( 'read_post', $post_parent->ID ) ) 2389 || post_password_required( $post_parent ) ) { 2390 return ''; 2391 } 2379 2392 } 2380 2393 … … 2705 2718 } 2706 2719 2720 if ( ! empty( $args['post_parent'] ) ) { 2721 $post_parent = get_post( $id ); 2722 2723 // terminate the shortcode execution if user cannot read the post or password-protected 2724 if ( ! current_user_can( 'read_post', $post_parent->ID ) || post_password_required( $post_parent ) ) { 2725 return ''; 2726 } 2727 } 2728 2707 2729 if ( empty( $attachments ) ) { 2708 2730 return '';
Note: See TracChangeset
for help on using the changeset viewer.