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
7640b4c7
Verified
Commit
7640b4c7
authored
Nov 04, 2016
by
Erick Hitter
Browse files
More-consistent naming makes me seem less scattered. ;)
parent
45c5b8b0
Changes
2
Hide whitespace changes
Inline
Side-by-side
includes/class-cron-options-cpt.php
View file @
7640b4c7
...
...
@@ -141,7 +141,7 @@ class Cron_Options_CPT extends Singleton {
'post_status'
=>
$this
->
post_status
,
);
$this
->
create_
event
(
$job_post
);
$this
->
create_
job
(
$job_post
);
}
}
}
...
...
@@ -174,7 +174,7 @@ class Cron_Options_CPT extends Singleton {
/**
* Create a job post, respecting whether or not Core is ready for CPTs
*/
private
function
create_
event
(
$job_post
)
{
private
function
create_
job
(
$job_post
)
{
// If called before `init`, we need to insert directly because post types aren't registered earlier
if
(
did_action
(
'init'
)
)
{
wp_insert_post
(
$job_post
);
...
...
@@ -226,7 +226,7 @@ class Cron_Options_CPT extends Singleton {
*
* @return bool
*/
public
function
delete_
event
(
$timestamp
,
$action
,
$instance
)
{
public
function
delete_
job
(
$timestamp
,
$action
,
$instance
)
{
$job_exists
=
get_posts
(
array
(
'name'
=>
sprintf
(
'%s-%s-%s'
,
$timestamp
,
md5
(
$action
),
$instance
),
'post_type'
=>
$this
->
post_type
,
...
...
includes/class-main.php
View file @
7640b4c7
...
...
@@ -205,7 +205,7 @@ class Main extends Singleton {
}
wp_unschedule_event
(
$event
[
'timestamp'
],
$event
[
'action'
],
$event
[
'args'
]
);
Cron_Options_CPT
::
instance
()
->
delete_
event
(
$event
[
'timestamp'
],
$event
[
'action'
],
$event
[
'instance'
]
);
Cron_Options_CPT
::
instance
()
->
delete_
job
(
$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