| 1 |
<?php |
| 2 |
/* |
| 3 |
* Page Name: Items |
| 4 |
*/ |
| 5 |
|
| 6 |
use BubbleMenu\Admin\CreateFields; |
| 7 |
|
| 8 |
defined( 'ABSPATH' ) || exit; |
| 9 |
|
| 10 |
$page_opt = include( 'options/2.items.php' ); |
| 11 |
|
| 12 |
$field = new CreateFields( $options, $page_opt ); |
| 13 |
|
| 14 |
$count = ( ! empty( $options['item']['type'] ) ) ? count( $options['item']['type'] ) : '0'; |
| 15 |
$prefix = 'item-'; |
| 16 |
?> |
| 17 |
<div class="wpie-items__list" id="wpie-items-list"> |
| 18 |
<?php if ( $count > 0 ) : |
| 19 |
for ( $i = 0; $i < $count; $i ++ ): |
| 20 |
$order = $i + 1; |
| 21 |
$status = ! empty( $options['item_status'][ $i ] ) ? 1 : 0; |
| 22 |
$open = ! empty( $status ) ? ' open' : ''; |
| 23 |
?> |
| 24 |
<details class="wpie-item menu-item"<?php echo esc_attr( $open ); ?>> |
| 25 |
<input type="hidden" name="param[item_status][]" class="wpie-item__toggle" |
| 26 |
value="<?php echo absint( $status ); ?>"> |
| 27 |
<summary class="wpie-item_heading"> |
| 28 |
<span class="wpie-item_heading_icon"></span> |
| 29 |
<span class="wpie-item_heading_label"></span> |
| 30 |
<span class="wpie-item_heading_type"></span> |
| 31 |
<span class="wpie-item_heading_sub"></span> |
| 32 |
<span class="wpie-icon wpie_icon-chevron-expand-y"></span> |
| 33 |
<span class="wpie-icon wpie_icon-trash"></span> |
| 34 |
<span class="wpie-item_heading_toogle"> |
| 35 |
<span class="wpie-icon wpie_icon-chevron-down"></span> |
| 36 |
<span class="wpie-icon wpie_icon-chevron-up "></span> |
| 37 |
</span> |
| 38 |
</summary> |
| 39 |
<div class="wpie-item_content"> |
| 40 |
|
| 41 |
<div class="wpie-fieldset"> |
| 42 |
<div class="wpie-fields"> |
| 43 |
<?php $field->create( $prefix . 'label', $i ); ?> |
| 44 |
<?php $field->create( $prefix . 'label_on', $i ); ?> |
| 45 |
</div> |
| 46 |
</div> |
| 47 |
|
| 48 |
<div class="wpie-tabs-wrapper"> |
| 49 |
|
| 50 |
<div class="wpie-tabs-link"> |
| 51 |
<a class="wpie-tab__link is-active"><?php esc_html_e( 'Type', 'bubble-menu' ); ?></a> |
| 52 |
<a class="wpie-tab__link"><?php esc_html_e( 'Icon', 'bubble-menu' ); ?></a> |
| 53 |
<a class="wpie-tab__link"><?php esc_html_e( 'Style', 'bubble-menu' ); ?></a> |
| 54 |
<a class="wpie-tab__link"><?php esc_html_e( 'Attributes', 'bubble-menu' ); ?></a> |
| 55 |
</div> |
| 56 |
|
| 57 |
<div class="wpie-tab-settings is-active"> |
| 58 |
<div class="wpie-fieldset"> |
| 59 |
<div class="wpie-fields"> |
| 60 |
<?php $field->create( $prefix . 'type', $i ); ?> |
| 61 |
<?php $field->create( $prefix . 'link', $i ); ?> |
| 62 |
</div> |
| 63 |
</div> |
| 64 |
|
| 65 |
|
| 66 |
</div> |
| 67 |
|
| 68 |
<div class="wpie-tab-settings"> |
| 69 |
<div class="wpie-fieldset"> |
| 70 |
<div class="wpie-fields"> |
| 71 |
<?php $field->create( $prefix . 'icon_type', $i ); ?> |
| 72 |
<?php $field->create( $prefix . 'icon', $i ); ?> |
| 73 |
</div> |
| 74 |
</div> |
| 75 |
|
| 76 |
</div> |
| 77 |
|
| 78 |
<div class="wpie-tab-settings"> |
| 79 |
|
| 80 |
<div class="wpie-fieldset"> |
| 81 |
<div class="wpie-legend"><?php esc_html_e('Item colors', 'bubble-menu');?></div> |
| 82 |
<div class="wpie-fields"> |
| 83 |
<?php $field->create( $prefix . 'color', $i ); ?> |
| 84 |
<?php $field->create( $prefix . 'background_color', $i ); ?> |
| 85 |
</div> |
| 86 |
</div> |
| 87 |
<div class="wpie-fieldset"> |
| 88 |
<div class="wpie-legend"><?php esc_html_e('Label', 'bubble-menu');?></div> |
| 89 |
<div class="wpie-fields"> |
| 90 |
<?php $field->create( $prefix . 'label_position', $i ); ?> |
| 91 |
</div> |
| 92 |
</div> |
| 93 |
|
| 94 |
</div> |
| 95 |
|
| 96 |
<div class="wpie-tab-settings"> |
| 97 |
<div class="wpie-fieldset"> |
| 98 |
<div class="wpie-fields"> |
| 99 |
<?php $field->create( $prefix . 'attribute_id', $i ); ?> |
| 100 |
<?php $field->create( $prefix . 'attribute_class', $i ); ?> |
| 101 |
<?php $field->create( $prefix . 'attribute_rel', $i ); ?> |
| 102 |
</div> |
| 103 |
</div> |
| 104 |
</div> |
| 105 |
</div> |
| 106 |
|
| 107 |
|
| 108 |
</div> |
| 109 |
</details> |
| 110 |
<?php endfor; endif; ?> |
| 111 |
|
| 112 |
<hr class="wpie-buttons__hr"> |
| 113 |
<div class="wpie-fields"> |
| 114 |
<button class="button button-primary wpie-add-button" |
| 115 |
type="button"><?php esc_html_e( 'Add Button', 'bubble-menu' ); ?></button> |
| 116 |
</div> |
| 117 |
|
| 118 |
</div> |
| 119 |
|
| 120 |
|
| 121 |
<template id="template-button"> |
| 122 |
<details class="wpie-item menu-item" open> |
| 123 |
<input type="hidden" name="param[item_status][]" class="wpie-item__toggle" value="1"> |
| 124 |
<summary class="wpie-item_heading"> |
| 125 |
<span class="wpie-item_heading_icon"></span> |
| 126 |
<span class="wpie-item_heading_label"></span> |
| 127 |
<span class="wpie-item_heading_type"></span> |
| 128 |
<span class="wpie-item_heading_sub"></span> |
| 129 |
<span class="wpie-icon wpie_icon-chevron-expand-y"></span> |
| 130 |
<span class="wpie-icon wpie_icon-trash"></span> |
| 131 |
<span class="wpie-item_heading_toogle"> |
| 132 |
<span class="wpie-icon wpie_icon-chevron-down"></span> |
| 133 |
<span class="wpie-icon wpie_icon-chevron-up "></span> |
| 134 |
</span> |
| 135 |
</summary> |
| 136 |
<div class="wpie-item_content"> |
| 137 |
|
| 138 |
<div class="wpie-fieldset"> |
| 139 |
<div class="wpie-fields"> |
| 140 |
<?php $field->create( $prefix . 'label', -1 ); ?> |
| 141 |
<?php $field->create( $prefix . 'label_on', -1 ); ?> |
| 142 |
</div> |
| 143 |
</div> |
| 144 |
|
| 145 |
<div class="wpie-tabs-wrapper"> |
| 146 |
|
| 147 |
<div class="wpie-tabs-link"> |
| 148 |
<a class="wpie-tab__link is-active"><?php esc_html_e( 'Type', 'bubble-menu' ); ?></a> |
| 149 |
<a class="wpie-tab__link"><?php esc_html_e( 'Icon', 'bubble-menu' ); ?></a> |
| 150 |
<a class="wpie-tab__link"><?php esc_html_e( 'Style', 'bubble-menu' ); ?></a> |
| 151 |
<a class="wpie-tab__link"><?php esc_html_e( 'Attributes', 'bubble-menu' ); ?></a> |
| 152 |
</div> |
| 153 |
|
| 154 |
<div class="wpie-tab-settings is-active"> |
| 155 |
<div class="wpie-fieldset"> |
| 156 |
<div class="wpie-fields"> |
| 157 |
<?php $field->create( $prefix . 'type', -1 ); ?> |
| 158 |
<?php $field->create( $prefix . 'link', -1 ); ?> |
| 159 |
</div> |
| 160 |
</div> |
| 161 |
|
| 162 |
|
| 163 |
</div> |
| 164 |
|
| 165 |
<div class="wpie-tab-settings"> |
| 166 |
<div class="wpie-fieldset"> |
| 167 |
<div class="wpie-fields"> |
| 168 |
<?php $field->create( $prefix . 'icon_type', -1 ); ?> |
| 169 |
<?php $field->create( $prefix . 'icon', -1 ); ?> |
| 170 |
</div> |
| 171 |
</div> |
| 172 |
|
| 173 |
</div> |
| 174 |
|
| 175 |
<div class="wpie-tab-settings"> |
| 176 |
<div class="wpie-fieldset"> |
| 177 |
<div class="wpie-legend"><?php esc_html_e('Item colors', 'bubble-menu');?></div> |
| 178 |
<div class="wpie-fields"> |
| 179 |
<?php $field->create( $prefix . 'color', -1 ); ?> |
| 180 |
<?php $field->create( $prefix . 'background_color', -1 ); ?> |
| 181 |
</div> |
| 182 |
</div> |
| 183 |
<div class="wpie-fieldset"> |
| 184 |
<div class="wpie-legend"><?php esc_html_e('Label', 'bubble-menu');?></div> |
| 185 |
<div class="wpie-fields"> |
| 186 |
<?php $field->create( $prefix . 'label_position', -1 ); ?> |
| 187 |
</div> |
| 188 |
</div> |
| 189 |
|
| 190 |
</div> |
| 191 |
|
| 192 |
<div class="wpie-tab-settings"> |
| 193 |
<div class="wpie-fieldset"> |
| 194 |
<div class="wpie-fields"> |
| 195 |
<?php $field->create( $prefix . 'attribute_id', -1 ); ?> |
| 196 |
<?php $field->create( $prefix . 'attribute_class', -1 ); ?> |
| 197 |
<?php $field->create( $prefix . 'attribute_rel', -1 ); ?> |
| 198 |
</div> |
| 199 |
</div> |
| 200 |
</div> |
| 201 |
|
| 202 |
</div> |
| 203 |
</div> |
| 204 |
</details> |
| 205 |
</template> |
| 206 |
|
| 207 |
<?php |
| 208 |
|