Changeset 6583 for trunk/src/includes/core/template-functions.php
- Timestamp:
- 06/19/2017 04:29:43 AM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/includes/core/template-functions.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/core/template-functions.php
r6573 r6583 532 532 // 404 and bail if user does not have a profile 533 533 if ( empty( $the_user->ID ) || ! bbp_user_has_profile( $the_user->ID ) ) { 534 $posts_query-> set_404();534 $posts_query->bbp_is_404 = true; 535 535 return; 536 536 } … … 593 593 } 594 594 595 // Make sure 404 is not set 596 $posts_query->is_404 = false; 597 598 // Correct is_home variable 599 $posts_query->is_home = false; 600 595 601 // Looking at a single user 596 602 $posts_query->bbp_is_single_user = true; 597 603 598 // Make sure 404 is not set 599 $posts_query->is_404 = false; 600 601 // Correct is_home variable 602 $posts_query->is_home = false; 604 // User found so don't 404 yet 605 $posts_query->bbp_is_404 = false; 603 606 604 607 // User is looking at their own profile … … 621 624 // Bail if view args is false (view isn't registered) 622 625 if ( false === $view_args ) { 623 $posts_query-> set_404();626 $posts_query->bbp_is_404 = true; 624 627 return; 625 628 } … … 630 633 // We are in a custom topic view 631 634 $posts_query->bbp_is_view = true; 635 636 // No 404 because views are all (currently) public 637 $posts_query->bbp_is_404 = false; 632 638 633 639 // Search Page … … 646 652 $posts_query->bbp_is_search = true; 647 653 654 // No 404 because search is always public 655 $posts_query->bbp_is_404 = false; 656 648 657 // Forum/Topic/Reply Edit Page 649 658 } elseif ( ! empty( $is_edit ) ) { … … 654 663 // Check which post_type we are editing, if any 655 664 if ( ! empty( $post_type ) ) { 656 switch ( $post_type ) {665 switch ( $post_type ) { 657 666 658 667 // We are editing a forum 659 668 case bbp_get_forum_post_type() : 660 $posts_query->bbp_is_forum_edit = true; 661 $posts_query->bbp_is_edit = true; 669 $posts_query->bbp_is_forum_edit = true; 670 $posts_query->bbp_is_edit = true; 671 $posts_query->bbp_is_404 = false; 662 672 break; 663 673 664 674 // We are editing a topic 665 675 case bbp_get_topic_post_type() : 666 $posts_query->bbp_is_topic_edit = true; 667 $posts_query->bbp_is_edit = true; 676 $posts_query->bbp_is_topic_edit = true; 677 $posts_query->bbp_is_edit = true; 678 $posts_query->bbp_is_404 = false; 668 679 break; 669 680 670 681 // We are editing a reply 671 682 case bbp_get_reply_post_type() : 672 $posts_query->bbp_is_reply_edit = true; 673 $posts_query->bbp_is_edit = true; 683 $posts_query->bbp_is_reply_edit = true; 684 $posts_query->bbp_is_edit = true; 685 $posts_query->bbp_is_404 = false; 674 686 break; 675 687 } … … 679 691 $posts_query->bbp_is_topic_tag_edit = true; 680 692 $posts_query->bbp_is_edit = true; 693 $posts_query->bbp_is_404 = false; 681 694 } 682 695
Note: See TracChangeset
for help on using the changeset viewer.