Changeset 5545
- Timestamp:
- 06/06/2017 07:40:01 PM (8 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
r5533 r5545 280 280 'orderby' => 'date', 281 281 'order' => 'desc', 282 'track' => ' all',282 'track' => '', 283 283 'speaker_link' => '', 284 284 ), $attr ); … … 292 292 $attr['order'] = in_array( $attr['order'], array( 'asc', 'desc' ) ) ? $attr['order'] : 'desc'; 293 293 $attr['speaker_link'] = in_array( $attr['speaker_link'], array( 'permalink' ) ) ? $attr['speaker_link'] : ''; 294 295 /* 296 * Only allow 2014.capetown to use the new track attribute 297 * @todo Remove this and update docs after stakeholder review 298 */ 299 if ( ! in_array( get_current_blog_id(), apply_filters( 'wcpt_filter_speakers_by_track_allowed_sites', array( 423 ) ) ) ) { 300 $attr['track'] = 'all'; 301 } 294 $attr['track'] = array_map( 'trim', explode( ',', $attr['track'] ) ); 302 295 303 296 // Fetch all the relevant sessions … … 307 300 ); 308 301 309 if ( 'all' != $attr['track']) {302 if ( ! empty( $attr['track'] ) ) { 310 303 $session_args['tax_query'] = array( 311 304 array( 312 305 'taxonomy' => 'wcb_track', 313 306 'field' => 'slug', 314 'terms' => explode( ',', $attr['track'] ),307 'terms' => $attr['track'], 315 308 ), 316 309 ); … … 351 344 ); 352 345 353 if ( 'all' != $attr['track']) {346 if ( ! empty( $attr['track'] ) ) { 354 347 $speaker_args['post__in'] = $speaker_ids; 355 348 }
Note: See TracChangeset
for help on using the changeset viewer.