Changeset 56877 for branches/5.3/src/wp-includes/media.php
- Timestamp:
- 10/12/2023 03:05:46 PM (21 months ago)
- Location:
- branches/5.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.3
- Property svn:mergeinfo changed
/trunk merged: 56833-56836,56838
- Property svn:mergeinfo changed
-
branches/5.3/src/wp-includes/media.php
r55788 r56877 1873 1873 } 1874 1874 } elseif ( ! empty( $atts['exclude'] ) ) { 1875 $attachments = get_children( 1875 $post_parent_id = $id; 1876 $attachments = get_children( 1876 1877 array( 1877 1878 'post_parent' => $id, … … 1885 1886 ); 1886 1887 } else { 1887 $attachments = get_children( 1888 $post_parent_id = $id; 1889 $attachments = get_children( 1888 1890 array( 1889 1891 'post_parent' => $id, … … 1895 1897 ) 1896 1898 ); 1899 } 1900 1901 if ( ! empty( $post_parent_id ) ) { 1902 $post_parent = get_post( $post_parent_id ); 1903 1904 // terminate the shortcode execution if user cannot read the post or password-protected 1905 if ( 1906 ( ! is_post_publicly_viewable( $post_parent->ID ) && ! current_user_can( 'read_post', $post_parent->ID ) ) 1907 || post_password_required( $post_parent ) ) { 1908 return ''; 1909 } 1897 1910 } 1898 1911 … … 2215 2228 } 2216 2229 2230 if ( ! empty( $args['post_parent'] ) ) { 2231 $post_parent = get_post( $id ); 2232 2233 // terminate the shortcode execution if user cannot read the post or password-protected 2234 if ( ! current_user_can( 'read_post', $post_parent->ID ) || post_password_required( $post_parent ) ) { 2235 return ''; 2236 } 2237 } 2238 2217 2239 if ( empty( $attachments ) ) { 2218 2240 return '';
Note: See TracChangeset
for help on using the changeset viewer.