WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/22/2011 10:30:05 PM (10 years ago)
Author:
nacin
Message:

Code readability improvements. props niallkennedy, fixes #17166, #17182, #17231, #16474.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/export.php

    r17700 r17989  
    5050        $post_types = get_post_types( array( 'can_export' => true ) );
    5151        $esses = array_fill( 0, count($post_types), '%s' );
    52         $where = $wpdb->prepare( "{$wpdb->posts}.post_type IN (". implode(',',$esses) .")", $post_types );
     52        $where = $wpdb->prepare( "{$wpdb->posts}.post_type IN (" . implode( ',', $esses ) . ')', $post_types );
    5353    }
    5454
     
    124124
    125125        // $str = ent2ncr(esc_html($str));
    126         $str = "<![CDATA[$str" . ( ( substr( $str, -1 ) == ']' ) ? ' ' : '') . "]]>";
     126        $str = "<![CDATA[$str" . ( ( substr( $str, -1 ) == ']' ) ? ' ' : '' ) . ']]>';
    127127
    128128        return $str;
     
    351351    // fetch 20 posts at a time rather than loading the entire table into memory
    352352    while ( $next_posts = array_splice( $post_ids, 0, 20 ) ) {
    353     $where = "WHERE ID IN (" . join( ',', $next_posts ) . ")";
     353    $where = 'WHERE ID IN (' . join( ',', $next_posts ) . ')';
    354354    $posts = $wpdb->get_results( "SELECT * FROM {$wpdb->posts} $where" );
    355355
Note: See TracChangeset for help on using the changeset viewer.