WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/03/2007 11:32:58 PM (13 years ago)
Author:
ryan
Message:

Remove trailing whitespace

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r5976 r6026  
    4242
    4343    $defaults = array(
    44         'numberposts' => -1, 'post_type' => '', 
     44        'numberposts' => -1, 'post_type' => '',
    4545        'post_status' => '', 'post_parent' => 0
    4646    );
     
    195195
    196196    $defaults = array(
    197         'numberposts' => 5, 'offset' => 0, 
    198         'category' => 0, 'orderby' => 'post_date', 
    199         'order' => 'DESC', 'include' => '', 
    200         'exclude' => '', 'meta_key' => '', 
    201         'meta_value' =>'', 'post_type' => 'post', 
     197        'numberposts' => 5, 'offset' => 0,
     198        'category' => 0, 'orderby' => 'post_date',
     199        'order' => 'DESC', 'include' => '',
     200        'exclude' => '', 'meta_key' => '',
     201        'meta_value' =>'', 'post_type' => 'post',
    202202        'post_status' => 'publish', 'post_parent' => 0
    203203    );
     
    249249
    250250    $query  = "SELECT DISTINCT * FROM $wpdb->posts ";
    251     $query .= empty( $category ) ? '' : ", $wpdb->term_relationships, $wpdb->term_taxonomy  "; 
     251    $query .= empty( $category ) ? '' : ", $wpdb->term_relationships, $wpdb->term_taxonomy  ";
    252252    $query .= empty( $meta_key ) ? '' : ", $wpdb->postmeta ";
    253253    $query .= " WHERE 1=1 ";
     
    440440            $post->$field = sanitize_post_field($field, $post->$field, $post->ID, $context);
    441441        else
    442             $post[$field] = sanitize_post_field($field, $post[$field], $post['ID'], $context); 
     442            $post[$field] = sanitize_post_field($field, $post[$field], $post['ID'], $context);
    443443    }
    444444
     
    11151115
    11161116    $defaults = array(
    1117         'child_of' => 0, 'sort_order' => 'ASC', 
    1118         'sort_column' => 'post_title', 'hierarchical' => 1, 
    1119         'exclude' => '', 'include' => '', 
    1120         'meta_key' => '', 'meta_value' => '', 
     1117        'child_of' => 0, 'sort_order' => 'ASC',
     1118        'sort_column' => 'post_title', 'hierarchical' => 1,
     1119        'exclude' => '', 'include' => '',
     1120        'meta_key' => '', 'meta_value' => '',
    11211121        'authors' => ''
    11221122    );
     
    11321132    $inclusions = '';
    11331133    if ( !empty($include) ) {
    1134         $child_of = 0; //ignore child_of, exclude, meta_key, and meta_value params if using include 
     1134        $child_of = 0; //ignore child_of, exclude, meta_key, and meta_value params if using include
    11351135        $exclude = '';
    11361136        $meta_key = '';
     
    11611161        }
    11621162    }
    1163     if (!empty($exclusions)) 
     1163    if (!empty($exclusions))
    11641164        $exclusions .= ')';
    11651165
     
    11911191
    11921192    $query = "SELECT * FROM $wpdb->posts " ;
    1193     $query .= ( empty( $meta_key ) ? "" : ", $wpdb->postmeta " ) ; 
     1193    $query .= ( empty( $meta_key ) ? "" : ", $wpdb->postmeta " ) ;
    11941194    $query .= " WHERE (post_type = 'page' AND post_status = 'publish') $exclusions $inclusions " ;
    11951195    $query .= ( empty( $meta_key ) | empty($meta_value)  ? "" : " AND ($wpdb->posts.ID = $wpdb->postmeta.post_id AND $wpdb->postmeta.meta_key = '$meta_key' AND $wpdb->postmeta.meta_value = '$meta_value' )" ) ;
     
    16221622 * to allow all published posts, and all private posts to which the user
    16231623 * has access.
    1624  * 
     1624 *
    16251625 * @param string $post_type currently only supports 'post' or 'page'.
    16261626 * @return string SQL code that can be added to a where clause.
Note: See TracChangeset for help on using the changeset viewer.