Changeset 5691 for trunk/src/includes/topics/template.php
- Timestamp:
- 04/20/2015 04:20:34 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/includes/topics/template.php (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/topics/template.php
r5682 r5691 2184 2184 * @uses bbp_get_topic_reply_count() To get the topic reply count 2185 2185 * @uses bbp_get_topic_permalink() To get the topic permalink 2186 * @uses remove_query_arg() To remove args from the url2187 2186 * @uses bbp_get_topic_reply_count_hidden() To get the topic hidden 2188 2187 * reply count 2189 2188 * @uses current_user_can() To check if the current user can edit others 2190 2189 * replies 2191 * @uses add_query_arg() To add custom args to the url2192 2190 * @uses apply_filters() Calls 'bbp_get_topic_replies_link' with the 2193 2191 * replies link and topic id … … 2195 2193 function bbp_get_topic_replies_link( $topic_id = 0 ) { 2196 2194 2197 $topic = bbp_get_topic( bbp_get_topic_id( (int) $topic_id ));2195 $topic = bbp_get_topic( $topic_id ); 2198 2196 $topic_id = $topic->ID; 2199 2197 $replies = sprintf( _n( '%s reply', '%s replies', bbp_get_topic_reply_count( $topic_id, true ), 'bbpress' ), bbp_get_topic_reply_count( $topic_id ) ); … … 2517 2515 $r['links'] = apply_filters( 'bbp_topic_admin_links', array( 2518 2516 'edit' => bbp_get_topic_edit_link ( $r ), 2517 'merge' => bbp_get_topic_merge_link ( $r ), 2519 2518 'close' => bbp_get_topic_close_link ( $r ), 2520 2519 'stick' => bbp_get_topic_stick_link ( $r ), 2521 'merge' => bbp_get_topic_merge_link ( $r ),2522 2520 'trash' => bbp_get_topic_trash_link ( $r ), 2523 2521 'spam' => bbp_get_topic_spam_link ( $r ), … … 2593 2591 2594 2592 // Get the topic 2595 $topic = bbp_get_topic( bbp_get_topic_id( $r['id'] ));2593 $topic = bbp_get_topic( $r['id'] ); 2596 2594 2597 2595 // Bypass check if user has caps … … 2644 2642 global $wp_rewrite; 2645 2643 2646 $topic = bbp_get_topic( bbp_get_topic_id( $topic_id ));2644 $topic = bbp_get_topic( $topic_id ); 2647 2645 if ( empty( $topic ) ) { 2648 2646 return; … … 2719 2717 ), 'get_topic_trash_link' ); 2720 2718 2721 $topic = bbp_get_topic( bbp_get_topic_id( $r['id'] ));2719 $topic = bbp_get_topic( $r['id'] ); 2722 2720 2723 2721 if ( empty( $topic ) || ! current_user_can( 'delete_topic', $topic->ID ) ) { … … 2789 2787 ), 'get_topic_close_link' ); 2790 2788 2791 $topic = bbp_get_topic( bbp_get_topic_id( $r['id'] ));2789 $topic = bbp_get_topic( $r['id'] ); 2792 2790 2793 2791 if ( empty( $topic ) || ! current_user_can( 'moderate', $topic->ID ) ) { … … 2850 2848 ), 'get_topic_approve_link' ); 2851 2849 2852 $topic = bbp_get_topic( bbp_get_topic_id( $r['id'] ));2850 $topic = bbp_get_topic( $r['id'] ); 2853 2851 2854 2852 if ( empty( $topic ) || ! current_user_can( 'moderate', $topic->ID ) ) { … … 2912 2910 ), 'get_topic_stick_link' ); 2913 2911 2914 $topic = bbp_get_topic( bbp_get_topic_id( $r['id'] ));2912 $topic = bbp_get_topic( $r['id'] ); 2915 2913 2916 2914 if ( empty( $topic ) || ! current_user_can( 'moderate', $topic->ID ) ) { … … 2982 2980 ), 'get_topic_merge_link' ); 2983 2981 2984 $topic = bbp_get_topic( bbp_get_topic_id( $r['id'] ));2982 $topic = bbp_get_topic( $r['id'] ); 2985 2983 2986 2984 if ( empty( $topic ) || ! current_user_can( 'moderate', $topic->ID ) ) { … … 3040 3038 ), 'get_topic_spam_link' ); 3041 3039 3042 $topic = bbp_get_topic( bbp_get_topic_id( $r['id'] ));3040 $topic = bbp_get_topic( $r['id'] ); 3043 3041 3044 3042 if ( empty( $topic ) || ! current_user_can( 'moderate', $topic->ID ) ) { … … 3090 3088 3091 3089 // Get the reply to use it's ID and post_parent 3092 $topic = bbp_get_topic( bbp_get_topic_id( $r['id'] ));3090 $topic = bbp_get_topic( $r['id'] ); 3093 3091 3094 3092 // Bail if no reply or user cannot reply … … 3284 3282 $r = bbp_parse_args( $args, array( 3285 3283 'select_id' => 'bbp_stick_topic', 3284 'select_class' => 'bbp_dropdown', 3286 3285 'tab' => false, 3287 3286 'topic_id' => 0, … … 3323 3322 ob_start(); ?> 3324 3323 3325 <select name="<?php echo esc_attr( $r['select_id'] ); ?>" id="<?php echo esc_attr( $r['select_id'] ); ?>_select" <?php echo $tab; ?>>3324 <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; ?>> 3326 3325 3327 3326 <?php foreach ( bbp_get_topic_types() as $key => $label ) : ?> … … 3372 3371 // Parse arguments against default values 3373 3372 $r = bbp_parse_args( $args, array( 3374 'select_id' => 'bbp_topic_status', 3375 'tab' => false, 3376 'topic_id' => 0, 3377 'selected' => false 3373 'select_id' => 'bbp_topic_status', 3374 'select_class' => 'bbp_dropdown', 3375 'tab' => false, 3376 'topic_id' => 0, 3377 'selected' => false 3378 3378 ), 'topic_open_close_select' ); 3379 3379 … … 3406 3406 ob_start(); ?> 3407 3407 3408 <select name="<?php echo esc_attr( $r['select_id'] ) ?>" id="<?php echo esc_attr( $r['select_id'] ); ?>_select" <?php echo $tab; ?>>3408 <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; ?>> 3409 3409 3410 3410 <?php foreach ( bbp_get_topic_statuses( $r['topic_id'] ) as $key => $label ) : ?>
Note: See TracChangeset
for help on using the changeset viewer.