PluginProbe
WPCasa – Real Estate for WordPress / trunk
WPCasa – Real Estate for WordPress vtrunk
1.5.5 1.5.4 1.5.3 1.5.2 1.5.1 1.5.1.1 trunk 1.2.0 1.2.1 1.2.10 1.2.10.1 1.2.11 1.2.12 1.2.13 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.2.9.1 1.2.9.2 1.3.0 All 31 releases
wpcasa / includes / admin / views / sidebar.php

sidebar.php in WPCasa – Real Estate for WordPress trunk, at includes/admin/views/sidebar.php

85 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Render the WPCasa settings navigation.
4 *
5 * The sidebar is permanently visible on desktop and becomes an accessible
6 * overlay drawer at the WordPress administration mobile breakpoint.
7 *
8 * @package WPCasa
9 * @updated 1.5.4
10 */
11
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit;
14 }
15
16 $settings = isset( $settings ) && is_array( $settings ) ? $settings : array();
17 ?>
18
19 <div class="wpsight-admin-sidebar-back" aria-hidden="true"></div>
20
21 <aside id="wpsight-admin-sidebar" class="wpsight-admin-sidebar">
22 <button
23 type="button"
24 class="wpsight-admin-sidebar-close"
25 aria-label="<?php echo esc_attr__( 'Close settings navigation', 'wpcasa' ); ?>"
26 >
27 <span aria-hidden="true">&times;</span>
28 </button>
29
30 <div class="wpsight-admin-intro-box">
31 <div class="wpsight-admin-ui-image">
32 <img
33 src="<?php echo esc_url( WPSIGHT_PLUGIN_URL . '/assets/img/wpcasa-admin-logo.jpg' ); ?>"
34 alt="<?php echo esc_attr__( 'WPCasa', 'wpcasa' ); ?>"
35 />
36 </div>
37 </div>
38
39 <nav
40 class="wpsight-admin-nav nav-tab-wrapper"
41 aria-label="<?php echo esc_attr__( 'WPCasa settings', 'wpcasa' ); ?>"
42 >
43 <a href="#settings-overview" id="settings-overview-tab" class="nav-tab">
44 <span class="dashicons dashicons-laptop" aria-hidden="true"></span>
45 <?php echo esc_html__( 'Overview', 'wpcasa' ); ?>
46 </a>
47
48 <?php
49 foreach ( $settings as $key => $section ) {
50 if ( ! is_array( $section ) || ! isset( $section[0] ) || ! is_scalar( $section[0] ) ) {
51 continue;
52 }
53
54 $section_id = sanitize_title( $key );
55 $section_label = (string) $section[0];
56 ?>
57
58 <a
59 href="#settings-<?php echo esc_attr( $section_id ); ?>"
60 id="settings-<?php echo esc_attr( $section_id ); ?>-tab"
61 class="nav-tab"
62 >
63 <?php
64 echo wp_kses(
65 $section_label,
66 array(
67 'span' => array(
68 'class' => array(),
69 ),
70 )
71 );
72 ?>
73 </a>
74
75 <?php
76 }
77 ?>
78
79 <a href="#settings-tools" id="settings-tools-tab" class="nav-tab">
80 <span class="dashicons dashicons-admin-tools" aria-hidden="true"></span>
81 <?php echo esc_html__( 'Tools', 'wpcasa' ); ?>
82 </a>
83 </nav>
84 </aside>
85