ads
3 months ago
groups
1 week ago
metaboxes
1 year ago
placements
2 months ago
screens
3 months ago
settings
1 year ago
support
2 months ago
tables
1 week ago
tools
1 week ago
upgrades
1 year ago
widgets
1 week ago
bulk-edit.php
3 months ago
feedback-disable.php
1 year ago
header-tabs.php
3 months ago
header.php
3 months ago
index.php
2 years ago
manual-link.php
1 year ago
page-bulk-edit.php
1 year ago
page-quick-edit.php
1 year ago
quick-edit.php
2 months ago
screen-options.php
3 months ago
table-views-list.php
3 months ago
welcome-box.php
1 year ago
screen-options.php
28 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Screen Options for ads & placements list |
| 4 | * #list-view-mode needs to be here to fix an issue were the list view mode cannot be reset automatically. Saving the form again does that. |
| 5 | * |
| 6 | * @package AdvancedAds |
| 7 | * @author Advanced Ads <info@wpadvancedads.com> |
| 8 | * @since 1.47.0 |
| 9 | * |
| 10 | * @var array $optional_filters All available filters. |
| 11 | */ |
| 12 | |
| 13 | if ( empty( $optional_filters ) ) { |
| 14 | return; |
| 15 | } |
| 16 | |
| 17 | ?> |
| 18 | <input id="list-view-mode" type="hidden" name="mode" value="list"> |
| 19 | <input type="hidden" name="advanced-ads-screen-options[screen-id]" value="<?php echo esc_attr( get_current_screen()->id ); ?>"> |
| 20 | |
| 21 | <fieldset class="metabox-prefs advads-show-filter"> |
| 22 | <legend><?php esc_html_e( 'Filters', 'advanced-ads' ); ?></legend> |
| 23 | <?php foreach ( $optional_filters as $filter_key => $filter ) : ?> |
| 24 | <input id="advads-so-filters-<?php echo esc_attr( $filter_key ); ?>" type="checkbox" name="advanced-ads-screen-options[filters_to_show][]" value="<?php echo esc_attr( $filter_key ); ?>" <?php checked( in_array( $filter_key, $selected_filters, true ) ); ?> /> |
| 25 | <label for="advads-so-filters-<?php echo esc_attr( $filter_key ); ?>"><?php echo esc_html( $filter ); ?></label> |
| 26 | <?php endforeach; ?> |
| 27 | </fieldset> |
| 28 |