Skip to content

Commit

Permalink
Content Overview: Add "(Hide all)" option to Post Status selector
Browse files Browse the repository at this point in the history
  • Loading branch information
agapetry committed Jan 29, 2025
1 parent 00e41a1 commit b4b9e12
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion modules/content-overview/library/content-overview-utilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,20 @@ public static function content_overview_filter_options($args)
<select id="post_status" name="post_status"><!-- Status selectors -->
<option value=""><?php
_e('All statuses', 'publishpress'); ?></option>
<?php

<?php if (!empty($revision_statuses)) {
$hide_all_label = __('(Hide all)', 'publishpress');

if ('_' == $filters['post_status']) {
$selected_value = $hide_all_label;
}

echo "<option value='_' " . selected(
'_',
$filters['post_status']
) . ">" . $hide_all_label . "</option>";
}

foreach ($post_statuses as $post_status) {
if ($post_status->slug == $filters['post_status']) {
$selected_value = $post_status->label;
Expand Down

0 comments on commit b4b9e12

Please sign in to comment.