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
43881ffa
Commit
43881ffa
authored
8 years ago
by
Erick Hitter
Browse files
Options
Downloads
Patches
Plain Diff
Handle all actions Core supports
`action2` isn't used in the post list table, but that could change
parent
41f213ca
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
includes/class-main.php
+9
-3
9 additions, 3 deletions
includes/class-main.php
with
9 additions
and
3 deletions
includes/class-main.php
+
9
−
3
View file @
43881ffa
...
...
@@ -15,7 +15,7 @@ class Main {
*/
public
static
function
intercept
()
{
// Nothing to do
if
(
!
isset
(
$_REQUEST
[
'action'
]
)
)
{
if
(
!
isset
(
$_REQUEST
[
'action'
]
)
&&
!
isset
(
$_REQUEST
[
'action2'
]
)
&&
!
isset
(
$_REQUEST
[
'delete_all'
]
)
)
{
return
;
}
...
...
@@ -52,8 +52,13 @@ class Main {
private
static
function
capture_vars
()
{
$vars
=
new
\stdClass
();
// Capture request variables
$vars
->
action
=
$_REQUEST
[
'action'
];
if
(
isset
(
$_REQUEST
[
'delete_all'
]
)
)
{
$vars
->
action
=
'delete_all'
;
}
elseif
(
isset
(
$_REQUEST
[
'action'
]
)
&&
-
1
!==
(
int
)
$_REQUEST
[
'action'
]
)
{
$vars
->
action
=
(
int
)
$_REQUEST
[
'action'
];
}
elseif
(
isset
(
$_REQUEST
[
'action2'
]
)
&&
-
1
!==
(
int
)
$_REQUEST
[
'action2'
]
)
{
$vars
->
action
=
(
int
)
$_REQUEST
[
'action2'
];
}
if
(
isset
(
$_REQUEST
[
'post'
]
)
&&
is_array
(
$_REQUEST
[
'post'
]
)
)
{
$vars
->
posts
=
array_map
(
'absint'
,
$_REQUEST
[
'post'
]
);
...
...
@@ -90,6 +95,7 @@ class Main {
// Stop Core from processing bulk request
unset
(
$_REQUEST
[
'action'
]
);
unset
(
$_REQUEST
[
'action2'
]
);
unset
(
$_REQUEST
[
'delete_all'
]
);
// Return captured variables
return
$vars
;
...
...
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