diff --git a/includes/class-restore-from-trash.php b/includes/class-restore-from-trash.php index da005d3fc2f1d77133cb2bdc8b549dd7be51063b..f1e79b54729d066a234d8790f0ca55e2f3cfe168 100644 --- a/includes/class-restore-from-trash.php +++ b/includes/class-restore-from-trash.php @@ -113,18 +113,12 @@ class Restore_From_Trash { $type = 'error'; $message = __( 'The selected posts are already scheduled to be restored.', 'bulk-edit-cron-offload' ); } - } //elseif ( 'edit' === $screen->base ) { -// if ( isset( $_REQUEST['post_status'] ) && 'trash' === $_REQUEST['post_status'] ) { -// return; -// } -// -// $status = isset( $_REQUEST['post_status'] ) ? $_REQUEST['post_status'] : 'all'; -// -// if ( Main::get_post_ids_for_pending_events( self::ACTION, $screen->post_type, $status ) ) { -// $type = 'warning'; -// $message = __( 'Some items that would normally be shown here are waiting to be moved to the trash. These items are hidden until they are moved.', 'bulk-edit-cron-offload' ); -// } -// } + } elseif ( 'edit' === $screen->base && isset( $_REQUEST['post_status'] ) && 'trash' === $_REQUEST['post_status'] ) { + if ( Main::get_post_ids_for_pending_events( self::ACTION, $screen->post_type, 'trash' ) ) { + $type = 'warning'; + $message = __( 'Some items that would normally be shown here are waiting to be restored from the trash. These items are hidden until they are restored.', 'bulk-edit-cron-offload' ); + } + } Main::render_admin_notice( $type, $message ); } diff --git a/languages/bulk-edit-cron-offload.pot b/languages/bulk-edit-cron-offload.pot index 00f39df29866b2f7d3de38def2161bca21a7ddcc..c90811ff746d5f35c74167c6571d4c8fe01e42a4 100644 --- a/languages/bulk-edit-cron-offload.pot +++ b/languages/bulk-edit-cron-offload.pot @@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: Bulk Edit Cron Offload 1.0\n" "Report-Msgid-Bugs-To: " "https://wordpress.org/support/plugin/bulk-edit-cron-offload\n" -"POT-Creation-Date: 2017-09-13 05:28:23+00:00\n" +"POT-Creation-Date: 2017-09-14 05:06:18+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -25,32 +25,46 @@ msgstr "" "X-Poedit-Bookmarks: \n" "X-Textdomain-Support: yes\n" -#: includes/class-delete-all.php:121 +#: includes/class-delete-all.php:123 msgid "Success! The trash will be emptied shortly." msgstr "" -#: includes/class-delete-all.php:124 +#: includes/class-delete-all.php:126 msgid "A request to empty the trash is already pending for this post type." msgstr "" -#: includes/class-delete-all.php:129 +#: includes/class-delete-all.php:131 msgid "A pending request to empty the trash will be processed soon." msgstr "" -#: includes/class-move-to-trash.php:109 +#: includes/class-move-to-trash.php:111 msgid "Success! The selected posts will be moved to the trash shortly." msgstr "" -#: includes/class-move-to-trash.php:112 +#: includes/class-move-to-trash.php:114 msgid "The selected posts are already scheduled to be moved to the trash." msgstr "" -#: includes/class-move-to-trash.php:123 +#: includes/class-move-to-trash.php:126 msgid "" "Some items that would normally be shown here are waiting to be moved to the " "trash. These items are hidden until they are moved." msgstr "" +#: includes/class-restore-from-trash.php:111 +msgid "Success! The selected posts will be restored shortly." +msgstr "" + +#: includes/class-restore-from-trash.php:114 +msgid "The selected posts are already scheduled to be restored." +msgstr "" + +#: includes/class-restore-from-trash.php:119 +msgid "" +"Some items that would normally be shown here are waiting to be restored " +"from the trash. These items are hidden until they are restored." +msgstr "" + #. Plugin Name of the plugin/theme msgid "Bulk Edit Cron Offload" msgstr ""