Changeset 6433
- Timestamp:
- 05/26/2017 09:50:36 PM (8 years ago)
- Location:
- trunk/src/includes
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/common/template.php
r6415 r6433 1398 1398 1399 1399 return apply_filters( 'bbp_get_tab_index', (int) $bbp->tab_index ); 1400 } 1401 1402 /** 1403 * Output a "tabindex" attribute for an element, if an index was passed. 1404 * 1405 * This helper function is in use, but it is generally considered impolite to 1406 * override the "tabindex" attribute beyond what the browser naturally assigns. 1407 * 1408 * Most internal usages pass `false` which results in no attribute being used. 1409 * 1410 * @since 2.6.0 bbPress (r6424) 1411 * 1412 * @param mixed $tab False to skip, any integer to use 1413 */ 1414 function bbp_tab_index_attribute( $tab = false ) { 1415 echo bbp_get_tab_index_attribute( $tab ); 1416 } 1417 1418 /** 1419 * Return a "tabindex" attribute for an element, if an index was passed. 1420 * 1421 * This helper function is in use, but it is generally considered impolite to 1422 * override the "tabindex" attribute beyond what the browser naturally assigns. 1423 * 1424 * Most internal usages pass `false` which results in no attribute being used. 1425 * 1426 * @since 2.6.0 bbPress (r6424) 1427 * 1428 * @param mixed $tab False to skip, any integer to use 1429 * 1430 * @return string 1431 */ 1432 function bbp_get_tab_index_attribute( $tab = false ) { 1433 1434 // Get attribute 1435 $attr = is_numeric( $tab ) 1436 ? ' tabindex="' . (int) $tab . '"' 1437 : ''; 1438 1439 // Filter & return 1440 return apply_filters( 'bbp_get_tab_index_attribute', $attr, $tab ); 1400 1441 } 1401 1442 … … 1884 1925 * escaping the editable output, mucking up existing content. 1885 1926 */ 1886 else : 1887 1888 // Setup the tab index attribute 1889 $tab = ! empty( $r['tab'] ) ? ' tabindex="' . intval( $r['tab'] ) . '"' : ''; ?> 1890 1891 <textarea id="bbp_<?php echo esc_attr( $r['context'] ); ?>_content" class="<?php echo esc_attr( $r['editor_class'] ); ?>" name="bbp_<?php echo esc_attr( $r['context'] ); ?>_content" cols="60" rows="<?php echo esc_attr( $r['textarea_rows'] ); ?>" <?php echo $tab; ?>><?php echo $post_content; ?></textarea> 1927 else : ?> 1928 1929 <textarea id="bbp_<?php echo esc_attr( $r['context'] ); ?>_content" class="<?php echo esc_attr( $r['editor_class'] ); ?>" name="bbp_<?php echo esc_attr( $r['context'] ); ?>_content" cols="60" rows="<?php echo esc_attr( $r['textarea_rows'] ); ?>" <?php bbp_tab_index_attribute( $r['tab'] ); ?>><?php echo $post_content; ?></textarea> 1892 1930 1893 1931 <?php endif; -
trunk/src/includes/extend/buddypress/groups.php
r6383 r6433 349 349 bbp_dropdown( array( 350 350 'select_id' => 'bbp_group_forum_id', 351 'show_none' => __( '— No forum —', 'bbpress' ),351 'show_none' => esc_html__( '— No forum —', 'bbpress' ), 352 352 'selected' => $forum_id 353 353 ) ); -
trunk/src/includes/forums/template.php
r6414 r6433 2576 2576 } 2577 2577 2578 // Used variables2579 $tab = ! empty( $r['tab'] ) ? ' tabindex="' . (int) $r['tab'] . '"' : '';2580 2581 2578 // Start an output buffer, we'll finish it after the select loop 2582 2579 ob_start(); ?> 2583 2580 2584 <select name="<?php echo esc_attr( $r['select_id'] ) ?>" id="<?php echo esc_attr( $r['select_id'] ) ?>_select" class="<?php echo esc_attr( $r['select_class'] ); ?>"<?php echo $tab; ?>>2581 <select name="<?php echo esc_attr( $r['select_id'] ) ?>" id="<?php echo esc_attr( $r['select_id'] ) ?>_select" class="<?php echo esc_attr( $r['select_class'] ); ?>"<?php bbp_tab_index_attribute( $r['tab'] ); ?>> 2585 2582 2586 2583 <?php foreach ( bbp_get_forum_types( $r['forum_id'] ) as $key => $label ) : ?> … … 2669 2666 } 2670 2667 2671 // Used variables2672 $tab = ! empty( $r['tab'] ) ? ' tabindex="' . (int) $r['tab'] . '"' : '';2673 2674 2668 // Start an output buffer, we'll finish it after the select loop 2675 2669 ob_start(); ?> 2676 2670 2677 <select name="<?php echo esc_attr( $r['select_id'] ) ?>" id="<?php echo esc_attr( $r['select_id'] ) ?>_select" class="<?php echo esc_attr( $r['select_class'] ); ?>"<?php echo $tab; ?>>2671 <select name="<?php echo esc_attr( $r['select_id'] ) ?>" id="<?php echo esc_attr( $r['select_id'] ) ?>_select" class="<?php echo esc_attr( $r['select_class'] ); ?>"<?php bbp_tab_index_attribute( $r['tab'] ); ?>> 2678 2672 2679 2673 <?php foreach ( bbp_get_forum_statuses( $r['forum_id'] ) as $key => $label ) : ?> … … 2762 2756 } 2763 2757 2764 // Used variables2765 $tab = ! empty( $r['tab'] ) ? ' tabindex="' . (int) $r['tab'] . '"' : '';2766 2767 2758 // Start an output buffer, we'll finish it after the select loop 2768 2759 ob_start(); ?> 2769 2760 2770 <select name="<?php echo esc_attr( $r['select_id'] ) ?>" id="<?php echo esc_attr( $r['select_id'] ) ?>_select" class="<?php echo esc_attr( $r['select_class'] ); ?>"<?php echo $tab; ?>>2761 <select name="<?php echo esc_attr( $r['select_id'] ) ?>" id="<?php echo esc_attr( $r['select_id'] ) ?>_select" class="<?php echo esc_attr( $r['select_class'] ); ?>"<?php bbp_tab_index_attribute( $r['tab'] ); ?>> 2771 2762 2772 2763 <?php foreach ( bbp_get_forum_visibilities( $r['forum_id'] ) as $key => $label ) : ?> -
trunk/src/includes/replies/template.php
r6415 r6433 1706 1706 1707 1707 // Get the reply to use it's ID and post_parent 1708 $reply = bbp_get_reply( $r['id'] ); 1708 $reply = bbp_get_reply( $r['id'] ); 1709 $topic_id = bbp_get_reply_topic_id( $reply->ID ); 1709 1710 1710 1711 // Bail if no reply or user cannot reply 1711 if ( empty( $reply ) || ! bbp_current_user_can_access_create_reply_form() ) {1712 if ( empty( $reply ) || empty( $topic_id ) || bbp_is_single_reply() || ! bbp_current_user_can_access_create_reply_form() ) { 1712 1713 return; 1713 1714 } … … 1740 1741 // Add $uri to the array, to be passed through the filter 1741 1742 $r['uri'] = $uri; 1742 $retval = $r['link_before'] . '<a role="button" href="' . esc_url( $r['uri'] ) . '" class="bbp-reply-to-link"' . $onclick . '>' . esc_html( $r['reply_text'] ). '</a>' . $r['link_after'];1743 $retval = $r['link_before'] . '<a role="button" href="' . esc_url( $r['uri'] ) . '" class="bbp-reply-to-link"' . $onclick . '>' . $r['reply_text'] . '</a>' . $r['link_after']; 1743 1744 1744 1745 return apply_filters( 'bbp_get_reply_to_link', $retval, $r, $args ); … … 1774 1775 // Set default text 1775 1776 if ( empty( $text ) ) { 1776 $text = __( 'Cancel', 'bbpress' );1777 $text = esc_html__( 'Cancel', 'bbpress' ); 1777 1778 } 1778 1779 … … 1997 1998 ), 'get_reply_edit_link' ); 1998 1999 2000 // Get reply 1999 2001 $reply = bbp_get_reply( $r['id'] ); 2000 2002 … … 2048 2050 function bbp_get_reply_edit_url( $reply_id = 0 ) { 2049 2051 2052 // Bail if no reply 2050 2053 $reply = bbp_get_reply( $reply_id ); 2051 2054 if ( empty( $reply ) ) { … … 2127 2130 ), 'get_reply_trash_link' ); 2128 2131 2132 // Get reply 2129 2133 $reply = bbp_get_reply( $r['id'] ); 2130 2134 2135 // Bail if no reply or current user cannot delete 2131 2136 if ( empty( $reply ) || ! current_user_can( 'delete_reply', $reply->ID ) ) { 2132 2137 return; 2133 2138 } 2134 2139 2135 $actions = array(); 2136 2140 $actions = array(); 2141 $trash_days = bbp_get_trash_days( bbp_get_reply_post_type() ); 2142 2143 // Trashed 2137 2144 if ( bbp_is_reply_trash( $reply->ID ) ) { 2138 2145 $actions['untrash'] = '<a title="' . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_reply_trash', 'sub_action' => 'untrash', 'reply_id' => $reply->ID ) ), 'untrash-' . $reply->post_type . '_' . $reply->ID ) ) . '" class="bbp-reply-restore-link">' . $r['restore_text'] . '</a>'; 2139 } elseif ( EMPTY_TRASH_DAYS ) { 2146 2147 // Trash 2148 } elseif ( ! empty( $trash_days ) ) { 2140 2149 $actions['trash'] = '<a title="' . esc_attr__( 'Move this item to the Trash', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_reply_trash', 'sub_action' => 'trash', 'reply_id' => $reply->ID ) ), 'trash-' . $reply->post_type . '_' . $reply->ID ) ) . '" class="bbp-reply-trash-link">' . $r['trash_text'] . '</a>'; 2141 2150 } 2142 2151 2143 if ( bbp_is_reply_trash( $reply->ID ) || !EMPTY_TRASH_DAYS ) { 2152 // No trash 2153 if ( bbp_is_reply_trash( $reply->ID ) || empty( $trash_days ) ) { 2144 2154 $actions['delete'] = '<a title="' . esc_attr__( 'Delete this item permanently', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_reply_trash', 'sub_action' => 'delete', 'reply_id' => $reply->ID ) ), 'delete-' . $reply->post_type . '_' . $reply->ID ) ) . '" onclick="return confirm(\'' . esc_js( __( 'Are you sure you want to delete that permanently?', 'bbpress' ) ) . '\' );" class="bbp-reply-delete-link">' . $r['delete_text'] . '</a>'; 2145 2155 } … … 2198 2208 ), 'get_reply_spam_link' ); 2199 2209 2210 // Get reply 2200 2211 $reply = bbp_get_reply( $r['id'] ); 2201 2212 2213 // Bail if no reply or current user cannot moderate 2202 2214 if ( empty( $reply ) || ! current_user_can( 'moderate', $reply->ID ) ) { 2203 2215 return; … … 2263 2275 ), 'get_reply_move_link' ); 2264 2276 2277 // Get IDs 2265 2278 $reply_id = bbp_get_reply_id( $r['id'] ); 2266 2279 $topic_id = bbp_get_reply_topic_id( $reply_id ); 2267 2280 2281 // Bail if no reply ID or user cannot moderate 2268 2282 if ( empty( $reply_id ) || ! current_user_can( 'moderate', $topic_id ) ) { 2269 2283 return; … … 2331 2345 ), 'get_topic_split_link' ); 2332 2346 2347 // Get IDs 2333 2348 $reply_id = bbp_get_reply_id( $r['id'] ); 2334 2349 $topic_id = bbp_get_reply_topic_id( $reply_id ); 2335 2350 2336 if ( empty( $reply_id ) || ! current_user_can( 'moderate', $topic_id ) ) { 2351 // Bail if no reply/topic ID, or user cannot moderate 2352 if ( empty( $reply_id ) || empty( $topic_id ) || ! current_user_can( 'moderate', $topic_id ) ) { 2337 2353 return; 2338 2354 } … … 2395 2411 ), 'get_reply_approve_link' ); 2396 2412 2413 // Get reply 2397 2414 $reply = bbp_get_reply( $r['id'] ); 2398 2415 2416 // Bail if no reply or current user cannot moderate 2399 2417 if ( empty( $reply ) || ! current_user_can( 'moderate', $reply->ID ) ) { 2400 2418 return; … … 2856 2874 } 2857 2875 2858 // Used variables2859 $tab = ! empty( $r['tab'] ) ? ' tabindex="' . (int) $r['tab'] . '"' : '';2860 2861 2876 // Start an output buffer, we'll finish it after the select loop 2862 2877 ob_start(); ?> 2863 2878 2864 <select name="<?php echo esc_attr( $r['select_id'] ) ?>" id="<?php echo esc_attr( $r['select_id'] ); ?>_select" class="<?php echo esc_attr( $r['select_class'] ); ?>"<?php echo $tab; ?>>2879 <select name="<?php echo esc_attr( $r['select_id'] ) ?>" id="<?php echo esc_attr( $r['select_id'] ); ?>_select" class="<?php echo esc_attr( $r['select_class'] ); ?>"<?php bbp_tab_index_attribute( $r['tab'] ); ?>> 2865 2880 2866 2881 <?php foreach ( bbp_get_reply_statuses( $r['reply_id'] ) as $key => $label ) : ?> -
trunk/src/includes/topics/template.php
r6415 r6433 2769 2769 ), 'get_topic_trash_link' ); 2770 2770 2771 // Get topic 2771 2772 $topic = bbp_get_topic( $r['id'] ); 2772 2773 2774 // Bail if no topic or current user cannot delete 2773 2775 if ( empty( $topic ) || ! current_user_can( 'delete_topic', $topic->ID ) ) { 2774 2776 return; 2775 2777 } 2776 2778 2777 $actions = array(); 2779 $actions = array(); 2780 $trash_days = bbp_get_trash_days( bbp_get_topic_post_type() ); 2778 2781 2779 2782 if ( bbp_is_topic_trash( $topic->ID ) ) { 2780 2783 $actions['untrash'] = '<a title="' . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_topic_trash', 'sub_action' => 'untrash', 'topic_id' => $topic->ID ) ), 'untrash-' . $topic->post_type . '_' . $topic->ID ) ) . '" class="bbp-topic-restore-link">' . $r['restore_text'] . '</a>'; 2781 } elseif ( EMPTY_TRASH_DAYS) {2784 } elseif ( ! empty( $trash_days ) ) { 2782 2785 $actions['trash'] = '<a title="' . esc_attr__( 'Move this item to the Trash', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_topic_trash', 'sub_action' => 'trash', 'topic_id' => $topic->ID ) ), 'trash-' . $topic->post_type . '_' . $topic->ID ) ) . '" class="bbp-topic-trash-link">' . $r['trash_text'] . '</a>'; 2783 2786 } 2784 2787 2785 if ( bbp_is_topic_trash( $topic->ID ) || ! EMPTY_TRASH_DAYS) {2788 if ( bbp_is_topic_trash( $topic->ID ) || empty( $trash_days ) ) { 2786 2789 $actions['delete'] = '<a title="' . esc_attr__( 'Delete this item permanently', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_topic_trash', 'sub_action' => 'delete', 'topic_id' => $topic->ID ) ), 'delete-' . $topic->post_type . '_' . $topic->ID ) ) . '" onclick="return confirm(\'' . esc_js( __( 'Are you sure you want to delete that permanently?', 'bbpress' ) ) . '\' );" class="bbp-topic-delete-link">' . $r['delete_text'] . '</a>'; 2787 2790 } … … 2839 2842 ), 'get_topic_close_link' ); 2840 2843 2844 // Get topic 2841 2845 $topic = bbp_get_topic( $r['id'] ); 2842 2846 2847 // Bail if no topic or current user cannot moderate 2843 2848 if ( empty( $topic ) || ! current_user_can( 'moderate', $topic->ID ) ) { 2844 2849 return; … … 2900 2905 ), 'get_topic_approve_link' ); 2901 2906 2907 // Get topic 2902 2908 $topic = bbp_get_topic( $r['id'] ); 2903 2909 2910 // Bail if no topic or current user cannot moderate 2904 2911 if ( empty( $topic ) || ! current_user_can( 'moderate', $topic->ID ) ) { 2905 2912 return; … … 2962 2969 ), 'get_topic_stick_link' ); 2963 2970 2971 // Get topic 2964 2972 $topic = bbp_get_topic( $r['id'] ); 2965 2973 2974 // Bail if no topic or current user cannot moderate 2966 2975 if ( empty( $topic ) || ! current_user_can( 'moderate', $topic->ID ) ) { 2967 2976 return; … … 3032 3041 ), 'get_topic_merge_link' ); 3033 3042 3043 // Get topic 3034 3044 $topic = bbp_get_topic( $r['id'] ); 3035 3045 3046 // Bail if no topic or current user cannot moderate 3036 3047 if ( empty( $topic ) || ! current_user_can( 'moderate', $topic->ID ) ) { 3037 3048 return; … … 3133 3144 // Parse arguments against default values 3134 3145 $r = bbp_parse_args( $args, array( 3135 'id' 3136 'link_before' 3137 'link_after' 3138 'reply_text' 3146 'id' => 0, 3147 'link_before' => '', 3148 'link_after' => '', 3149 'reply_text' => esc_html_x( 'Reply', 'verb', 'bbpress' ), 3139 3150 ), 'get_topic_reply_link' ); 3140 3151 3141 // Get the replyto use it's ID and post_parent3152 // Get the topic to use it's ID and post_parent 3142 3153 $topic = bbp_get_topic( $r['id'] ); 3143 3154 3144 // Bail if no replyor user cannot reply3145 if ( empty( $topic ) || ! bbp_current_user_can_access_create_reply_form() ) {3155 // Bail if no topic or user cannot reply 3156 if ( empty( $topic ) || bbp_is_single_reply() || ! bbp_current_user_can_access_create_reply_form() ) { 3146 3157 return; 3147 3158 } … … 3149 3160 // Add $uri to the array, to be passed through the filter 3150 3161 $r['uri'] = '#new-post'; 3151 $retval = $r['link_before'] . '<a role="button" href="' . esc_url( $r['uri'] ) . '" class="bbp-topic-reply-link">' . esc_html( $r['reply_text'] ). '</a>' . $r['link_after'];3162 $retval = $r['link_before'] . '<a role="button" href="' . esc_url( $r['uri'] ) . '" class="bbp-topic-reply-link">' . $r['reply_text'] . '</a>' . $r['link_after']; 3152 3163 3153 3164 return apply_filters( 'bbp_get_topic_reply_link', $retval, $r, $args ); … … 3438 3449 } 3439 3450 3440 // Used variables3441 $tab = ! empty( $r['tab'] ) ? ' tabindex="' . (int) $r['tab'] . '"' : '';3442 3443 3451 // Start an output buffer, we'll finish it after the select loop 3444 3452 ob_start(); ?> 3445 3453 3446 <select name="<?php echo esc_attr( $r['select_id'] ); ?>" id="<?php echo esc_attr( $r['select_id'] ); ?>_select" class="<?php echo esc_attr( $r['select_class'] ); ?>"<?php echo $tab; ?>>3454 <select name="<?php echo esc_attr( $r['select_id'] ); ?>" id="<?php echo esc_attr( $r['select_id'] ); ?>_select" class="<?php echo esc_attr( $r['select_class'] ); ?>"<?php bbp_tab_index_attribute( $r['tab'] ); ?>> 3447 3455 3448 3456 <?php foreach ( bbp_get_topic_types( $r['topic_id'] ) as $key => $label ) : ?> … … 3522 3530 } 3523 3531 3524 // Used variables3525 $tab = ! empty( $r['tab'] ) ? ' tabindex="' . (int) $r['tab'] . '"' : '';3526 3527 3532 // Start an output buffer, we'll finish it after the select loop 3528 3533 ob_start(); ?> 3529 3534 3530 <select name="<?php echo esc_attr( $r['select_id'] ) ?>" id="<?php echo esc_attr( $r['select_id'] ); ?>_select" class="<?php echo esc_attr( $r['select_class'] ); ?>"<?php echo $tab; ?>>3535 <select name="<?php echo esc_attr( $r['select_id'] ) ?>" id="<?php echo esc_attr( $r['select_id'] ); ?>_select" class="<?php echo esc_attr( $r['select_class'] ); ?>"<?php bbp_tab_index_attribute( $r['tab'] ); ?>> 3531 3536 3532 3537 <?php foreach ( bbp_get_topic_statuses( $r['topic_id'] ) as $key => $label ) : ?> … … 3725 3730 } 3726 3731 3727 // Add before and after if description exists 3728 if ( ! empty( $term->term_id ) ) { 3729 $retval = $term->term_id; 3730 3731 // No id 3732 } else { 3733 $retval = ''; 3734 } 3732 // Get the term ID 3733 $retval = ! empty( $term->term_id ) 3734 ? $term->term_id 3735 : 0; 3735 3736 3736 3737 return (int) apply_filters( 'bbp_get_topic_tag_id', (int) $retval, $tag, $term ); … … 3769 3770 } 3770 3771 3771 // Add before and after if description exists 3772 if ( ! empty( $term->name ) ) { 3773 $retval = $term->name; 3774 3775 // No name 3776 } else { 3777 $retval = ''; 3778 } 3772 // Get the term name 3773 $retval = ! empty( $term->name ) 3774 ? $term->name 3775 : ''; 3779 3776 3780 3777 return apply_filters( 'bbp_get_topic_tag_name', $retval, $tag, $term ); … … 3813 3810 } 3814 3811 3815 // Add before and after if description exists 3816 if ( ! empty( $term->slug ) ) { 3817 $retval = $term->slug; 3818 3819 // No slug 3820 } else { 3821 $retval = ''; 3822 } 3812 // Get the term slug 3813 $retval = ! empty( $term->slug ) 3814 ? $term->slug 3815 : ''; 3823 3816 3824 3817 return apply_filters( 'bbp_get_topic_tag_slug', $retval, $tag, $term ); … … 3857 3850 } 3858 3851 3859 // Add before and after if description exists 3860 if ( ! empty( $term->term_id ) ) { 3861 $retval = get_term_link( $term, bbp_get_topic_tag_tax_id() ); 3862 3863 // No link 3864 } else { 3865 $retval = ''; 3866 } 3852 // Get the term link 3853 $retval = ! empty( $term->term_id ) 3854 ? get_term_link( $term, bbp_get_topic_tag_tax_id() ) 3855 : ''; 3867 3856 3868 3857 return apply_filters( 'bbp_get_topic_tag_link', $retval, $tag, $term ); … … 3901 3890 } 3902 3891 3903 // Add before and after if description exists3892 // Get the term's edit link 3904 3893 if ( ! empty( $term->term_id ) ) { 3905 3894 3906 // Pretty 3907 if ( bbp_use_pretty_urls() ) { 3908 $retval = user_trailingslashit( trailingslashit( bbp_get_topic_tag_link() ) . bbp_get_edit_rewrite_id() ); 3909 3910 // Ugly 3911 } else { 3912 $retval = add_query_arg( array( bbp_get_edit_rewrite_id() => '1' ), bbp_get_topic_tag_link() ); 3913 } 3895 // Pretty or ugly URL 3896 $retval = bbp_use_pretty_urls() 3897 ? user_trailingslashit( trailingslashit( bbp_get_topic_tag_link() ) . bbp_get_edit_rewrite_id() ) 3898 : add_query_arg( array( bbp_get_edit_rewrite_id() => '1' ), bbp_get_topic_tag_link() ); 3914 3899 3915 3900 // No link … … 3957 3942 $term = get_term_by( 'slug', $r['tag'], bbp_get_topic_tag_tax_id() ); 3958 3943 } else { 3959 $tag = get_query_var( 'term' ); 3960 $r['tag'] = $tag; 3961 $term = get_queried_object(); 3962 } 3963 3964 // Add before and after if description exists 3965 if ( ! empty( $term->description ) ) { 3966 $retval = $r['before'] . $term->description . $r['after']; 3967 3968 // No description, no HTML 3969 } else { 3970 $retval = ''; 3971 } 3944 $tag = $r['tag'] = get_query_var( 'term' ); 3945 $term = get_queried_object(); 3946 } 3947 3948 // Add before & after if description exists 3949 $retval = ! empty( $term->description ) 3950 ? $r['before'] . $term->description . $r['after'] 3951 : ''; 3972 3952 3973 3953 return apply_filters( 'bbp_get_topic_tag_description', $retval, $r, $args, $tag, $term );
Note: See TracChangeset
for help on using the changeset viewer.