Changeset 5834 for trunk/src/bbpress.php
- Timestamp:
- 07/15/2015 03:59:23 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bbpress.php
r5829 r5834 224 224 // Post type identifiers 225 225 $this->forum_post_type = apply_filters( 'bbp_forum_post_type', 'forum' ); 226 $this->forum_mod_tax_id = apply_filters( 'bbp_forum_mod_tax_id', 'forum-mod' ); 226 227 $this->topic_post_type = apply_filters( 'bbp_topic_post_type', 'topic' ); 228 $this->topic_tag_tax_id = apply_filters( 'bbp_topic_tag_tax_id', 'topic-tag' ); 227 229 $this->reply_post_type = apply_filters( 'bbp_reply_post_type', 'reply' ); 228 $this->topic_tag_tax_id = apply_filters( 'bbp_topic_tag_tax_id', 'topic-tag' );229 230 230 231 // Status identifiers … … 652 653 653 654 /** 654 * Register the topic tag taxonomy 655 * 656 * @since bbPress (r2464) 655 * Register the topic tag and forum moderator taxonomies 656 * 657 * @since bbPress (r2464) Added bbp_get_topic_tag_tax_id() taxonomy 658 * @since bbPress (r5834) Added bbp_get_forum_mod_tax_id() taxonomy 659 * 657 660 * @uses register_taxonomy() To register the taxonomy 661 * @uses bbp_get_topic_post_type() To get the topic post type 662 * @uses bbp_get_topic_tag_tax_labels() To get the topic tag taxonomy labels 663 * @uses bbp_get_topic_tag_tax_rewrite() To get the topic tag taxonomy slug 664 * @uses bbp_get_topic_tag_caps() To get topic tag capabilities 665 * @uses bbp_allow_topic_tags() To check if topic tags are allowed 666 * @uses current_user_can() To check if the current user can edit/delete tags 667 * @uses bbp_get_forum_post_type() To get the forum post type 668 * @uses bbp_get_forum_mod_tax_labels() To get the forum moderator taxonomy label 669 * @uses bbp_get_forum_mod_caps() To check the forum moderator capabilities 670 * @uses bbp_allow_forum_mods() To check if forum moderators are allowed 671 * @uses current_user_can() To check if the current user can edit/delete forums 658 672 */ 659 673 public static function register_taxonomies() { 660 674 661 // Register the topic-tag taxonomy 675 // Register the topic-tag taxonomy. 662 676 register_taxonomy( 663 677 bbp_get_topic_tag_tax_id(), … … 673 687 'show_in_nav_menus' => false, 674 688 'public' => true, 675 'show_ui' => bbp_allow_topic_tags() && current_user_can( 'bbp_topic_tags_admin' ) 689 'show_ui' => bbp_allow_topic_tags() && current_user_can( 'bbp_topic_tags_admin' ), 690 ) 691 ) ); 692 693 // Register the forum-mod taxonomy. 694 register_taxonomy( 695 bbp_get_forum_mod_tax_id(), 696 bbp_get_forum_post_type(), 697 apply_filters( 'bbp_register_forum_moderator_taxonomy', array( 698 'labels' => bbp_get_forum_mod_tax_labels(), 699 'capabilities' => bbp_get_forum_mod_caps(), 700 'update_count_callback' => '_update_post_term_count', 701 'query_var' => false, 702 'show_tagcloud' => true, 703 'hierarchical' => false, 704 'show_in_menu' => true, 705 'show_in_nav_menus' => false, 706 'public' => false, 707 'show_ui' => bbp_allow_forum_mods() && current_user_can( 'bbp_forum_mods_admin' ), 676 708 ) 677 709 ) );
Note: See TracChangeset
for help on using the changeset viewer.