Changeset 47550 for trunk/src/wp-includes/link-template.php
- Timestamp:
- 04/05/2020 03:00:44 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/link-template.php
r47233 r47550 147 147 } elseif ( 'attachment' === $post->post_type ) { 148 148 return get_attachment_link( $post, $leavename ); 149 } elseif ( in_array( $post->post_type, get_post_types( array( '_builtin' => false ) ) ) ) {149 } elseif ( in_array( $post->post_type, get_post_types( array( '_builtin' => false ) ), true ) ) { 150 150 return get_post_permalink( $post, $leavename, $sample ); 151 151 } … … 166 166 $permalink = apply_filters( 'pre_post_link', $permalink, $post, $leavename ); 167 167 168 if ( '' != $permalink && ! in_array( $post->post_status, array( 'draft', 'pending', 'auto-draft', 'future' ) ) ) {168 if ( '' != $permalink && ! in_array( $post->post_status, array( 'draft', 'pending', 'auto-draft', 'future' ), true ) ) { 169 169 170 170 $category = ''; … … 276 276 $slug = $post->post_name; 277 277 278 $draft_or_pending = get_post_status( $post ) && in_array( get_post_status( $post ), array( 'draft', 'pending', 'auto-draft', 'future' ) );278 $draft_or_pending = get_post_status( $post ) && in_array( get_post_status( $post ), array( 'draft', 'pending', 'auto-draft', 'future' ), true ); 279 279 280 280 $post_type = get_post_type_object( $post->post_type ); … … 372 372 $post = get_post( $post ); 373 373 374 $draft_or_pending = in_array( $post->post_status, array( 'draft', 'pending', 'auto-draft' ) );374 $draft_or_pending = in_array( $post->post_status, array( 'draft', 'pending', 'auto-draft' ), true ); 375 375 376 376 $link = $wp_rewrite->get_page_permastruct(); … … 418 418 $post = get_post( $post ); 419 419 $parent = ( $post->post_parent > 0 && $post->post_parent != $post->ID ) ? get_post( $post->post_parent ) : false; 420 if ( $parent && ! in_array( $parent->post_type, get_post_types() ) ) {420 if ( $parent && ! in_array( $parent->post_type, get_post_types(), true ) ) { 421 421 $parent = false; 422 422 } … … 3183 3183 } 3184 3184 3185 if ( ! in_array( $scheme, array( 'http', 'https', 'relative' ) ) ) {3185 if ( ! in_array( $scheme, array( 'http', 'https', 'relative' ), true ) ) { 3186 3186 if ( is_ssl() && ! is_admin() && 'wp-login.php' !== $pagenow ) { 3187 3187 $scheme = 'https'; … … 3498 3498 $orig_scheme = $scheme; 3499 3499 3500 if ( ! in_array( $scheme, array( 'http', 'https', 'relative' ) ) ) {3500 if ( ! in_array( $scheme, array( 'http', 'https', 'relative' ), true ) ) { 3501 3501 $scheme = is_ssl() && ! is_admin() ? 'https' : 'http'; 3502 3502 }
Note: See TracChangeset
for help on using the changeset viewer.