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
table-views-list.php
42 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Render the view navigation items on the Placement screen. |
| 4 | * |
| 5 | * @package AdvancedAds |
| 6 | * @author Advanced Ads <info@wpadvancedads.com> |
| 7 | * @since 1.48.0 |
| 8 | * |
| 9 | * @var array $views List of views. |
| 10 | */ |
| 11 | |
| 12 | use AdvancedAds\Framework\Utilities\Str; |
| 13 | |
| 14 | ?> |
| 15 | <ul class="flex gap-x-2 float-left clear-both mt-2.5 mb-5"> |
| 16 | <?php |
| 17 | foreach ( $views as $index => $view ) : |
| 18 | $view = str_replace( [ ')', '(' ], '', $view ); |
| 19 | $class = [ 'no-underline advads-button button' ]; |
| 20 | if ( Str::contains( 'current', $view ) || ( $is_all && 'all' === $index ) ) { |
| 21 | $class[] = 'button-primary'; |
| 22 | $view = str_replace( 'class="current"', '" ', $view ); |
| 23 | } else { |
| 24 | $class[] = 'button-secondary'; |
| 25 | } |
| 26 | |
| 27 | $view = str_replace( '<a ', '<a class="' . esc_attr( join( ' ', $class ) ) . '" ', $view ); |
| 28 | ?> |
| 29 | <li> |
| 30 | <?php |
| 31 | echo wp_kses( |
| 32 | $view, |
| 33 | [ |
| 34 | 'a' => [ 'href' => [], 'class' => [], 'aria-current' => [] ], |
| 35 | 'span' => [ 'class' => [] ], |
| 36 | ] |
| 37 | ); |
| 38 | ?> |
| 39 | </li> |
| 40 | <?php endforeach; ?> |
| 41 | </ul> |
| 42 |