Ticket #547: meta-547.diff
File meta-547.diff, 1.0 KB (added by , 10 years ago) |
---|
-
plugins/wc-post-types/wc-post-types.php
741 741 'track' => 'all', 742 742 'speaker_link' => 'wporg', // anchor|wporg|none 743 743 'posts_per_page' => -1, 744 'orderby' => 'date', 744 'orderby' => 'date', // date|title|rand 745 'order' => 'desc', // asc|desc 745 746 ), $attr ); 746 747 747 748 // Convert bools to real booleans. … … 757 758 758 759 $attr['orderby'] = ( in_array( $attr['orderby'], array( 'date', 'title', 'rand' ) ) ) ? $attr['orderby'] : 'date'; 759 760 761 if ( $attr['order'] != 'asc' ){ 762 $attr['order'] = 'desc'; 763 } 764 760 765 $args = array( 761 766 'post_type' => 'wcb_session', 762 767 'posts_per_page' => intval( $attr['posts_per_page'] ), 763 768 'tax_query' => array(), 764 769 'orderby' => $attr['orderby'], 770 'order' => $attr['order'], 765 771 766 772 // Only ones marked "session" or where the meta key does 767 773 // not exist, for backwards compatibility.