Changeset 47808 for trunk/src/wp-admin/includes/export.php
- Timestamp:
- 05/16/2020 06:40:52 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/export.php
r47789 r47808 97 97 header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true ); 98 98 99 if ( 'all' != $args['content'] && post_type_exists( $args['content'] ) ) {99 if ( 'all' !== $args['content'] && post_type_exists( $args['content'] ) ) { 100 100 $ptype = get_post_type_object( $args['content'] ); 101 101 if ( ! $ptype->can_export ) { … … 112 112 } 113 113 114 if ( $args['status'] && ( 'post' == $args['content'] || 'page'== $args['content'] ) ) {114 if ( $args['status'] && ( 'post' === $args['content'] || 'page' === $args['content'] ) ) { 115 115 $where .= $wpdb->prepare( " AND {$wpdb->posts}.post_status = %s", $args['status'] ); 116 116 } else { … … 119 119 120 120 $join = ''; 121 if ( $args['category'] && 'post' == $args['content'] ) {121 if ( $args['category'] && 'post' === $args['content'] ) { 122 122 $term = term_exists( $args['category'], 'category' ); 123 123 if ( $term ) { … … 127 127 } 128 128 129 if ( 'post' == $args['content'] || 'page' == $args['content'] || 'attachment' == $args['content']) {129 if ( in_array( $args['content'], array( 'post', 'page', 'attachment' ), true ) ) { 130 130 if ( $args['author'] ) { 131 131 $where .= $wpdb->prepare( " AND {$wpdb->posts}.post_author = %d", $args['author'] ); … … 155 155 $cats = array( $cat->term_id => $cat ); 156 156 unset( $term, $cat ); 157 } elseif ( 'all' == $args['content'] ) {157 } elseif ( 'all' === $args['content'] ) { 158 158 $categories = (array) get_categories( array( 'get' => 'all' ) ); 159 159 $tags = (array) get_tags( array( 'get' => 'all' ) ); … … 429 429 */ 430 430 function wxr_filter_postmeta( $return_me, $meta_key ) { 431 if ( '_edit_lock' == $meta_key ) {431 if ( '_edit_lock' === $meta_key ) { 432 432 $return_me = true; 433 433 } … … 514 514 <?php endforeach; ?> 515 515 <?php 516 if ( 'all' == $args['content'] ) {516 if ( 'all' === $args['content'] ) { 517 517 wxr_nav_menu_terms();} 518 518 ?>
Note: See TracChangeset
for help on using the changeset viewer.