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
4456419b
Verified
Commit
4456419b
authored
Dec 07, 2016
by
Erick Hitter
Browse files
Warn when deleting a single Internal Event
parent
ff62347a
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/wp-cli/class-events.php
View file @
4456419b
...
...
@@ -288,6 +288,11 @@ class Events extends \WP_CLI_Command {
// Parse basic event data and output, lest someone delete the wrong thing
$event_details
=
$this
->
get_event_details_from_post_title
(
$event_post
->
post_title
);
// Warning about Internal Events
if
(
\
Automattic\WP\Cron_Control\is_internal_event
(
$event_details
[
'action'
]
)
)
{
\
WP_CLI
::
warning
(
__
(
'This is an event created by the Cron Control plugin. It will recreated automatically.'
,
'automattic-cron-control'
)
);
}
\
WP_CLI
::
line
(
sprintf
(
__
(
'Execution time: %s GMT'
,
'automattic-cron-control'
),
date
(
TIME_FORMAT
,
$event_details
[
'timestamp'
]
)
)
);
\
WP_CLI
::
line
(
sprintf
(
__
(
'Action: %s'
,
'automattic-cron-control'
),
$event_details
[
'action'
]
)
);
\
WP_CLI
::
line
(
sprintf
(
__
(
'Instance identifier: %s'
,
'automattic-cron-control'
),
$event_details
[
'instance'
]
)
);
...
...
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