Make WordPress Core

Changeset 28605


Ignore:
Timestamp:
05/29/2014 12:23:45 AM (10 years ago)
Author:
wonderboymusic
Message:

Allow users to sort posts by type in WP_Query.

Props DeBAAT.
Fixes #28214.

File:
1 edited

Legend:

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

    r28541 r28605  
    26232623        } else {
    26242624            // Used to filter values
    2625             $allowed_keys = array('name', 'author', 'date', 'title', 'modified', 'menu_order', 'parent', 'ID', 'rand', 'comment_count');
     2625            $allowed_keys = array( 'name', 'author', 'date', 'title', 'modified', 'menu_order', 'parent', 'ID', 'rand', 'comment_count', 'type' );
    26262626            if ( !empty($q['meta_key']) ) {
    26272627                $allowed_keys[] = $q['meta_key'];
Note: See TracChangeset for help on using the changeset viewer.