hmm, my post keeps getting deleted, so, I am assuming it’s because I post a link to the answer rather than writing it here, so, I’ll copy and paste it here:
HOW TO RECOVER “RESTORE” AND “DELETE PERMANENTLY” BULK ACTIONS IN TRASH / SPAM VIEW
Assumptions
A: WordPress 4.2.2
B: Flamingo WordPress Plugin v1.2
C: Contact Form 7 Version 4.2.1
Instructions
1.) Go to File:
/wp-content/plugins/flamingo/admin/includes/class-inbound-messages-list-table.php
2.) Go to Line 156 (approx):
function get_bulk_actions() {
3.) Immediately after, copy and paste this code:
if ( ! empty( $_REQUEST[‘post_status’] ) ) {
if ( $_REQUEST[‘post_status’] == ‘trash’ ) {
$yewsTrash = true;
} elseif ( $_REQUEST[‘post_status’] == ‘spam’ ) {
$yewsSpam = true;
}
}
4.) Replace the if statements with the following:
if ( $this->is_trash || $yewsTrash == true ) {
if ( $this->is_trash || !EMPTY_TRASH_DAYS || $yewsTrash == true ) {
if ( $this->is_spam || $yewsSpam == true ) {
SO – the full function should be:
function get_bulk_actions() {
if ( ! empty( $_REQUEST['post_status'] ) ) {
if ( $_REQUEST['post_status'] == 'trash' ) {
$yewsTrash = true;
} elseif ( $_REQUEST['post_status'] == 'spam' ) {
$yewsSpam = true;
}
}
$actions = array();
if ( $this->is_trash || $yewsTrash == true ) {
$actions['untrash'] = __( 'Restore', 'flamingo' );
}
if ( $this->is_trash || !EMPTY_TRASH_DAYS || $yewsTrash == true ) {
$actions['delete'] = __( 'Delete Permanently', 'flamingo' );
} else {
$actions['trash'] = __( 'Move to Trash', 'flamingo' );
}
if ( $this->is_spam || $yewsSpam == true ) {
$actions['unspam'] = __( 'Not Spam', 'flamingo' );
} else {
$actions['spam'] = __( 'Mark as Spam', 'flamingo' );
}
return $actions;
}
UPDATE: recover the “Empty Trash” button
1.) Find (near lines 200-250):
if ( $this->is_trash && current_user_can( ‘flamingo_delete_inbound_messages’ ) ) {
submit_button( __( ‘Empty Trash’, ‘flamingo’ ),
‘button-secondary apply’, ‘delete_all’, false );
}
2.) Replace above completely with:
if ( ! empty( $_REQUEST['post_status'] ) ) {
if ( $_REQUEST['post_status'] == 'trash' ) {
$yewsTrash = true;
}
}
if ( ($this->is_trash || $yewsTrash == true) && current_user_can( 'flamingo_delete_inbound_messages' ) ) {
submit_button( __( 'Empty Trash', 'flamingo' ),
'button-secondary apply', 'delete_all', false );
}
NOTE 1: these changes can be removed when the plugin is updated.
NOTE 2: we do not take any responsibility for you using the above and editing your files.?