PluginProbe
Easy Hotel – Powerful Hotel Booking / 2.0.4
Easy Hotel – Powerful Hotel Booking v2.0.4
2.0.8 2.0.7 2.0.6 2.0.5 2.0.4 2.0.3 2.0.2 2.0.1 2.0.0 1.9.9 1.9.8 1.9.7 1.9.6 1.9.5 1.9.4 1.9.3 1.9.2 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 All 110 releases
easy-hotel / admin / includes / framework / fields / tabbed / tabbed.php

tabbed.php in Easy Hotel – Powerful Hotel Booking 2.0.4, at admin/includes/framework/fields/tabbed/tabbed.php

65 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
2 /**
3 *
4 * Field: tabbed
5 *
6 * @since 1.0.0
7 * @version 1.0.0
8 *
9 */
10 if ( ! class_exists( 'ESHB_Field_tabbed' ) ) {
11 class ESHB_Field_tabbed extends ESHB_Fields {
12
13 public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14 parent::__construct( $field, $value, $unique, $where, $parent );
15 }
16
17 public function render() {
18
19 $unallows = array( 'tabbed' );
20
21 echo wp_kses_post($this->field_before());
22
23 echo '<div class="csf-tabbed-nav" data-depend-id="'. esc_attr( $this->field['id'] ) .'">';
24 foreach ( $this->field['tabs'] as $key => $tab ) {
25
26 $tabbed_icon = ( ! empty( $tab['icon'] ) ) ? '<i class="csf--icon '. esc_attr( $tab['icon'] ) .'"></i>' : '';
27 $tabbed_active = ( empty( $key ) ) ? 'csf-tabbed-active' : '';
28
29 echo '<a href="#" class="'. esc_attr( $tabbed_active ) .'"">'. wp_kses_post($tabbed_icon) . esc_attr( $tab['title'] ) .'</a>';
30
31 }
32 echo '</div>';
33
34 echo '<div class="csf-tabbed-contents">';
35 foreach ( $this->field['tabs'] as $key => $tab ) {
36
37 $tabbed_hidden = ( ! empty( $key ) ) ? ' hidden' : '';
38
39 echo '<div class="csf-tabbed-content'. esc_attr( $tabbed_hidden ) .'">';
40
41 foreach ( $tab['fields'] as $field ) {
42
43 if ( in_array( $field['type'], $unallows ) ) { $field['_notice'] = true; }
44
45 $field_id = ( isset( $field['id'] ) ) ? $field['id'] : '';
46 $field_default = ( isset( $field['default'] ) ) ? $field['default'] : '';
47 $field_value = ( isset( $this->value[$field_id] ) ) ? $this->value[$field_id] : $field_default;
48 $unique_id = ( ! empty( $this->unique ) ) ? $this->unique .'['. $this->field['id'] .']' : $this->field['id'];
49
50 ESHB::field( $field, $field_value, $unique_id, 'field/tabbed' );
51
52 }
53
54 echo '</div>';
55
56 }
57 echo '</div>';
58
59 echo wp_kses_post($this->field_after());
60
61 }
62
63 }
64 }
65