PluginProbe
Friends / 2.8.8
Friends v2.8.8
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.8, at templates/admin/settings-header.php

71 lines 1.7 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 __( 'Friendships', 'friends' ) => 'friends-wp-friendships',
15 __( 'Notifications', 'friends' ) => 'friends-notification-manager',
16 __( 'Import/Export', 'friends' ) => 'friends-import-export',
17 )
18 );
19 }
20
21 if ( empty( $args['active'] ) ) {
22 $args['active'] = false;
23 }
24
25 ?>
26 <div class="wrap">
27 <div class="friends-header">
28 <div class="friends-title-section">
29 <h1>
30 <?php echo esc_html( $args['title'] ); ?>
31 </h1>
32 </div>
33 <?php
34 if ( ! empty( $args['menu'] ) ) {
35 ?>
36 <nav class="friends-tabs-wrapper hide-if-no-js" aria-label="<?php /* phpcs:ignore WordPress.WP.I18n.MissingArgDomain */ esc_html_e( 'Secondary menu' ); ?>">
37 <?php
38
39 foreach ( $args['menu'] as $label => $page ) {
40 if ( ! $page ) {
41 ?>
42 <span class="friends-tab">
43 <?php echo esc_html( $label ); ?>
44 </span>
45 <?php
46 continue;
47 }
48 $url = admin_url( 'admin.php?page=' . $page );
49 if ( $page === $args['active'] ) {
50 ?>
51 <span class="friends-tab active" aria-current="true">
52 <?php echo esc_html( $label ); ?>
53 </span>
54 <?php
55 } else {
56 ?>
57 <a href="<?php echo esc_attr( $url ); ?>" class="friends-tab">
58 <?php echo esc_html( $label ); ?>
59 </a>
60 <?php
61 }
62 }
63 ?>
64 </nav>
65 <?php
66 }
67 ?>
68 </div>
69 <div class="wp-header-end"></div>
70 <div class="friends-body <?php echo esc_attr( strtok( $args['active'], '&' ) ); ?>">
71