Changeset 4349 for sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php
- Timestamp:
- 11/11/2016 09:44:06 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
r4172 r4349 405 405 'posts_per_page' => -1, 406 406 'orderby' => 'date', 407 'teams' => '', 407 408 ), $attr ); 408 409 … … 411 412 $attr['orderby'] = ( in_array( $attr['orderby'], array( 'date', 'title', 'rand' ) ) ) ? $attr['orderby'] : 'date'; 412 413 413 $ organizers = new WP_Query(array(414 $query_args = array( 414 415 'post_type' => 'wcb_organizer', 415 416 'posts_per_page' => intval( $attr['posts_per_page'] ), 416 417 'orderby' => $attr['orderby'], 417 ) ); 418 ); 419 420 if ( ! empty( $attr['teams'] ) ) { 421 $query_args['tax_query'] = array( 422 array( 423 'taxonomy' => 'wcb_organizer_team', 424 'field' => 'slug', 425 'terms' => explode( ',', $attr['teams'] ), 426 ), 427 ); 428 } 429 430 $organizers = new WP_Query( $query_args ); 418 431 419 432 if ( ! $organizers->have_posts() ) … … 2004 2017 'show_ui' => true, 2005 2018 ) ); 2019 2020 // Labels for organizer teams. 2021 $labels = array( 2022 'name' => __( 'Teams', 'wordcamporg' ), 2023 'singular_name' => __( 'Team', 'wordcamporg' ), 2024 'search_items' => __( 'Search Teams', 'wordcamporg' ), 2025 'popular_items' => __( 'Popular Teams', 'wordcamporg' ), 2026 'all_items' => __( 'All Teams', 'wordcamporg' ), 2027 'edit_item' => __( 'Edit Team', 'wordcamporg' ), 2028 'update_item' => __( 'Update Team', 'wordcamporg' ), 2029 'add_new_item' => __( 'Add Team', 'wordcamporg' ), 2030 'new_item_name' => __( 'New Team', 'wordcamporg' ), 2031 ); 2032 2033 // Register organizer teams taxonomy 2034 register_taxonomy( 2035 'wcb_organizer_team', 2036 'wcb_organizer', 2037 array( 2038 'labels' => $labels, 2039 'rewrite' => array( 'slug' => 'team' ), 2040 'query_var' => 'team', 2041 'hierarchical' => true, 2042 'public' => true, 2043 'show_ui' => true, 2044 ) 2045 ); 2006 2046 } 2007 2047
Note: See TracChangeset
for help on using the changeset viewer.