settings: moved slug into const var
This commit is contained in:
parent
d0e63fc859
commit
098b1f578b
2 changed files with 6 additions and 5 deletions
|
@ -36,6 +36,7 @@ class Settings_Page {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const static = 'Activitypub_Event_Extensions\Admin\Settings_Page';
|
const static = 'Activitypub_Event_Extensions\Admin\Settings_Page';
|
||||||
|
const settings_slug = 'activitypub-events';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Warning if the plugin is Active and the ActivityPub plugin is not.
|
* Warning if the plugin is Active and the ActivityPub plugin is not.
|
||||||
|
|
|
@ -3,14 +3,14 @@ currently reusing activitypub classes which is kinda nice, because it has a cons
|
||||||
-->
|
-->
|
||||||
<div class="activitypub-settings-header">
|
<div class="activitypub-settings-header">
|
||||||
<div class="activitypub-settings-title-section">
|
<div class="activitypub-settings-title-section">
|
||||||
<h1><?php \esc_html_e( 'Activitypub Events Plugin', 'activitypub-events' ); ?></h1>
|
<h1><?php \esc_html_e( 'Activitypub Events Plugin', $args['slug'] ); ?></h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav class="activitypub-settings-tabs-wrapper" aria-label="<?php \esc_attr_e( 'Secondary menu', 'activitypub-events' ); ?>">
|
<nav class="activitypub-settings-tabs-wrapper" aria-label="<?php \esc_attr_e( 'Secondary menu', $args['slug'] ); ?>">
|
||||||
<!-- todo loop through settings pages of Extractors -->
|
<!-- todo loop through settings pages of Extractors -->
|
||||||
<?php foreach ( $args as $slug => $plugin ) { ?>
|
<?php foreach ( $args['options'] as $tabslug => $plugin ) { ?>
|
||||||
<a href="<?php echo \esc_url_raw( admin_url( 'options-general.php?page=activitypub-events&tab=' . $slug ) ); ?>" class="activitypub-settings-tab <?php echo \esc_attr( $plugin['active'] ? 'active' : '' ); ?>">
|
<a href="<?php echo \esc_url_raw( admin_url( 'options-general.php?page='. $args['slug'] .'&tab=' . $tabslug ) ); ?>" class="activitypub-settings-tab <?php echo \esc_attr( $plugin['active'] ? 'active' : '' ); ?>">
|
||||||
<?php \esc_html_e( $plugin['name'], 'activitypub-events' ); ?> <!-- Todo better name handling -->
|
<?php \esc_html_e( $plugin['name'], $args['slug'] ); ?> <!-- Todo better name handling -->
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue