WordPress.org

Making WordPress.org

Changeset 3042


Ignore:
Timestamp:
04/28/16 21:00:06 (20 months ago)
Author:
iandunn
Message:

WordCamp Post Types: Remove unnecessary hack to fix sorting sessions by time.

The problem with meta queries was fixed in [wp27689], and after that was deployed, this hack caused sorting by time to break.

Props juanfra
Fixes #1659

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php

    r2743 r3042  
    181181        // Order by session time 
    182182        if ( 'edit-wcb_session' == $current_screen->id && $query->get( 'orderby' ) == '_wcpt_session_time' ) { 
    183  
    184             // Voodoo because of http://core.trac.wordpress.org/ticket/23268 
    185             $query->set( 'meta_query', array( 
    186                 'relation' => 'OR', 
    187                 array( 
    188                     'key'     => '_wcpt_session_time', 
    189                     'value'   => '', 
    190                     'compare' => 'EXISTS', 
    191                 ), 
    192                 array( 
    193                     'key'     => '_wcpt_session_time', 
    194                     'value'   => '', 
    195                     'compare' => 'NOT EXISTS', 
    196                 ), 
    197             ) ); 
    198183            $query->set( 'meta_key', '_wcpt_session_time' ); 
    199184            $query->set( 'orderby', 'meta_value_num' ); 
Note: See TracChangeset for help on using the changeset viewer.