diff --git a/bulk-edit-cron-offload.php b/bulk-edit-cron-offload.php index ee7054e0eb1836620410a8fff49be2fbc9bff98d..3610dc89521a217146aa55d36689a32ef5b56833 100644 --- a/bulk-edit-cron-offload.php +++ b/bulk-edit-cron-offload.php @@ -5,7 +5,7 @@ * Description: Process Bulk Edit requests using Cron * Author: Erick Hitter, Automattic * Author URI: https://automattic.com/ - * Text Domain: automattic-bulk-edit-cron-offload + * Text Domain: bulk-edit-cron-offload * Domain Path: /languages * Version: 1.0 * diff --git a/includes/class-delete-all.php b/includes/class-delete-all.php index 356e25ba3971174791fb9840893866642f834e6c..6edc43b30f7b18832f973902b3995abe72c1ae5c 100644 --- a/includes/class-delete-all.php +++ b/includes/class-delete-all.php @@ -76,7 +76,7 @@ class Delete_All { $error = array(); foreach ( $post_ids as $post_id ) { - // Can the user delete this post. + // Can the user delete this post? if ( ! user_can( $vars->user_id, 'delete_post', $post_id ) ) { $auth_error[] = $post_id; continue; @@ -99,6 +99,7 @@ class Delete_All { // Take a break periodically. if ( 0 === $count++ % 50 ) { stop_the_insanity(); + sleep( 3 ); } } @@ -120,15 +121,15 @@ class Delete_All { if ( isset( $_REQUEST[ self::ADMIN_NOTICE_KEY ] ) ) { if ( 1 === (int) $_REQUEST[ self::ADMIN_NOTICE_KEY ] ) { $class = 'notice-success'; - $message = __( 'Success! The trash will be emptied soon.', 'automattic-bulk-edit-cron-offload' ); + $message = __( 'Success! The trash will be emptied soon.', 'bulk-edit-cron-offload' ); } else { $class = 'notice-error'; - $message = __( 'A request to empty the trash is already pending for this post type.', 'automattic-bulk-edit-cron-offload' ); + $message = __( 'A request to empty the trash is already pending for this post type.', 'bulk-edit-cron-offload' ); } } elseif ( 'edit' === $screen->base && isset( $_REQUEST['post_status'] ) && 'trash' === $_REQUEST['post_status'] ) { if ( self::action_next_scheduled( self::CRON_EVENT, $screen->post_type ) ) { $class = 'notice-warning'; - $message = __( 'A pending request to empty the trash will be processed soon.', 'automattic-bulk-edit-cron-offload' ); + $message = __( 'A pending request to empty the trash will be processed soon.', 'bulk-edit-cron-offload' ); } } diff --git a/languages/bulk-edit-cron-offload.pot b/languages/bulk-edit-cron-offload.pot index c61a699cf66937b19ba5bdfccdd3bc2e02575ea3..ba8d037a21ee446652f324099a4d8509acb919b8 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 00:10:57+00:00\n" +"POT-Creation-Date: 2017-09-13 01:24:54+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -25,6 +25,18 @@ msgstr "" "X-Poedit-Bookmarks: \n" "X-Textdomain-Support: yes\n" +#: includes/class-delete-all.php:124 +msgid "Success! The trash will be emptied soon." +msgstr "" + +#: includes/class-delete-all.php:127 +msgid "A request to empty the trash is already pending for this post type." +msgstr "" + +#: includes/class-delete-all.php:132 +msgid "A pending request to empty the trash will be processed soon." +msgstr "" + #. Plugin Name of the plugin/theme msgid "Bulk Edit Cron Offload" msgstr ""