Changeset 5358
- Timestamp:
- 04/18/2017 06:00:14 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-stickies-compat.php
r5357 r5358 85 85 // Bail if the action isn't meant for this function. 86 86 if ( ! in_array( $action, array( 87 'wporg_bbp_stick_ topic',88 'wporg_bbp_unstick_ topic',87 'wporg_bbp_stick_compat_topic', 88 'wporg_bbp_unstick_compat_topic', 89 89 ) ) ) { 90 90 return; … … 122 122 123 123 // Stick/unstick the topic. 124 if ( 'wporg_bbp_stick_ topic' == $action ) {124 if ( 'wporg_bbp_stick_compat_topic' == $action ) { 125 125 $success = self::add_sticky( $term->term_id, $topic->ID ); 126 } elseif ( 'wporg_bbp_unstick_ topic' == $action ) {126 } elseif ( 'wporg_bbp_unstick_compat_topic' == $action ) { 127 127 $success = self::remove_sticky( $term->term_id, $topic->ID ); 128 128 } … … 132 132 if ( $success && ! is_wp_error( $success ) ) { 133 133 bbp_redirect( $permalink ); 134 } elseif ( true === $is_sticky && 'wporg_bbp_stick_ topic' == $action ) {135 bbp_add_error( 'wporg_bbp_stick_ topic', __( '<strong>ERROR</strong>: There was a problem sticking that topic!', 'wporg-forums' ) );136 } elseif ( false === $is_sticky && 'wporg_bbp_unstick_ topic' == $action ) {137 bbp_add_error( 'wporg_bbp_unstick_ topic', __( '<strong>ERROR</strong>: There was a problem unsticking that topic!', 'wporg-forums' ) );134 } elseif ( true === $is_sticky && 'wporg_bbp_stick_compat_topic' == $action ) { 135 bbp_add_error( 'wporg_bbp_stick_compat_topic', __( '<strong>ERROR</strong>: There was a problem sticking that topic!', 'wporg-forums' ) ); 136 } elseif ( false === $is_sticky && 'wporg_bbp_unstick_compat_topic' == $action ) { 137 bbp_add_error( 'wporg_bbp_unstick_compat_topic', __( '<strong>ERROR</strong>: There was a problem unsticking that topic!', 'wporg-forums' ) ); 138 138 } 139 139 } … … 189 189 if ( self::is_sticky( $term->term_id, $topic->ID ) ) { 190 190 $text = $r['unstick']; 191 $query_args = array( 'action' => 'wporg_bbp_unstick_ topic', 'topic_id' => $topic->ID, 'term_id' => $term->term_id );191 $query_args = array( 'action' => 'wporg_bbp_unstick_compat_topic', 'topic_id' => $topic->ID, 'term_id' => $term->term_id ); 192 192 } else { 193 193 $text = $r['stick']; 194 $query_args = array( 'action' => 'wporg_bbp_stick_ topic', 'topic_id' => $topic->ID, 'term_id' => $term->term_id );194 $query_args = array( 'action' => 'wporg_bbp_stick_compat_topic', 'topic_id' => $topic->ID, 'term_id' => $term->term_id ); 195 195 } 196 196
Note: See TracChangeset
for help on using the changeset viewer.