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
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
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
e7302112
Commit
e7302112
authored
7 years ago
by
Erick Hitter
Browse files
Options
Downloads
Patches
Plain Diff
Better organization
parent
0033ea1e
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
+20
-20
20 additions, 20 deletions
includes/class-main.php
with
20 additions
and
20 deletions
includes/class-main.php
+
20
−
20
View file @
e7302112
...
@@ -237,26 +237,6 @@ class Main {
...
@@ -237,26 +237,6 @@ class Main {
unset
(
$_REQUEST
[
'delete_all2'
]
);
unset
(
$_REQUEST
[
'delete_all2'
]
);
}
}
/**
* Create cron event
*
* @param object $vars Bulk-request variables.
* @return bool
*/
public
static
function
schedule_processing
(
$vars
)
{
return
false
!==
wp_schedule_single_event
(
time
(),
self
::
CRON_EVENT
,
array
(
$vars
)
);
}
/**
* Retrieve timestamp for next scheduled event with given vars
*
* @param object $vars Bulk-request variables.
* @return int
*/
public
static
function
next_scheduled
(
$vars
)
{
return
(
int
)
wp_next_scheduled
(
self
::
CRON_EVENT
,
array
(
$vars
)
);
}
/**
/**
* Redirect, including a flag to indicate if the bulk process was scheduled successfully
* Redirect, including a flag to indicate if the bulk process was scheduled successfully
*
*
...
@@ -305,6 +285,26 @@ class Main {
...
@@ -305,6 +285,26 @@ class Main {
<?php
<?php
}
}
/**
* Create cron event
*
* @param object $vars Bulk-request variables.
* @return bool
*/
public
static
function
schedule_processing
(
$vars
)
{
return
false
!==
wp_schedule_single_event
(
time
(),
self
::
CRON_EVENT
,
array
(
$vars
)
);
}
/**
* Retrieve timestamp for next scheduled event with given vars
*
* @param object $vars Bulk-request variables.
* @return int
*/
public
static
function
next_scheduled
(
$vars
)
{
return
(
int
)
wp_next_scheduled
(
self
::
CRON_EVENT
,
array
(
$vars
)
);
}
/**
/**
* Find the next scheduled instance of a given action, regardless of arguments
* Find the next scheduled instance of a given action, regardless of arguments
*
*
...
...
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