Making WordPress.org

Changeset 5567


Ignore:
Timestamp:
06/15/2017 11:53:46 AM (8 years ago)
Author:
coreymckrill
Message:

WordCamp Post Types: Add missing order attribute to [organizers]

Props chandrapatel
Fixes #2808

File:
1 edited

Legend:

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

    r5547 r5567  
    419419            'posts_per_page' => -1,
    420420            'orderby'        => 'date',
     421            'order'          => 'desc',
    421422            'teams'          => '',
    422423        ), $attr );
     
    425426        $attr['orderby'] = strtolower( $attr['orderby'] );
    426427        $attr['orderby'] = ( in_array( $attr['orderby'], array( 'date', 'title', 'rand' ) ) ) ? $attr['orderby'] : 'date';
     428        $attr['order']   = strtolower( $attr['order'] );
     429        $attr['order']   = ( in_array( $attr['order'], array( 'asc', 'desc' ), true ) ) ? $attr['order'] : 'desc';
    427430
    428431        $query_args = array(
    429             'post_type' => 'wcb_organizer',
     432            'post_type'      => 'wcb_organizer',
    430433            'posts_per_page' => intval( $attr['posts_per_page'] ),
    431             'orderby' => $attr['orderby'],
     434            'orderby'        => $attr['orderby'],
     435            'order'          => $attr['order'],
    432436        );
    433437
Note: See TracChangeset for help on using the changeset viewer.