WordPress.org

Make WordPress Core

Changeset 28736


Ignore:
Timestamp:
06/11/2014 05:40:11 PM (5 years ago)
Author:
wonderboymusic
Message:

Don't use variable variables in get_terms().

See #27881.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/taxonomy.php

    r28733 r28736  
    15721572     */
    15731573    $clauses = apply_filters( 'terms_clauses', compact( $pieces ), $taxonomies, $args );
    1574     foreach ( $pieces as $piece ) {
    1575         $$piece = isset( $clauses[ $piece ] ) ? $clauses[ $piece ] : '';
    1576     }
     1574    $fields = isset( $clauses[ 'fields' ] ) ? $clauses[ 'fields' ] : '';
     1575    $join = isset( $clauses[ 'join' ] ) ? $clauses[ 'join' ] : '';
     1576    $where = isset( $clauses[ 'where' ] ) ? $clauses[ 'where' ] : '';
     1577    $orderby = isset( $clauses[ 'orderby' ] ) ? $clauses[ 'orderby' ] : '';
     1578    $order = isset( $clauses[ 'order' ] ) ? $clauses[ 'order' ] : '';
     1579    $limits = isset( $clauses[ 'limits' ] ) ? $clauses[ 'limits' ] : '';
     1580
    15771581    $query = "SELECT $fields FROM $wpdb->terms AS t $join WHERE $where $orderby $order $limits";
    15781582
Note: See TracChangeset for help on using the changeset viewer.