Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
Bulk Actions Cron Offload
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
WP Plugins
Bulk Actions Cron Offload
Commits
d29eff9c
Commit
d29eff9c
authored
7 years ago
by
Erick Hitter
Browse files
Options
Downloads
Patches
Plain Diff
grunt build
parent
c19a0029
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bulk-edit-cron-offload.php
+1
-1
1 addition, 1 deletion
bulk-edit-cron-offload.php
includes/class-delete-all.php
+5
-4
5 additions, 4 deletions
includes/class-delete-all.php
languages/bulk-edit-cron-offload.pot
+13
-1
13 additions, 1 deletion
languages/bulk-edit-cron-offload.pot
with
19 additions
and
6 deletions
bulk-edit-cron-offload.php
+
1
−
1
View file @
d29eff9c
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
* Description: Process Bulk Edit requests using Cron
* Description: Process Bulk Edit requests using Cron
* Author: Erick Hitter, Automattic
* Author: Erick Hitter, Automattic
* Author URI: https://automattic.com/
* Author URI: https://automattic.com/
* Text Domain:
automattic-
bulk-edit-cron-offload
* Text Domain: bulk-edit-cron-offload
* Domain Path: /languages
* Domain Path: /languages
* Version: 1.0
* Version: 1.0
*
*
...
...
This diff is collapsed.
Click to expand it.
includes/class-delete-all.php
+
5
−
4
View file @
d29eff9c
...
@@ -76,7 +76,7 @@ class Delete_All {
...
@@ -76,7 +76,7 @@ class Delete_All {
$error
=
array
();
$error
=
array
();
foreach
(
$post_ids
as
$post_id
)
{
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
)
)
{
if
(
!
user_can
(
$vars
->
user_id
,
'delete_post'
,
$post_id
)
)
{
$auth_error
[]
=
$post_id
;
$auth_error
[]
=
$post_id
;
continue
;
continue
;
...
@@ -99,6 +99,7 @@ class Delete_All {
...
@@ -99,6 +99,7 @@ class Delete_All {
// Take a break periodically.
// Take a break periodically.
if
(
0
===
$count
++
%
50
)
{
if
(
0
===
$count
++
%
50
)
{
stop_the_insanity
();
stop_the_insanity
();
sleep
(
3
);
}
}
}
}
...
@@ -120,15 +121,15 @@ class Delete_All {
...
@@ -120,15 +121,15 @@ class Delete_All {
if
(
isset
(
$_REQUEST
[
self
::
ADMIN_NOTICE_KEY
]
)
)
{
if
(
isset
(
$_REQUEST
[
self
::
ADMIN_NOTICE_KEY
]
)
)
{
if
(
1
===
(
int
)
$_REQUEST
[
self
::
ADMIN_NOTICE_KEY
]
)
{
if
(
1
===
(
int
)
$_REQUEST
[
self
::
ADMIN_NOTICE_KEY
]
)
{
$class
=
'notice-success'
;
$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
{
}
else
{
$class
=
'notice-error'
;
$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'
]
)
{
}
elseif
(
'edit'
===
$screen
->
base
&&
isset
(
$_REQUEST
[
'post_status'
]
)
&&
'trash'
===
$_REQUEST
[
'post_status'
]
)
{
if
(
self
::
action_next_scheduled
(
self
::
CRON_EVENT
,
$screen
->
post_type
)
)
{
if
(
self
::
action_next_scheduled
(
self
::
CRON_EVENT
,
$screen
->
post_type
)
)
{
$class
=
'notice-warning'
;
$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'
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
languages/bulk-edit-cron-offload.pot
+
13
−
1
View file @
d29eff9c
...
@@ -5,7 +5,7 @@ msgstr ""
...
@@ -5,7 +5,7 @@ msgstr ""
"Project-Id-Version: Bulk Edit Cron Offload 1.0\n"
"Project-Id-Version: Bulk Edit Cron Offload 1.0\n"
"Report-Msgid-Bugs-To: "
"Report-Msgid-Bugs-To: "
"https://wordpress.org/support/plugin/bulk-edit-cron-offload\n"
"https://wordpress.org/support/plugin/bulk-edit-cron-offload\n"
"POT-Creation-Date: 2017-09-13 0
0:10
:5
7
+00:00\n"
"POT-Creation-Date: 2017-09-13 0
1:24
:5
4
+00:00\n"
"MIME-Version: 1.0\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Content-Transfer-Encoding: 8bit\n"
...
@@ -25,6 +25,18 @@ msgstr ""
...
@@ -25,6 +25,18 @@ msgstr ""
"X-Poedit-Bookmarks: \n"
"X-Poedit-Bookmarks: \n"
"X-Textdomain-Support: yes\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
#. Plugin Name of the plugin/theme
msgid "Bulk Edit Cron Offload"
msgid "Bulk Edit Cron Offload"
msgstr ""
msgstr ""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment