diff --git src/includes/admin/replies.php src/includes/admin/replies.php
index cb7898a..1b4723e 100644
|
|
|
class BBP_Replies_Admin { |
| 819 | 819 | if ( current_user_can( 'delete_reply', $reply->ID ) ) { |
| 820 | 820 | if ( bbp_get_trash_status_id() === $reply->post_status ) { |
| 821 | 821 | $post_type_object = get_post_type_object( bbp_get_reply_post_type() ); |
| 822 | | $actions['untrash'] = "<a title='" . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . "' href='" . esc_url( 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 ) ) ) . "'>" . esc_html__( 'Restore', 'bbpress' ) . "</a>"; |
| | 822 | $actions['untrash'] = "<a title='" . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . "' href='" . esc_url( wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&action=untrash', $reply->ID ) ), 'untrash-post_' . $reply->ID ) ) . "'>" . esc_html__( 'Restore', 'bbpress' ) . "</a>"; |
| 823 | 823 | } elseif ( EMPTY_TRASH_DAYS ) { |
| 824 | | $actions['trash'] = "<a class='submitdelete' title='" . esc_attr__( 'Move this item to the Trash', 'bbpress' ) . "' href='" . esc_url( 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 ) ) ) . "'>" . esc_html__( 'Trash', 'bbpress' ) . "</a>"; |
| | 824 | $actions['trash'] = "<a class='submitdelete' title='" . esc_attr__( 'Move this item to the Trash', 'bbpress' ) . "' href='" . esc_url( get_delete_post_link( $reply->ID ) ) . "'>" . esc_html__( 'Trash', 'bbpress' ) . "</a>"; |
| 825 | 825 | } |
| 826 | 826 | |
| 827 | 827 | if ( bbp_get_trash_status_id() === $reply->post_status || !EMPTY_TRASH_DAYS ) { |
| 828 | | $actions['delete'] = "<a class='submitdelete' title='" . esc_attr__( 'Delete this item permanently', 'bbpress' ) . "' href='" . esc_url( 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 ) ) ) . "'>" . esc_html__( 'Delete Permanently', 'bbpress' ) . "</a>"; |
| | 828 | $actions['delete'] = "<a class='submitdelete' title='" . esc_attr__( 'Delete this item permanently', 'bbpress' ) . "' href='" . esc_url( get_delete_post_link( $reply->ID ) ) . "'>" . esc_html__( 'Delete Permanently', 'bbpress' ) . "</a>"; |
| 829 | 829 | } elseif ( bbp_get_spam_status_id() === $reply->post_status ) { |
| 830 | 830 | unset( $actions['trash'] ); |
| 831 | 831 | } |
diff --git src/includes/admin/topics.php src/includes/admin/topics.php
index e865dc3..13c9ecd 100644
|
|
|
class BBP_Topics_Admin { |
| 972 | 972 | if ( current_user_can( 'delete_topic', $topic->ID ) ) { |
| 973 | 973 | if ( bbp_get_trash_status_id() === $topic->post_status ) { |
| 974 | 974 | $post_type_object = get_post_type_object( bbp_get_topic_post_type() ); |
| 975 | | $actions['untrash'] = "<a title='" . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . "' href='" . wp_nonce_url( add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit.php' ) ) ), admin_url( sprintf( $post_type_object->_edit_link . '&action=untrash', $topic->ID ) ) ), 'untrash-' . $topic->post_type . '_' . $topic->ID ) . "'>" . esc_html__( 'Restore', 'bbpress' ) . "</a>"; |
| | 975 | $actions['untrash'] = "<a title='" . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . "' href='" . esc_url( wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&action=untrash', $topic->ID ) ), 'untrash-post_' . $topic->ID ) ) . "'>" . esc_html__( 'Restore', 'bbpress' ) . "</a>"; |
| 976 | 976 | } elseif ( EMPTY_TRASH_DAYS ) { |
| 977 | | $actions['trash'] = "<a class='submitdelete' title='" . esc_attr__( 'Move this item to the Trash', 'bbpress' ) . "' href='" . esc_url( add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $topic->ID ) ) ) . "'>" . esc_html__( 'Trash', 'bbpress' ) . "</a>"; |
| | 977 | $actions['trash'] = "<a class='submitdelete' title='" . esc_attr__( 'Move this item to the Trash', 'bbpress' ) . "' href='" . esc_url( get_delete_post_link( $topic->ID ) ) . "'>" . esc_html__( 'Trash', 'bbpress' ) . "</a>"; |
| 978 | 978 | } |
| 979 | 979 | |
| 980 | 980 | if ( bbp_get_trash_status_id() === $topic->post_status || !EMPTY_TRASH_DAYS ) { |
| 981 | | $actions['delete'] = "<a class='submitdelete' title='" . esc_attr__( 'Delete this item permanently', 'bbpress' ) . "' href='" . esc_url( add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $topic->ID, '', true ) ) ) . "'>" . esc_html__( 'Delete Permanently', 'bbpress' ) . "</a>"; |
| | 981 | $actions['delete'] = "<a class='submitdelete' title='" . esc_attr__( 'Delete this item permanently', 'bbpress' ) . "' href='" . esc_url( get_delete_post_link( $topic->ID ) ) . "'>" . esc_html__( 'Delete Permanently', 'bbpress' ) . "</a>"; |
| 982 | 982 | } elseif ( bbp_get_spam_status_id() === $topic->post_status ) { |
| 983 | 983 | unset( $actions['trash'] ); |
| 984 | 984 | } |