Changeset 56878 for branches/5.4/src/wp-includes/media.php
- Timestamp:
- 10/12/2023 03:06:49 PM (16 months ago)
- Location:
- branches/5.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.4
- Property svn:mergeinfo changed
/trunk merged: 56833-56836,56838
- Property svn:mergeinfo changed
-
branches/5.4/src/wp-includes/media.php
r55785 r56878 1931 1931 } 1932 1932 } elseif ( ! empty( $atts['exclude'] ) ) { 1933 $attachments = get_children( 1933 $post_parent_id = $id; 1934 $attachments = get_children( 1934 1935 array( 1935 1936 'post_parent' => $id, … … 1943 1944 ); 1944 1945 } else { 1945 $attachments = get_children( 1946 $post_parent_id = $id; 1947 $attachments = get_children( 1946 1948 array( 1947 1949 'post_parent' => $id, … … 1953 1955 ) 1954 1956 ); 1957 } 1958 1959 if ( ! empty( $post_parent_id ) ) { 1960 $post_parent = get_post( $post_parent_id ); 1961 1962 // terminate the shortcode execution if user cannot read the post or password-protected 1963 if ( 1964 ( ! is_post_publicly_viewable( $post_parent->ID ) && ! current_user_can( 'read_post', $post_parent->ID ) ) 1965 || post_password_required( $post_parent ) ) { 1966 return ''; 1967 } 1955 1968 } 1956 1969 … … 2273 2286 } 2274 2287 2288 if ( ! empty( $args['post_parent'] ) ) { 2289 $post_parent = get_post( $id ); 2290 2291 // terminate the shortcode execution if user cannot read the post or password-protected 2292 if ( ! current_user_can( 'read_post', $post_parent->ID ) || post_password_required( $post_parent ) ) { 2293 return ''; 2294 } 2295 } 2296 2275 2297 if ( empty( $attachments ) ) { 2276 2298 return '';
Note: See TracChangeset
for help on using the changeset viewer.