Make WordPress Core

Changeset 16353


Ignore:
Timestamp:
11/13/2010 06:32:43 PM (14 years ago)
Author:
scribu
Message:

Kill WP_Object_Query. See #15032

Location:
trunk
Files:
1 deleted
5 edited

Legend:

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

    r16351 r16353  
    198198 * @since 3.1.0
    199199 */
    200 class WP_Comment_Query extends WP_Object_Query {
     200class WP_Comment_Query {
    201201
    202202    /**
  • trunk/wp-includes/meta.php

    r16286 r16353  
    445445}
    446446
     447/*
     448 * Populates the $meta_query property
     449 *
     450 * @access private
     451 * @since 3.1.0
     452 *
     453 * @param array $qv The query variables
     454 */
     455function _parse_meta_query( &$qv ) {
     456    $meta_query = array();
     457
     458    // Simple query needs to be first for orderby=meta_value to work correctly
     459    foreach ( array( 'key', 'value', 'compare', 'type' ) as $key ) {
     460        if ( !empty( $qv[ "meta_$key" ] ) )
     461            $meta_query[0][ $key ] = $qv[ "meta_$key" ];
     462    }
     463
     464    if ( !empty( $qv['meta_query'] ) && is_array( $qv['meta_query'] ) ) {
     465        $meta_query = array_merge( $meta_query, $qv['meta_query'] );
     466    }
     467
     468    $qv['meta_query'] = $meta_query;
     469}
     470
    447471/**
    448472 * Retrieve the name of the metadata table for the specified object type.
  • trunk/wp-includes/query.php

    r16352 r16353  
    689689 * @since 1.5.0
    690690 */
    691 class WP_Query extends WP_Object_Query {
     691class WP_Query {
    692692
    693693    /**
     
    13481348            $this->parse_tax_query( $qv );
    13491349
    1350             $this->parse_meta_query( $qv );
     1350            _parse_meta_query( $qv );
    13511351
    13521352            if ( empty($qv['author']) || ($qv['author'] == '0') ) {
  • trunk/wp-includes/user.php

    r16351 r16353  
    331331 * @since 3.1.0
    332332 */
    333 class WP_User_Query extends WP_Object_Query {
     333class WP_User_Query {
    334334
    335335    /**
     
    464464        }
    465465
    466         $this->parse_meta_query( $qv );
     466        _parse_meta_query( $qv );
    467467
    468468        $role = trim( $qv['role'] );
  • trunk/wp-settings.php

    r16142 r16353  
    104104require( ABSPATH . WPINC . '/class-wp-walker.php' );
    105105require( ABSPATH . WPINC . '/class-wp-ajax-response.php' );
    106 require( ABSPATH . WPINC . '/class-wp-object-query.php' );
    107106require( ABSPATH . WPINC . '/formatting.php' );
    108107require( ABSPATH . WPINC . '/capabilities.php' );
Note: See TracChangeset for help on using the changeset viewer.