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
890e6d0c
Verified
Commit
890e6d0c
authored
Dec 05, 2016
by
Erick Hitter
Browse files
Organizational twitch
parent
2a1de9b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/wp-cli/class-data.php
View file @
890e6d0c
...
...
@@ -52,12 +52,6 @@ class Data extends \WP_CLI_Command {
$events_for_display
=
$this
->
format_events
(
$events
[
'items'
]
);
$total_events_to_display
=
count
(
$events_for_display
);
// How shall we display?
$format
=
'table'
;
if
(
isset
(
$assoc_args
[
'format'
]
)
)
{
$format
=
$assoc_args
[
'format'
];
}
// Count, noting if showing fewer than all
if
(
$events
[
'total_items'
]
<=
$total_events_to_display
)
{
\
WP_CLI
::
line
(
sprintf
(
__
(
'Displaying all %s entries'
,
'automattic-cron-control'
),
number_format_i18n
(
$total_events_to_display
)
)
);
...
...
@@ -66,6 +60,11 @@ class Data extends \WP_CLI_Command {
}
// And reformat
$format
=
'table'
;
if
(
isset
(
$assoc_args
[
'format'
]
)
)
{
$format
=
$assoc_args
[
'format'
];
}
\
WP_CLI\Utils\format_items
(
$format
,
$events_for_display
,
array
(
'ID'
,
'action'
,
...
...
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