Changeset 7352 for trunk/src/includes/admin/topics.php
- Timestamp:
- 11/14/2025 04:17:43 PM (5 months ago)
- File:
-
- 1 edited
-
trunk/src/includes/admin/topics.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/topics.php
r7190 r7352 539 539 $anonymous_data = bbp_filter_anonymous_post_data(); 540 540 $author_id = bbp_get_topic_author_id( $topic_id ); 541 $is_edit = ( isset( $_POST['hidden_post_status'] ) && ( $_POST['hidden_post_status'] !== 'draft') );541 $is_edit = ( isset( $_POST['hidden_post_status'] ) && ( 'draft' !== $_POST['hidden_post_status'] ) ); 542 542 543 543 // Formally update the topic … … 710 710 switch ( $notice ) { 711 711 case 'opened' : 712 $message = ( $is_failure === true )712 $message = ( true === $is_failure ) 713 713 ? sprintf( esc_html__( 'There was a problem opening the topic "%1$s".', 'bbpress' ), $topic_title ) 714 714 : sprintf( esc_html__( 'Topic "%1$s" successfully opened.', 'bbpress' ), $topic_title ); … … 716 716 717 717 case 'closed' : 718 $message = ( $is_failure === true )718 $message = ( true === $is_failure ) 719 719 ? sprintf( esc_html__( 'There was a problem closing the topic "%1$s".', 'bbpress' ), $topic_title ) 720 720 : sprintf( esc_html__( 'Topic "%1$s" successfully closed.', 'bbpress' ), $topic_title ); … … 722 722 723 723 case 'super_sticky' : 724 $message = ( $is_failure === true )724 $message = ( true === $is_failure ) 725 725 ? sprintf( esc_html__( 'There was a problem sticking the topic "%1$s" to front.', 'bbpress' ), $topic_title ) 726 726 : sprintf( esc_html__( 'Topic "%1$s" successfully stuck to front.', 'bbpress' ), $topic_title ); … … 728 728 729 729 case 'stuck' : 730 $message = ( $is_failure === true )730 $message = ( true === $is_failure ) 731 731 ? sprintf( esc_html__( 'There was a problem sticking the topic "%1$s".', 'bbpress' ), $topic_title ) 732 732 : sprintf( esc_html__( 'Topic "%1$s" successfully stuck.', 'bbpress' ), $topic_title ); … … 734 734 735 735 case 'unstuck' : 736 $message = ( $is_failure === true)736 $message = ( true === $is_failure ) 737 737 ? sprintf( esc_html__( 'There was a problem unsticking the topic "%1$s".', 'bbpress' ), $topic_title ) 738 738 : sprintf( esc_html__( 'Topic "%1$s" successfully unstuck.', 'bbpress' ), $topic_title ); … … 740 740 741 741 case 'spammed' : 742 $message = ( $is_failure === true )742 $message = ( true === $is_failure ) 743 743 ? sprintf( esc_html__( 'There was a problem marking the topic "%1$s" as spam.', 'bbpress' ), $topic_title ) 744 744 : sprintf( esc_html__( 'Topic "%1$s" successfully marked as spam.', 'bbpress' ), $topic_title ); … … 746 746 747 747 case 'unspammed' : 748 $message = ( $is_failure === true )748 $message = ( true === $is_failure ) 749 749 ? sprintf( esc_html__( 'There was a problem unmarking the topic "%1$s" as spam.', 'bbpress' ), $topic_title ) 750 750 : sprintf( esc_html__( 'Topic "%1$s" successfully unmarked as spam.', 'bbpress' ), $topic_title ); … … 752 752 753 753 case 'approved' : 754 $message = ( $is_failure === true )754 $message = ( true === $is_failure ) 755 755 ? sprintf( esc_html__( 'There was a problem approving the topic "%1$s".', 'bbpress' ), $topic_title ) 756 756 : sprintf( esc_html__( 'Topic "%1$s" successfully approved.', 'bbpress' ), $topic_title ); … … 758 758 759 759 case 'unapproved' : 760 $message = ( $is_failure === true )760 $message = ( true === $is_failure ) 761 761 ? sprintf( esc_html__( 'There was a problem unapproving the topic "%1$s".', 'bbpress' ), $topic_title ) 762 762 : sprintf( esc_html__( 'Topic "%1$s" successfully unapproved.', 'bbpress' ), $topic_title ); … … 766 766 // Do additional topic toggle notice filters (admin side) 767 767 $message = apply_filters( 'bbp_toggle_topic_notice_admin', $message, $topic_id, $notice, $is_failure ); 768 $class = ( $is_failure === true )768 $class = ( true === $is_failure ) 769 769 ? 'error' 770 770 : 'updated';
Note: See TracChangeset
for help on using the changeset viewer.