PluginProbe
Friends / 2.8.2
Friends v2.8.2
4.3.2 4.3.1 4.3.0 4.2.2 4.2.1 4.2.0 4.1.0 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 2.9.0 2.9.1 All 88 releases
friends / templates / admin / settings-header.php

settings-header.php in Friends 2.8.2, at templates/admin/settings-header.php

69 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * This template contains the Friends Settings Header.
4 *
5 * @package Friends
6 */
7
8 if ( empty( $args['menu'] ) ) {
9 $args['menu'] = apply_filters(
10 'friends_admin_tabs',
11 array(
12 __( 'Welcome', 'friends' ) => 'friends',
13 __( 'Settings' ) => 'friends-settings', // phpcs:ignore WordPress.WP.I18n.MissingArgDomain
14 __( 'Notification Manager', 'friends' ) => 'friends-notification-manager',
15 )
16 );
17 }
18
19 if ( empty( $args['active'] ) ) {
20 $args['active'] = false;
21 }
22
23 ?>
24 <div class="wrap">
25 <div class="friends-header">
26 <div class="friends-title-section">
27 <h1>
28 <?php echo esc_html( $args['title'] ); ?>
29 </h1>
30 </div>
31 <?php
32 if ( ! empty( $args['menu'] ) ) {
33 ?>
34 <nav class="friends-tabs-wrapper hide-if-no-js" aria-label="<?php /* phpcs:ignore WordPress.WP.I18n.MissingArgDomain */ esc_html_e( 'Secondary menu' ); ?>">
35 <?php
36
37 foreach ( $args['menu'] as $label => $page ) {
38 if ( ! $page ) {
39 ?>
40 <span class="friends-tab">
41 <?php echo esc_html( $label ); ?>
42 </span>
43 <?php
44 continue;
45 }
46 $url = admin_url( 'admin.php?page=' . $page );
47 if ( $page === $args['active'] ) {
48 ?>
49 <span class="friends-tab active" aria-current="true">
50 <?php echo esc_html( $label ); ?>
51 </span>
52 <?php
53 } else {
54 ?>
55 <a href="<?php echo esc_attr( $url ); ?>" class="friends-tab">
56 <?php echo esc_html( $label ); ?>
57 </a>
58 <?php
59 }
60 }
61 ?>
62 </nav>
63 <?php
64 }
65 ?>
66 </div>
67 <div class="wp-header-end"></div>
68 <div class="friends-body <?php echo esc_attr( strtok( $args['active'], '&' ) ); ?>">
69