Changeset 6013 for sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php
- Timestamp:
- 10/09/2017 11:21:08 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php
r5854 r6013 915 915 'speaker_link' => 'wporg', // anchor|wporg|permalink|none 916 916 'posts_per_page' => -1, 917 'orderby' => 'date', // date|title|rand 917 'orderby' => 'date', // date|title|rand|session_time 918 918 'order' => 'desc', // asc|desc 919 919 ), $attr ); … … 934 934 $attr['speaker_link'] = 'anchor'; // todo this is inconsistent with the values passed to shortcode_atts, and probably not needed if the default above is changed to 'anchor' 935 935 936 $attr['orderby'] = ( in_array( $attr['orderby'], array( 'date', 'title', 'rand' ) ) ) ? $attr['orderby'] : 'date';936 $attr['orderby'] = ( in_array( $attr['orderby'], array( 'date', 'title', 'rand', 'session_time' ) ) ) ? $attr['orderby'] : 'date'; 937 937 938 938 if ( 'asc' != $attr['order'] ) { … … 988 988 'terms' => $attr['track'], 989 989 ); 990 } 991 992 // Order by session date/time. 993 if ( 'session_time' === $args['orderby'] ) { 994 $args['meta_key'] = '_wcpt_session_time'; 995 $args['orderby'] = 'meta_value_num title'; 990 996 } 991 997
Note: See TracChangeset
for help on using the changeset viewer.