Ticket #2734: 2734.7.patch
| File 2734.7.patch, 3.8 KB (added by , 10 years ago) |
|---|
-
src/includes/admin/replies.php
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 ) { -
src/includes/admin/topics.php
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 ) {