Changeset 5022
- Timestamp:
- 07/10/2013 03:32:43 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/topics/functions.php
r5021 r5022 2057 2057 2058 2058 $is_open = bbp_is_topic_open( $topic_id ); 2059 $success = $is_open ? bbp_close_topic( $topic_id ) : bbp_open_topic( $topic_id );2060 $failure = $is_open ? __( '<strong>ERROR</strong>: There was a problem closing the topic.', 'bbpress' ) : __( '<strong>ERROR</strong>: There was a problem opening the topic.', 'bbpress' );2059 $success = true === $is_open ? bbp_close_topic( $topic_id ) : bbp_open_topic( $topic_id ); 2060 $failure = true === $is_open ? __( '<strong>ERROR</strong>: There was a problem closing the topic.', 'bbpress' ) : __( '<strong>ERROR</strong>: There was a problem opening the topic.', 'bbpress' ); 2061 2061 2062 2062 break; … … 2067 2067 2068 2068 $is_sticky = bbp_is_topic_sticky( $topic_id ); 2069 $is_super = ( empty( $is_sticky ) && !empty( $_GET['super'] ) &&"1" === $_GET['super'] ) ? true : false;2070 $success = $is_sticky ? bbp_unstick_topic( $topic_id ) : bbp_stick_topic( $topic_id, $is_super );2071 $failure = $is_sticky ? __( '<strong>ERROR</strong>: There was a problem unsticking the topic.', 'bbpress' ) : __( '<strong>ERROR</strong>: There was a problem sticking the topic.', 'bbpress' );2069 $is_super = false === $is_sticky && !empty( $_GET['super'] ) && ( "1" === $_GET['super'] ) ? true : false; 2070 $success = true === $is_sticky ? bbp_unstick_topic( $topic_id ) : bbp_stick_topic( $topic_id, $is_super ); 2071 $failure = true === $is_sticky ? __( '<strong>ERROR</strong>: There was a problem unsticking the topic.', 'bbpress' ) : __( '<strong>ERROR</strong>: There was a problem sticking the topic.', 'bbpress' ); 2072 2072 2073 2073 break; … … 2078 2078 2079 2079 $is_spam = bbp_is_topic_spam( $topic_id ); 2080 $success = $is_spam ? bbp_unspam_topic( $topic_id ) : bbp_spam_topic( $topic_id );2081 $failure = $is_spam ? __( '<strong>ERROR</strong>: There was a problem unmarking the topic as spam.', 'bbpress' ) : __( '<strong>ERROR</strong>: There was a problem marking the topic as spam.', 'bbpress' );2080 $success = true === $is_spam ? bbp_unspam_topic( $topic_id ) : bbp_spam_topic( $topic_id ); 2081 $failure = true === $is_spam ? __( '<strong>ERROR</strong>: There was a problem unmarking the topic as spam.', 'bbpress' ) : __( '<strong>ERROR</strong>: There was a problem marking the topic as spam.', 'bbpress' ); 2082 2082 $view_all = !$is_spam; 2083 2083
Note: See TracChangeset
for help on using the changeset viewer.