Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
WP Plugins
Cron-Control
Commits
b31c3c41
Verified
Commit
b31c3c41
authored
Nov 04, 2016
by
Erick Hitter
Browse files
On second thought, a utility isn't needed for this
See a2c0141d8
parent
5a2dceca
Changes
2
Hide whitespace changes
Inline
Side-by-side
includes/functions.php
View file @
b31c3c41
...
...
@@ -8,16 +8,3 @@ namespace WP_Cron_Control_Revisited;
function
get_plugin_var
(
$variable
)
{
return
property_exists
(
Main
::
instance
(),
$variable
)
?
Main
::
instance
()
->
$variable
:
null
;
}
/**
* Delete an event
*
* @param $timestamp int Unix timestamp
* @param $action string name of action used when the event is registered (unhashed)
* @param $instance string md5 hash of the event's arguments array, which Core uses to index the `cron` option
*
* @return bool
*/
function
delete_cron_event
(
$timestamp
,
$action
,
$instance
)
{
return
Cron_Options_CPT
::
instance
()
->
delete_event
(
$timestamp
,
$action
,
$instance
);
}
wp-cron-control-revisited.php
View file @
b31c3c41
...
...
@@ -248,7 +248,7 @@ class Main {
}
wp_unschedule_event
(
$event
[
'timestamp'
],
$event
[
'action'
],
$event
[
'args'
]
);
delete_
cron_
event
(
$event
[
'timestamp'
],
$event
[
'action'
],
$event
[
'instance'
]
);
Cron_Options_CPT
::
instance
()
->
delete_event
(
$event
[
'timestamp'
],
$event
[
'action'
],
$event
[
'instance'
]
);
// Run the event
do_action_ref_array
(
$event
[
'action'
],
$event
[
'args'
]
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment