| 1 |
<?php |
| 2 |
/** |
| 3 |
* Admin header template. |
| 4 |
* |
| 5 |
* @package Activitypub |
| 6 |
*/ |
| 7 |
|
| 8 |
/* @var array $args Template arguments. */ |
| 9 |
$args = wp_parse_args( $args ?? array() ); |
| 10 |
?> |
| 11 |
<div class="activitypub-settings-header"> |
| 12 |
<div class="activitypub-settings-title-section"> |
| 13 |
<h1><?php \esc_html_e( 'ActivityPub', 'activitypub' ); ?></h1> |
| 14 |
</div> |
| 15 |
|
| 16 |
<div class="activitypub-settings-tabs-scroller"> |
| 17 |
<nav class="activitypub-settings-tabs-wrapper" aria-label="<?php \esc_attr_e( 'Secondary menu', 'activitypub' ); ?>"> |
| 18 |
<?php |
| 19 |
foreach ( $args['tabs'] as $slug => $label ) : |
| 20 |
$url = add_query_arg( |
| 21 |
array( 'tab' => 'welcome' !== $slug ? $slug : false ), |
| 22 |
\admin_url( 'options-general.php?page=activitypub' ) |
| 23 |
); |
| 24 |
?> |
| 25 |
|
| 26 |
<a href="<?php echo \esc_url( $url ); ?>" class="activitypub-settings-tab <?php echo \esc_attr( $args[ $slug ] ); ?>"> |
| 27 |
<?php echo \esc_html( $label ); ?> |
| 28 |
</a> |
| 29 |
|
| 30 |
<?php |
| 31 |
endforeach; |
| 32 |
?> |
| 33 |
</nav> |
| 34 |
</div> |
| 35 |
</div> |
| 36 |
|