Changeset 5131 for trunk/bbpress.php
- Timestamp:
- 10/17/2013 04:37:14 AM (13 years ago)
- File:
-
- 1 edited
-
trunk/bbpress.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bbpress.php
r5129 r5131 457 457 // Look in local /wp-content/plugins/bbpress/bbp-languages/ folder 458 458 load_textdomain( $this->domain, $mofile_local ); 459 460 // Look in global /wp-content/languages/plugins/ 461 load_plugin_textdomain( $this->domain ); 459 462 } 460 463 … … 469 472 public static function register_post_types() { 470 473 471 // Define local variable(s)472 $post_type = array();473 474 474 /** Forums ************************************************************/ 475 476 // Forum labels477 $post_type['labels'] = array(478 'name' => __( 'Forums', 'bbpress' ),479 'menu_name' => __( 'Forums', 'bbpress' ),480 'singular_name' => __( 'Forum', 'bbpress' ),481 'all_items' => __( 'All Forums', 'bbpress' ),482 'add_new' => __( 'New Forum', 'bbpress' ),483 'add_new_item' => __( 'Create New Forum', 'bbpress' ),484 'edit' => __( 'Edit', 'bbpress' ),485 'edit_item' => __( 'Edit Forum', 'bbpress' ),486 'new_item' => __( 'New Forum', 'bbpress' ),487 'view' => __( 'View Forum', 'bbpress' ),488 'view_item' => __( 'View Forum', 'bbpress' ),489 'search_items' => __( 'Search Forums', 'bbpress' ),490 'not_found' => __( 'No forums found', 'bbpress' ),491 'not_found_in_trash' => __( 'No forums found in Trash', 'bbpress' ),492 'parent_item_colon' => __( 'Parent Forum:', 'bbpress' )493 );494 495 // Forum rewrite496 $post_type['rewrite'] = array(497 'slug' => bbp_get_forum_slug(),498 'with_front' => false499 );500 501 // Forum supports502 $post_type['supports'] = array(503 'title',504 'editor',505 'revisions'506 );507 475 508 476 // Register Forum content type … … 510 478 bbp_get_forum_post_type(), 511 479 apply_filters( 'bbp_register_forum_post_type', array( 512 'labels' => $post_type['labels'],513 'rewrite' => $post_type['rewrite'],514 'supports' => $post_type['supports'],480 'labels' => bbp_get_forum_post_type_labels(), 481 'rewrite' => bbp_get_forum_post_type_rewrite(), 482 'supports' => bbp_get_forum_post_type_supports(), 515 483 'description' => __( 'bbPress Forums', 'bbpress' ), 516 484 'capabilities' => bbp_get_forum_caps(), … … 531 499 /** Topics ************************************************************/ 532 500 533 // Topic labels534 $post_type['labels'] = array(535 'name' => __( 'Topics', 'bbpress' ),536 'menu_name' => __( 'Topics', 'bbpress' ),537 'singular_name' => __( 'Topic', 'bbpress' ),538 'all_items' => __( 'All Topics', 'bbpress' ),539 'add_new' => __( 'New Topic', 'bbpress' ),540 'add_new_item' => __( 'Create New Topic', 'bbpress' ),541 'edit' => __( 'Edit', 'bbpress' ),542 'edit_item' => __( 'Edit Topic', 'bbpress' ),543 'new_item' => __( 'New Topic', 'bbpress' ),544 'view' => __( 'View Topic', 'bbpress' ),545 'view_item' => __( 'View Topic', 'bbpress' ),546 'search_items' => __( 'Search Topics', 'bbpress' ),547 'not_found' => __( 'No topics found', 'bbpress' ),548 'not_found_in_trash' => __( 'No topics found in Trash', 'bbpress' ),549 'parent_item_colon' => __( 'Forum:', 'bbpress' )550 );551 552 // Topic rewrite553 $post_type['rewrite'] = array(554 'slug' => bbp_get_topic_slug(),555 'with_front' => false556 );557 558 // Topic supports559 $post_type['supports'] = array(560 'title',561 'editor',562 'revisions'563 );564 565 501 // Register Topic content type 566 502 register_post_type( 567 503 bbp_get_topic_post_type(), 568 504 apply_filters( 'bbp_register_topic_post_type', array( 569 'labels' => $post_type['labels'],570 'rewrite' => $post_type['rewrite'],571 'supports' => $post_type['supports'],505 'labels' => bbp_get_topic_post_type_labels(), 506 'rewrite' => bbp_get_topic_post_type_rewrite(), 507 'supports' => bbp_get_topic_post_type_supports(), 572 508 'description' => __( 'bbPress Topics', 'bbpress' ), 573 509 'capabilities' => bbp_get_topic_caps(), … … 588 524 /** Replies ***********************************************************/ 589 525 590 // Reply labels591 $post_type['labels'] = array(592 'name' => __( 'Replies', 'bbpress' ),593 'menu_name' => __( 'Replies', 'bbpress' ),594 'singular_name' => __( 'Reply', 'bbpress' ),595 'all_items' => __( 'All Replies', 'bbpress' ),596 'add_new' => __( 'New Reply', 'bbpress' ),597 'add_new_item' => __( 'Create New Reply', 'bbpress' ),598 'edit' => __( 'Edit', 'bbpress' ),599 'edit_item' => __( 'Edit Reply', 'bbpress' ),600 'new_item' => __( 'New Reply', 'bbpress' ),601 'view' => __( 'View Reply', 'bbpress' ),602 'view_item' => __( 'View Reply', 'bbpress' ),603 'search_items' => __( 'Search Replies', 'bbpress' ),604 'not_found' => __( 'No replies found', 'bbpress' ),605 'not_found_in_trash' => __( 'No replies found in Trash', 'bbpress' ),606 'parent_item_colon' => __( 'Topic:', 'bbpress' )607 );608 609 // Reply rewrite610 $post_type['rewrite'] = array(611 'slug' => bbp_get_reply_slug(),612 'with_front' => false613 );614 615 // Reply supports616 $post_type['supports'] = array(617 'title',618 'editor',619 'revisions'620 );621 622 526 // Register reply content type 623 527 register_post_type( 624 528 bbp_get_reply_post_type(), 625 529 apply_filters( 'bbp_register_reply_post_type', array( 626 'labels' => $post_type['labels'],627 'rewrite' => $post_type['rewrite'],628 'supports' => $post_type['supports'],530 'labels' => bbp_get_reply_post_type_labels(), 531 'rewrite' => bbp_get_reply_post_type_rewrite(), 532 'supports' => bbp_get_reply_post_type_supports(), 629 533 'description' => __( 'bbPress Replies', 'bbpress' ), 630 534 'capabilities' => bbp_get_reply_caps(), … … 740 644 public static function register_taxonomies() { 741 645 742 // Define local variable(s) 743 $topic_tag = array(); 744 745 // Topic tag labels 746 $topic_tag['labels'] = array( 747 'name' => __( 'Topic Tags', 'bbpress' ), 748 'singular_name' => __( 'Topic Tag', 'bbpress' ), 749 'search_items' => __( 'Search Tags', 'bbpress' ), 750 'popular_items' => __( 'Popular Tags', 'bbpress' ), 751 'all_items' => __( 'All Tags', 'bbpress' ), 752 'edit_item' => __( 'Edit Tag', 'bbpress' ), 753 'update_item' => __( 'Update Tag', 'bbpress' ), 754 'add_new_item' => __( 'Add New Tag', 'bbpress' ), 755 'new_item_name' => __( 'New Tag Name', 'bbpress' ), 756 'view_item' => __( 'View Topic Tag', 'bbpress' ) 757 ); 758 759 // Topic tag rewrite 760 $topic_tag['rewrite'] = array( 761 'slug' => bbp_get_topic_tag_tax_slug(), 762 'with_front' => false 763 ); 764 765 // Register the topic tag taxonomy 646 // Register the topic-tag taxonomy 766 647 register_taxonomy( 767 648 bbp_get_topic_tag_tax_id(), 768 649 bbp_get_topic_post_type(), 769 650 apply_filters( 'bbp_register_topic_taxonomy', array( 770 'labels' => $topic_tag['labels'],771 'rewrite' => $topic_tag['rewrite'],651 'labels' => bbp_get_topic_tag_tax_labels(), 652 'rewrite' => bbp_get_topic_tag_tax_rewrite(), 772 653 'capabilities' => bbp_get_topic_tag_caps(), 773 654 'update_count_callback' => '_update_post_term_count',
Note: See TracChangeset
for help on using the changeset viewer.