Changeset 56880 for branches/5.5/src/wp-includes/media.php
- Timestamp:
- 10/12/2023 03:09:08 PM (19 months ago)
- Location:
- branches/5.5
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.5
- Property svn:mergeinfo changed
/trunk merged: 56833-56836,56838
- Property svn:mergeinfo changed
-
branches/5.5/src/wp-includes/media.php
r55782 r56880 2231 2231 } 2232 2232 } elseif ( ! empty( $atts['exclude'] ) ) { 2233 $post_parent_id = $id; 2233 2234 $attachments = get_children( 2234 2235 array( … … 2243 2244 ); 2244 2245 } else { 2246 $post_parent_id = $id; 2245 2247 $attachments = get_children( 2246 2248 array( … … 2253 2255 ) 2254 2256 ); 2257 } 2258 2259 if ( ! empty( $post_parent_id ) ) { 2260 $post_parent = get_post( $post_parent_id ); 2261 2262 // terminate the shortcode execution if user cannot read the post or password-protected 2263 if ( 2264 ( ! is_post_publicly_viewable( $post_parent->ID ) && ! current_user_can( 'read_post', $post_parent->ID ) ) 2265 || post_password_required( $post_parent ) ) { 2266 return ''; 2267 } 2255 2268 } 2256 2269 … … 2581 2594 } 2582 2595 2596 if ( ! empty( $args['post_parent'] ) ) { 2597 $post_parent = get_post( $id ); 2598 2599 // terminate the shortcode execution if user cannot read the post or password-protected 2600 if ( ! current_user_can( 'read_post', $post_parent->ID ) || post_password_required( $post_parent ) ) { 2601 return ''; 2602 } 2603 } 2604 2583 2605 if ( empty( $attachments ) ) { 2584 2606 return '';
Note: See TracChangeset
for help on using the changeset viewer.