Changeset 6027
- Timestamp:
- 05/19/2016 07:42:24 PM (9 years ago)
- Location:
- trunk/src/includes/topics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/topics/functions.php
r6026 r6027 753 753 /** Stickies **********************************************************/ 754 754 755 if ( ! empty( $_POST['bbp_stick_topic'] ) && in_array( $_POST['bbp_stick_topic'], array_keys( bbp_get_topic_types() ) ) ) { 755 // Get the topic types 756 $topic_types = bbp_get_topic_types( $topic_id ); 757 758 // Maybe sticky 759 if ( ! empty( $_POST['bbp_stick_topic'] ) && in_array( $_POST['bbp_stick_topic'], array_keys( $topic_types ) ) ) { 756 760 757 761 // What's the caps? -
trunk/src/includes/topics/template.php
r5951 r6027 3307 3307 3308 3308 // Get current topic id 3309 $ topic_id= bbp_get_topic_id( $r['topic_id'] );3309 $r['topic_id'] = bbp_get_topic_id( $r['topic_id'] ); 3310 3310 3311 3311 // Topic is super sticky 3312 if ( bbp_is_topic_super_sticky( $ topic_id) ) {3312 if ( bbp_is_topic_super_sticky( $r['topic_id'] ) ) { 3313 3313 $r['selected'] = 'super'; 3314 3314 3315 3315 // Topic is sticky or normal 3316 3316 } else { 3317 $r['selected'] = bbp_is_topic_sticky( $topic_id, false ) ? 'stick' : 'unstick'; 3317 $r['selected'] = bbp_is_topic_sticky( $r['topic_id'], false ) 3318 ? 'stick' 3319 : 'unstick'; 3318 3320 } 3319 3321 } … … 3329 3331 <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; ?>> 3330 3332 3331 <?php foreach ( bbp_get_topic_types( ) as $key => $label ) : ?>3333 <?php foreach ( bbp_get_topic_types( $r['topic_id'] ) as $key => $label ) : ?> 3332 3334 3333 3335 <option value="<?php echo esc_attr( $key ); ?>"<?php selected( $key, $r['selected'] ); ?>><?php echo esc_html( $label ); ?></option>
Note: See TracChangeset
for help on using the changeset viewer.