Changeset 3505 for branches/plugin/bbp-admin/bbp-replies.php
- Timestamp:
- 09/10/2011 10:27:19 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-admin/bbp-replies.php
r3445 r3505 666 666 */ 667 667 function replies_row_actions( $actions, $reply ) { 668 global $bbp;669 668 670 669 if ( bbp_get_reply_post_type() == $reply->post_type ) { … … 680 679 // Only show the actions if the user is capable of viewing them 681 680 if ( current_user_can( 'moderate', $reply->ID ) ) { 682 if ( in_array( $reply->post_status, array( 'publish', $bbp->spam_status_id) ) ) {681 if ( in_array( $reply->post_status, array( bbp_get_public_status_id(), bbp_get_spam_status_id() ) ) ) { 683 682 $spam_uri = esc_url( 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 ) ); 684 if ( bbp_is_reply_spam( $reply->ID ) ) 683 if ( bbp_is_reply_spam( $reply->ID ) ) { 685 684 $actions['spam'] = '<a href="' . $spam_uri . '" title="' . esc_attr__( 'Mark the reply as not spam', 'bbpress' ) . '">' . __( 'Not spam', 'bbpress' ) . '</a>'; 686 else685 } else { 687 686 $actions['spam'] = '<a href="' . $spam_uri . '" title="' . esc_attr__( 'Mark this reply as spam', 'bbpress' ) . '">' . __( 'Spam', 'bbpress' ) . '</a>'; 687 } 688 688 } 689 689 } … … 691 691 // Trash 692 692 if ( current_user_can( 'delete_reply', $reply->ID ) ) { 693 if ( $bbp->trash_status_id== $reply->post_status ) {693 if ( bbp_get_trash_status_id() == $reply->post_status ) { 694 694 $post_type_object = get_post_type_object( bbp_get_reply_post_type() ); 695 695 $actions['untrash'] = "<a title='" . esc_attr( __( 'Restore this item from the Trash', 'bbpress' ) ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), admin_url( 'edit.php' ) ) ), wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&action=untrash', $reply->ID ) ), 'untrash-' . $reply->post_type . '_' . $reply->ID ) ) . "'>" . __( 'Restore', 'bbpress' ) . "</a>"; … … 698 698 } 699 699 700 if ( $bbp->trash_status_id== $reply->post_status || !EMPTY_TRASH_DAYS ) {700 if ( bbp_get_trash_status_id() == $reply->post_status || !EMPTY_TRASH_DAYS ) { 701 701 $actions['delete'] = "<a class='submitdelete' title='" . esc_attr( __( 'Delete this item permanently', 'bbpress' ) ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $reply->ID, '', true ) ) . "'>" . __( 'Delete Permanently', 'bbpress' ) . "</a>"; 702 } elseif ( $bbp->spam_status_id== $reply->post_status ) {702 } elseif ( bbp_get_spam_status_id() == $reply->post_status ) { 703 703 unset( $actions['trash'] ); 704 704 } … … 873 873 global $bbp; 874 874 875 // Bail if bbPress is not loaded 876 if ( 'bbPress' !== get_class( $bbp ) ) return; 877 875 878 $bbp->admin->replies = new BBP_Replies_Admin(); 876 879 }
Note: See TracChangeset
for help on using the changeset viewer.