Changeset 6790
- Timestamp:
- 03/27/2018 07:38:26 PM (7 years ago)
- Location:
- trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bbpress.php
r6777 r6790 204 204 /** Versions **********************************************************/ 205 205 206 $this->version = '2.6-rc-67 69';206 $this->version = '2.6-rc-6789'; 207 207 $this->db_version = '262'; 208 208 -
trunk/src/includes/admin/assets/css/admin.css
r6770 r6790 414 414 } 415 415 416 #the-list .status-closed { 416 body.post-type-forum #the-list .status-closed, 417 body.post-type-topic #the-list .status-closed, 418 body.post-type-reply #the-list .status-closed { 417 419 background-color: #f5f5f5; 418 420 } 419 421 420 #the-list .status-closed:nth-child(odd) { 422 body.post-type-forum #the-list .status-closed:nth-child(odd), 423 body.post-type-topic #the-list .status-closed:nth-child(odd), 424 body.post-type-reply #the-list .status-closed:nth-child(odd) { 421 425 background-color: #f0f0f0; 422 426 } 423 427 424 #the-list .status-spam, 428 body.post-type-forum #the-list .status-spam, 429 body.post-type-topic #the-list .status-spam, 430 body.post-type-reply #the-list .status-spam, 425 431 #bbp-reply-list .status-trash { 426 432 background-color: #fee; 427 433 } 428 434 429 #the-list .status-spam:nth-child(odd), 435 body.post-type-forum #the-list .status-spam:nth-child(odd), 436 body.post-type-topic #the-list .status-spam:nth-child(odd), 437 body.post-type-reply #the-list .status-spam:nth-child(odd), 430 438 #bbp-reply-list .status-trash:nth-child(odd) { 431 439 background-color: #fdd; 432 440 } 433 441 434 #the-list .status-pending { 442 body.post-type-forum #the-list .status-pending, 443 body.post-type-topic #the-list .status-pending, 444 body.post-type-reply #the-list .status-pending { 435 445 background-color: #fff2e8; 436 446 } 437 447 438 #the-list .status-pending:nth-child(odd) { 448 body.post-type-forum #the-list .status-pending:nth-child(odd), 449 body.post-type-topic #the-list .status-pending:nth-child(odd), 450 body.post-type-reply #the-list .status-pending:nth-child(odd) { 439 451 background-color: #fff7f1; 440 452 } 441 453 442 #the-list .status-closed td, 443 #the-list .status-spam td, 454 body.post-type-forum #the-list .status-closed td, 455 body.post-type-topic #the-list .status-closed td, 456 body.post-type-reply #the-list .status-closed td, 457 body.post-type-forum #the-list .status-spam td, 458 body.post-type-topic #the-list .status-spam td, 459 body.post-type-reply #the-list .status-spam td, 444 460 #bbp-reply-list .status-trash td { 445 461 color: #999; 462 } 463 464 body.post-type-forum #the-list .row-actions .unspam a, 465 body.post-type-topic #the-list .row-actions .unspam a, 466 body.post-type-reply #the-list .row-actions .unspam a, 467 body.post-type-forum #the-list .row-actions .approved a, 468 body.post-type-topic #the-list .row-actions .approved a, 469 body.post-type-reply #the-list .row-actions .approved a { 470 color: #006505; 446 471 } 447 472 -
trunk/src/includes/admin/replies.php
r6780 r6790 471 471 check_admin_referer( 'approve-reply_' . $reply_id ); 472 472 473 $is_approve = bbp_is_reply_p ending( $reply_id );473 $is_approve = bbp_is_reply_published( $reply_id ); 474 474 $message = ( true === $is_approve ) 475 ? ' approved'476 : ' unapproved';475 ? 'unpproved' 476 : 'approved'; 477 477 $success = ( true === $is_approve ) 478 478 ? bbp_approve_reply( $reply_id ) … … 605 605 'unapproved', 606 606 'spam', 607 'unspam', 607 608 'trash', 608 609 'untrash', … … 812 813 $spam_uri = wp_nonce_url( add_query_arg( array( 'reply_id' => $reply->ID, 'action' => 'bbp_toggle_reply_spam' ), remove_query_arg( array( 'bbp_reply_toggle_notice', 'reply_id', 'failed', 'super' ) ) ), 'spam-reply_' . $reply->ID ); 813 814 if ( bbp_is_reply_spam( $reply->ID ) ) { 814 $actions[' spam'] = '<a href="' . esc_url( $spam_uri ) . '" title="' . esc_attr__( 'Mark the reply as not spam', 'bbpress' ) . '">' . esc_html__( 'Not spam', 'bbpress' ) . '</a>';815 $actions['unspam'] = '<a href="' . esc_url( $spam_uri ) . '" title="' . esc_attr__( 'Mark the reply as not spam', 'bbpress' ) . '">' . esc_html__( 'Not Spam', 'bbpress' ) . '</a>'; 815 816 } else { 816 817 $actions['spam'] = '<a href="' . esc_url( $spam_uri ) . '" title="' . esc_attr__( 'Mark this reply as spam', 'bbpress' ) . '">' . esc_html__( 'Spam', 'bbpress' ) . '</a>'; -
trunk/src/includes/admin/topics.php
r6780 r6790 589 589 check_admin_referer( 'approve-topic_' . $topic_id ); 590 590 591 $is_approve = bbp_is_topic_p ending( $topic_id );592 $message = ( true === $is_approve )593 ? ' approved'594 : ' unapproved';595 $success = ( true === $is_approve )591 $is_approve = bbp_is_topic_published( $topic_id ); 592 $message = ( false === $is_approve ) 593 ? 'unapproved' 594 : 'approved'; 595 $success = ( false === $is_approve ) 596 596 ? bbp_approve_topic( $topic_id ) 597 597 : bbp_unapprove_topic( $topic_id ); … … 788 788 'closed', 789 789 'spam', 790 'unspam', 790 791 'trash', 791 792 'untrash', … … 1011 1012 $spam_uri = wp_nonce_url( add_query_arg( array( 'topic_id' => $topic->ID, 'action' => 'bbp_toggle_topic_spam' ), remove_query_arg( array( 'bbp_topic_toggle_notice', 'topic_id', 'failed', 'super' ) ) ), 'spam-topic_' . $topic->ID ); 1012 1013 if ( bbp_is_topic_spam( $topic->ID ) ) { 1013 $actions[' spam'] = '<a href="' . esc_url( $spam_uri ) . '" title="' . esc_attr__( 'Mark the topic as not spam', 'bbpress' ) . '">' . esc_html__( 'Not spam', 'bbpress' ) . '</a>';1014 $actions['unspam'] = '<a href="' . esc_url( $spam_uri ) . '" title="' . esc_attr__( 'Mark the topic as not spam', 'bbpress' ) . '">' . esc_html__( 'Not Spam', 'bbpress' ) . '</a>'; 1014 1015 } else { 1015 1016 $actions['spam'] = '<a href="' . esc_url( $spam_uri ) . '" title="' . esc_attr__( 'Mark this topic as spam', 'bbpress' ) . '">' . esc_html__( 'Spam', 'bbpress' ) . '</a>'; -
trunk/src/includes/topics/functions.php
r6784 r6790 2853 2853 } 2854 2854 2855 // Get new status 2856 $status = bbp_get_spam_status_id(); 2857 2855 2858 // Bail if topic is spam 2856 if ( bbp_get_spam_status_id()=== $topic->post_status ) {2859 if ( $status === $topic->post_status ) { 2857 2860 return false; 2858 2861 } … … 2865 2868 2866 2869 // Set post status to spam 2867 $topic->post_status = bbp_get_spam_status_id();2870 $topic->post_status = $status; 2868 2871 2869 2872 // Empty the topic of its tags … … 3156 3159 } 3157 3160 3161 // Get new status 3162 $status = bbp_get_public_status_id(); 3163 3158 3164 // Bail if already approved 3159 if ( bbp_get_pending_status_id() !== $topic->post_status ) {3165 if ( $status === $topic->post_status ) { 3160 3166 return false; 3161 3167 } … … 3196 3202 } 3197 3203 3204 // Get new status 3205 $status = bbp_get_pending_status_id(); 3206 3198 3207 // Bail if already pending 3199 if ( bbp_get_pending_status_id()=== $topic->post_status ) {3208 if ( $status === $topic->post_status ) { 3200 3209 return false; 3201 3210 } … … 3205 3214 3206 3215 // Set pending status 3207 $topic->post_status = bbp_get_pending_status_id();3216 $topic->post_status = $status; 3208 3217 3209 3218 // No revisions
Note: See TracChangeset
for help on using the changeset viewer.