Ticket #3035: 3035.2.diff
File 3035.2.diff, 2.5 KB (added by , 7 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 bbdca08..12f8fe6 100644
class WordCamp_Post_Types_Plugin { 650 650 $session = get_post( $entry[ $term_id ] ); 651 651 $session_title = apply_filters( 'the_title', $session->post_title ); 652 652 $session_tracks = get_the_terms( $session->ID, 'wcb_track' ); 653 $session_categories = get_the_terms( $session->ID, 'wcb_session_category' ); 653 654 $session_track_titles = is_array( $session_tracks ) ? implode( ', ', wp_list_pluck( $session_tracks, 'name' ) ) : ''; 654 655 $session_type = get_post_meta( $session->ID, '_wcpt_session_type', true ); 655 656 … … class WordCamp_Post_Types_Plugin { 678 679 } 679 680 } 680 681 682 if ( is_array( $session_categories ) ) { 683 foreach ( $session_categories as $session_category ) { 684 $classes[] = 'wcb-session-category-' . $session_category->slug; 685 } 686 } 687 681 688 $classes[] = 'wcpt-session-type-' . $session_type; 682 689 $classes[] = 'wcb-session-' . $session->post_name; 683 690 … … class WordCamp_Post_Types_Plugin { 2040 2047 'rest_base' => 'session_track', 2041 2048 ) ); 2042 2049 2050 // Labels for categories. 2051 $labels = array( 2052 'name' => __( 'Categories', 'wordcamporg' ), 2053 'singular_name' => __( 'Category', 'wordcamporg' ), 2054 'search_items' => __( 'Search Categories', 'wordcamporg' ), 2055 'popular_items' => __( 'Popular Categories','wordcamporg' ), 2056 'all_items' => __( 'All Categories', 'wordcamporg' ), 2057 'edit_item' => __( 'Edit Category', 'wordcamporg' ), 2058 'update_item' => __( 'Update Category', 'wordcamporg' ), 2059 'add_new_item' => __( 'Add Category', 'wordcamporg' ), 2060 'new_item_name' => __( 'New Category', 'wordcamporg' ), 2061 ); 2062 2063 // Register the Categories taxonomy. 2064 register_taxonomy( 'wcb_session_category', 'wcb_session', array( 2065 'labels' => $labels, 2066 'rewrite' => array( 'slug' => 'session_category' ), 2067 'query_var' => 'session_category', 2068 'hierarchical' => true, 2069 'public' => true, 2070 'show_ui' => true, 2071 'show_in_rest' => true, 2072 'rest_base' => 'session_category', 2073 ) ); 2074 2043 2075 // Labels for sponsor levels. 2044 2076 $labels = array( 2045 2077 'name' => __( 'Sponsor Levels', 'wordcamporg' ),