Changeset 47219 for trunk/src/wp-includes/post.php
- Timestamp:
- 02/09/2020 04:52:28 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r47203 r47219 677 677 } 678 678 679 if ( $output == OBJECT) {679 if ( OBJECT == $output ) { 680 680 return $kids; 681 } elseif ( $output == ARRAY_A) {681 } elseif ( ARRAY_A == $output ) { 682 682 $weeuns = array(); 683 683 foreach ( (array) $kids as $kid ) { … … 685 685 } 686 686 return $weeuns; 687 } elseif ( $output == ARRAY_N) {687 } elseif ( ARRAY_N == $output ) { 688 688 $babes = array(); 689 689 foreach ( (array) $kids as $kid ) { … … 785 785 $_post = $_post->filter( $filter ); 786 786 787 if ( $output == ARRAY_A) {787 if ( ARRAY_A == $output ) { 788 788 return $_post->to_array(); 789 } elseif ( $output == ARRAY_N) {789 } elseif ( ARRAY_N == $output ) { 790 790 return array_values( $_post->to_array() ); 791 791 } … … 1807 1807 $ptype_obj = get_post_type_object( $ptype ); 1808 1808 // Sub-menus only. 1809 if ( ! $ptype_obj->show_in_menu || $ptype_obj->show_in_menu === true) {1809 if ( ! $ptype_obj->show_in_menu || true === $ptype_obj->show_in_menu ) { 1810 1810 continue; 1811 1811 } … … 4214 4214 } 4215 4215 4216 if ( $postarr['post_type'] == 'attachment') {4216 if ( 'attachment' === $postarr['post_type'] ) { 4217 4217 return wp_insert_attachment( $postarr, false, 0, $wp_error ); 4218 4218 } … … 4960 4960 * ensuring each matches the post ancestry. 4961 4961 */ 4962 while ( $p->post_parent != 0&& isset( $pages[ $p->post_parent ] ) ) {4962 while ( 0 != $p->post_parent && isset( $pages[ $p->post_parent ] ) ) { 4963 4963 $count++; 4964 4964 $parent = $pages[ $p->post_parent ]; … … 4969 4969 } 4970 4970 4971 if ( $p->post_parent == 0 && $count + 1 == count( $revparts )&& $p->post_name == $revparts[ $count ] ) {4971 if ( 0 == $p->post_parent && count( $revparts ) == $count + 1 && $p->post_name == $revparts[ $count ] ) { 4972 4972 $foundid = $page->ID; 4973 4973 if ( $page->post_type == $post_type ) { … … 6748 6748 global $wpdb; 6749 6749 6750 if ( $old_status != 'publish' && $new_status == 'publish') {6750 if ( 'publish' !== $old_status && 'publish' === $new_status ) { 6751 6751 // Reset GUID if transitioning to publish and it is empty. 6752 6752 if ( '' == get_the_guid( $post->ID ) ) {
Note: See TracChangeset
for help on using the changeset viewer.