* @license GNU General Public License v2 or later * @link http://themeisle.com */ if ( ! class_exists( 'WP_Customize_Control' ) ) { return null; } /** * Azera_Shop_General_Repeater class * * @category Admin * @package Azera_Shop * @author Themeisle * @license GNU General Public License v2 or later * @link http://themeisle.com */ class Azera_Shop_General_Repeater extends WP_Customize_Control { /** * Box id. * * @var string $id Box id. */ public $id; /** * Display option. * * @var bool|mixed $azera_shop_image_control Display option. */ private $azera_shop_image_control = false; /** * Display option. * * @var bool|mixed $azera_shop_icon_control Display option. */ private $azera_shop_icon_control = false; /** * Display option. * * @var bool|mixed $azera_shop_title_control Display option. */ private $azera_shop_title_control = false; /** * Display option. * * @var bool|mixed $azera_shop_subtitle_control Display option. */ private $azera_shop_subtitle_control = false; /** * Display option. * * @var bool|mixed $azera_shop_text_control Display option. */ private $azera_shop_text_control = false; /** * Display option. * * @var bool|mixed $azera_shop_link_control Display option. */ private $azera_shop_link_control = false; /** * Display option. * * @var bool|mixed o Display option. */ private $azera_shop_shortcode_control = false; /** * Initialize the class and set its properties. * * @since 1.0.0 * @param string $manager The name of this control. * @param string $id Control id. * @param array $args Arguments. */ public function __construct( $manager, $id, $args = array() ) { parent::__construct( $manager, $id, $args ); if ( ! empty( $args['azera_shop_image_control'] ) ) { $this->azera_shop_image_control = $args['azera_shop_image_control']; } if ( ! empty( $args['azera_shop_icon_control'] ) ) { $this->azera_shop_icon_control = $args['azera_shop_icon_control']; } if ( ! empty( $args['azera_shop_title_control'] ) ) { $this->azera_shop_title_control = $args['azera_shop_title_control']; } if ( ! empty( $args['azera_shop_subtitle_control'] ) ) { $this->azera_shop_subtitle_control = $args['azera_shop_subtitle_control']; } if ( ! empty( $args['azera_shop_text_control'] ) ) { $this->azera_shop_text_control = $args['azera_shop_text_control']; } if ( ! empty( $args['azera_shop_link_control'] ) ) { $this->azera_shop_link_control = $args['azera_shop_link_control']; } if ( ! empty( $args['azera_shop_shortcode_control'] ) ) { $this->azera_shop_shortcode_control = $args['azera_shop_shortcode_control']; } if ( ! empty( $args['section'] ) ) { $this->id = $args['section']; } } /** * Render the content on the theme customizer page */ public function render_content() { $this_default = json_decode( $this->setting->default ); $values = $this->value(); $json = json_decode( $values ); if ( ! is_array( $json ) ) { $json = array( $values ); } ?> label ); ?>
iterate_array( $this_default ); ?> link(); ?> class="azera_shop_repeater_colector" value="" /> iterate_array(); ?> link(); ?> class="azera_shop_repeater_colector" /> iterate_array( $json ); ?> link(); ?> class="azera_shop_repeater_colector" value="value() ); ?>" />
>

>

choice ) ) { $choice = $icon->choice; } if ( ! empty( $icon->image_url ) ) { $image_url = $icon->image_url; } if ( ! empty( $icon->icon_value ) ) { $icon_value = $icon->icon_value; } if ( ! empty( $icon->title ) ) { $title = $icon->title; } if ( ! empty( $icon->subtitle ) ) { $subtitle = $icon->subtitle; } if ( ! empty( $icon->text ) ) { $text = $icon->text; } if ( ! empty( $icon->link ) ) { $link = $icon->link; } if ( ! empty( $icon->shortcode ) ) { $shortcode = $icon->shortcode; } if ( $this->azera_shop_image_control == true && $this->azera_shop_icon_control == true ) { $this->icon_type_choice( $choice ); } if ( $this->azera_shop_image_control == true ) { $this->image_control( $image_url, $choice ); } if ( $this->azera_shop_icon_control == true ) { $this->icon_picker_control( $icon_value, $choice ); } if ( $this->azera_shop_title_control == true ) { $this->input_control( array( 'label' => __( 'Title', 'azera-shop' ), 'class' => 'azera_shop_title_control', ), $title ); } if ( $this->azera_shop_subtitle_control == true ) { $this->input_control( array( 'label' => __( 'Subtitle', 'azera-shop' ), 'class' => 'azera_shop_subtitle_control', ), $subtitle ); } if ( $this->azera_shop_text_control == true ) { $this->input_control( array( 'label' => __( 'Text', 'azera-shop' ), 'class' => 'azera_shop_text_control', 'type' => 'textarea', ), $text ); } if ( $this->azera_shop_link_control ) { $this->input_control( array( 'label' => __( 'Link', 'azera-shop' ), 'class' => 'azera_shop_link_control', 'sanitize_callback' => 'esc_url', ), $link ); } if ( $this->azera_shop_shortcode_control == true ) { $this->input_control( array( 'label' => __( 'Shortcode', 'azera-shop' ), 'class' => 'azera_shop_shortcode_control', ), $shortcode ); } ?>
azera_shop_image_control == true && $this->azera_shop_icon_control == true ) { $this->icon_type_choice(); } if ( $this->azera_shop_image_control == true ) { $this->image_control( '', 'azera_shop_icon' ); } if ( $this->azera_shop_icon_control == true ) { $this->icon_picker_control(); } if ( $this->azera_shop_title_control == true ) { $this->input_control( array( 'label' => __( 'Title', 'azera-shop' ), 'class' => 'azera_shop_title_control', ) ); } if ( $this->azera_shop_subtitle_control == true ) { $this->input_control( array( 'label' => __( 'Subtitle', 'azera-shop' ), 'class' => 'azera_shop_subtitle_control', ) ); } if ( $this->azera_shop_text_control == true ) { $this->input_control( array( 'label' => __( 'Text', 'azera-shop' ), 'class' => 'azera_shop_text_control', 'type' => 'textarea', ) ); } if ( $this->azera_shop_link_control == true ) { $this->input_control( array( 'label' => __( 'Link', 'azera-shop' ), 'class' => 'azera_shop_link_control', ) ); } if ( $this->azera_shop_shortcode_control == true ) { $this->input_control( array( 'label' => __( 'Shortcode', 'azera-shop' ), 'class' => 'azera_shop_shortcode_control', ) ); } ?>