resources
7 years ago
ajax-customers.php
6 years ago
ajax-posts.php
7 years ago
ajax-products.php
8 years ago
ajax-terms.php
7 years ago
buttons.php
8 years ago
checkbox-array.php
6 years ago
checkbox.php
8 years ago
colorpicker.php
5 years ago
country-select.php
6 years ago
custom.php
7 years ago
customtabs.php
8 years ago
date-format.php
6 years ago
datepicker.php
6 years ago
dimensions.php
5 years ago
hidden.php
8 years ago
html.php
8 years ago
icons.php
8 years ago
image-gallery.php
8 years ago
inline-fields.php
5 years ago
list-table.php
6 years ago
multi-colorpicker.php
6 years ago
multi-select.php
6 years ago
number.php
8 years ago
onoff.php
6 years ago
password.php
6 years ago
preview.php
8 years ago
radio.php
5 years ago
select-buttons.php
6 years ago
select-images.php
6 years ago
select-mailchimp.php
8 years ago
select.php
5 years ago
sep.php
8 years ago
sidebarlist.php
8 years ago
sidebars.php
8 years ago
simple-text.php
8 years ago
slider.php
8 years ago
text-array.php
8 years ago
text-button.php
8 years ago
text.php
6 years ago
textarea-codemirror.php
8 years ago
textarea-editor.php
5 years ago
textarea.php
6 years ago
title.php
6 years ago
toggle-element-fixed.php
5 years ago
toggle-element.php
5 years ago
upload.php
6 years ago
sidebars.php
63 lines
| 1 | <?php |
| 2 | /** |
| 3 | * This file belongs to the YIT Plugin Framework. |
| 4 | * |
| 5 | * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0) |
| 6 | * that is bundled with this package in the file LICENSE.txt. |
| 7 | * It is also available through the world-wide-web at this URL: |
| 8 | * http://www.gnu.org/licenses/gpl-3.0.txt |
| 9 | * |
| 10 | * @var array $field |
| 11 | */ |
| 12 | |
| 13 | extract( $field ); |
| 14 | |
| 15 | $layout = !isset( $value[ 'layout' ] ) ? 'sidebar-no' : $value[ 'layout' ]; |
| 16 | $sidebar_left = !isset( $value[ 'sidebar-left' ] ) ? '-1' : $value[ 'sidebar-left' ]; |
| 17 | $sidebar_right = !isset( $value[ 'sidebar-right' ] ) ? '-1' : $value[ 'sidebar-right' ]; |
| 18 | ?> |
| 19 | <div class="yith-plugin-fw-sidebar-layout"> |
| 20 | <div class="option"> |
| 21 | <input type="radio" name="<?php echo $name ?>[layout]" id="<?php echo $id . '-left' ?>" value="sidebar-left" <?php checked( $layout, 'sidebar-left' ) ?> /> |
| 22 | <img src="<?php echo YIT_CORE_PLUGIN_URL ?>/assets/images/sidebar-left.png" title="<?php _e( 'Left sidebar', 'yith-plugin-fw' ) ?>" alt="<?php _e( 'Left sidebar', 'yith-plugin-fw' ) ?>" class="<?php echo $id . '-left' ?>" data-type="left"/> |
| 23 | |
| 24 | <input type="radio" name="<?php echo $name ?>[layout]" id="<?php echo $id . '-right' ?>" value="sidebar-right" <?php checked( $layout, 'sidebar-right' ) ?> /> |
| 25 | <img src="<?php echo YIT_CORE_PLUGIN_URL ?>/assets/images/sidebar-right.png" title="<?php _e( 'Right sidebar', 'yith-plugin-fw' ) ?>" alt="<?php _e( 'Right sidebar', 'yith-plugin-fw' ) ?>" class="<?php echo $id . '-right' ?>" data-type="right"/> |
| 26 | |
| 27 | <input type="radio" name="<?php echo $name ?>[layout]" id="<?php echo $id . '-double' ?>" value="sidebar-double" <?php checked( $layout, 'sidebar-double' ) ?> /> |
| 28 | <img src="<?php echo YIT_CORE_PLUGIN_URL ?>/assets/images/double-sidebar.png" title="<?php _e( 'No sidebar', 'yith-plugin-fw' ) ?>" alt="<?php _e( 'No sidebar', 'yith-plugin-fw' ) ?>" class="<?php echo $id . '-double' ?>" data-type="double"/> |
| 29 | |
| 30 | <input type="radio" name="<?php echo $name ?>[layout]" id="<?php echo $id . '-no' ?>" value="sidebar-no" <?php checked( $layout, 'sidebar-no' ) ?> /> |
| 31 | <img src="<?php echo YIT_CORE_PLUGIN_URL ?>/assets/images/no-sidebar.png" title="<?php _e( 'No sidebar', 'yith-plugin-fw' ) ?>" alt="<?php _e( 'No sidebar', 'yith-plugin-fw' ) ?>" class="<?php echo $id . '-no' ?>" data-type="none"/> |
| 32 | </div> |
| 33 | <div class="clearfix"></div> |
| 34 | <div class="option" id="choose-sidebars"> |
| 35 | <div class="side"> |
| 36 | <div <?php if ( $layout != 'sidebar-double' && $layout != 'sidebar-left' ) { |
| 37 | echo 'style="display:none"'; |
| 38 | } ?> class="yith-plugin-fw-sidebar-layout-sidebar-left-container select-mask"> |
| 39 | <label for="<?php echo $id ?>-sidebar-left"><?php _e( 'Left Sidebar', 'yith-plugin-fw' ) ?></label> |
| 40 | <select class="yith-plugin-fw-select" name="<?php echo $name ?>[sidebar-left]" id="<?php echo $id ?>-sidebar-left"> |
| 41 | <option value="-1"><?php _e( 'Choose a sidebar', 'yith-plugin-fw' ) ?></option> |
| 42 | <?php foreach ( yit_registered_sidebars() as $val => $option ) { ?> |
| 43 | <option value="<?php echo esc_attr( $val ) ?>" <?php selected( $sidebar_left, $val ) ?>><?php echo $option; ?></option> |
| 44 | <?php } ?> |
| 45 | </select> |
| 46 | </div> |
| 47 | </div> |
| 48 | <div class="side" style="clear: both"> |
| 49 | <div <?php if ( $layout != 'sidebar-double' && $layout != 'sidebar-right' ) { |
| 50 | echo 'style="display:none"'; |
| 51 | } ?> class="yith-plugin-fw-sidebar-layout-sidebar-right-container select-mask"> |
| 52 | <label for="<?php echo $id ?>-sidebar-right"><?php _e( 'Right Sidebar', 'yith-plugin-fw' ) ?></label> |
| 53 | <select class="yith-plugin-fw-select" name="<?php echo $name ?>[sidebar-right]" id="<?php echo $id ?>-sidebar-right"> |
| 54 | <option value="-1"><?php _e( 'Choose a sidebar', 'yith-plugin-fw' ) ?></option> |
| 55 | <?php foreach ( yit_registered_sidebars() as $val => $option ) { ?> |
| 56 | <option value="<?php echo esc_attr( $val ) ?>" <?php selected( $sidebar_right, $val ) ?>><?php echo $option; ?></option> |
| 57 | <?php } ?> |
| 58 | </select> |
| 59 | </div> |
| 60 | </div> |
| 61 | </div> |
| 62 | </div> |
| 63 |