Making WordPress.org

Ticket #2808: 2808.diff

File 2808.diff, 1.1 KB (added by chandrapatel, 8 years ago)
  • wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php

    diff --git wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php
    index fb2f2f34..696a0539 100644
    class WordCamp_Post_Types_Plugin { 
    413413                        'avatar_size'    => 100,
    414414                        'posts_per_page' => -1,
    415415                        'orderby'        => 'date',
     416                        'order'          => 'desc',
    416417                        'teams'          => '',
    417418                ), $attr );
    418419
    419420                $attr['show_avatars'] = $this->str_to_bool( $attr['show_avatars'] );
    420421                $attr['orderby'] = strtolower( $attr['orderby'] );
    421422                $attr['orderby'] = ( in_array( $attr['orderby'], array( 'date', 'title', 'rand' ) ) ) ? $attr['orderby'] : 'date';
     423                $attr['order']   = ( in_array( $attr['order'], array( 'asc', 'desc' ), true ) ) ? $attr['order'] : 'desc';
    422424
    423425                $query_args = array(
    424426                        'post_type' => 'wcb_organizer',
    425427                        'posts_per_page' => intval( $attr['posts_per_page'] ),
    426428                        'orderby' => $attr['orderby'],
     429                        'order' => $attr['order'],
    427430                );
    428431
    429432                if ( ! empty( $attr['teams'] ) ) {