Changeset 6534 for trunk/src/includes/topics/functions.php
- Timestamp:
- 06/12/2017 09:23:32 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/topics/functions.php
r6529 r6534 2518 2518 2519 2519 // If this is a new, unpublished, reply, update hidden count and bail. 2520 if ( 'bbp_new_reply' === current_filter() &&! bbp_is_reply_published( $reply_id ) ) {2520 if ( ! bbp_is_reply_published( $reply_id ) ) { 2521 2521 bbp_increase_topic_reply_count_hidden( $topic_id ); 2522 2522 return; … … 2664 2664 2665 2665 // If the topic is public, update the forum topic counts. 2666 if ( bbp_ get_topic_status( $topic_id ) === bbp_get_public_status_id() ) {2666 if ( bbp_is_topic_public( $topic_id ) ) { 2667 2667 bbp_increase_forum_topic_count( $forum_id ); 2668 2668 … … 2695 2695 2696 2696 // If it's a reply, then get the parent (topic id) 2697 if ( bbp_is_reply( $topic_id ) ) { 2698 $topic_id = bbp_get_reply_topic_id( $topic_id ); 2699 } else { 2700 $topic_id = bbp_get_topic_id( $topic_id ); 2701 } 2702 2697 $topic_id = bbp_is_reply( $topic_id ) 2698 ? bbp_get_reply_topic_id( $topic_id ) 2699 : bbp_get_topic_id( $topic_id ); 2700 2701 // Forum ID fallback 2703 2702 if ( empty( $forum_id ) ) { 2704 2703 $forum_id = get_post_field( 'post_parent', $topic_id ); … … 2753 2752 2754 2753 // If it's a reply, then get the parent (topic id) 2755 if ( bbp_is_reply( $topic_id ) ) { 2756 $topic_id = bbp_get_reply_topic_id( $topic_id ); 2757 } else { 2758 $topic_id = bbp_get_topic_id( $topic_id ); 2759 } 2754 $topic_id = bbp_is_reply( $topic_id ) 2755 ? bbp_get_reply_topic_id( $topic_id ) 2756 : bbp_get_topic_id( $topic_id ); 2760 2757 2761 2758 // Get replies of topic if not passed … … 2797 2794 2798 2795 // If it's a reply, then get the parent (topic id) 2799 if ( bbp_is_reply( $topic_id ) ) { 2800 $topic_id = bbp_get_reply_topic_id( $topic_id ); 2801 } else { 2802 $topic_id = bbp_get_topic_id( $topic_id ); 2803 } 2796 $topic_id = bbp_is_reply( $topic_id ) 2797 ? bbp_get_reply_topic_id( $topic_id ) 2798 : bbp_get_topic_id( $topic_id ); 2804 2799 2805 2800 // Get replies of topic … … 2841 2836 2842 2837 // If it's a reply, then get the parent (topic id) 2843 if ( bbp_is_reply( $topic_id ) ) { 2844 $topic_id = bbp_get_reply_topic_id( $topic_id ); 2845 } else { 2846 $topic_id = bbp_get_topic_id( $topic_id ); 2847 } 2848 2838 $topic_id = bbp_is_reply( $topic_id ) 2839 ? bbp_get_reply_topic_id( $topic_id ) 2840 : bbp_get_topic_id( $topic_id ); 2841 2842 // Get last public active id if not passed 2849 2843 if ( empty( $active_id ) ) { 2850 2844 $active_id = bbp_get_public_child_last_id( $topic_id, bbp_get_reply_post_type() ); … … 2886 2880 2887 2881 // If it's a reply, then get the parent (topic id) 2888 if ( bbp_is_reply( $topic_id ) ) { 2889 $topic_id = bbp_get_reply_topic_id( $topic_id ); 2890 } else { 2891 $topic_id = bbp_get_topic_id( $topic_id ); 2892 } 2882 $topic_id = bbp_is_reply( $topic_id ) 2883 ? bbp_get_reply_topic_id( $topic_id ) 2884 : bbp_get_topic_id( $topic_id ); 2893 2885 2894 2886 // Check time and use current if empty … … 3019 3011 3020 3012 // If it's a reply, then get the parent (topic id) 3021 if ( bbp_is_reply( $topic_id ) ) { 3022 $topic_id = bbp_get_reply_topic_id( $topic_id ); 3023 } elseif ( bbp_is_topic( $topic_id ) ) { 3024 $topic_id = bbp_get_topic_id( $topic_id ); 3025 } else { 3026 return; 3027 } 3013 $topic_id = bbp_is_reply( $topic_id ) 3014 ? bbp_get_reply_topic_id( $topic_id ) 3015 : bbp_get_topic_id( $topic_id ); 3028 3016 3029 3017 // Query the DB to get anonymous replies in this topic … … 3452 3440 3453 3441 /** 3454 * Retr eive tags to a topic from post meta before it's unmarked as spam so they.3442 * Retrieve tags to a topic from post meta before it's unmarked as spam so they. 3455 3443 * 3456 3444 * Usually you'll want to do this before the topic itself is unmarked as spam.
Note: See TracChangeset
for help on using the changeset viewer.