Skip to content
Snippets Groups Projects
Commit d29eff9c authored by Erick Hitter's avatar Erick Hitter
Browse files

grunt build

parent c19a0029
Branches
No related tags found
Loading
......@@ -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
*
......
......@@ -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' );
}
}
......
......@@ -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 ""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment