repeat = $args['repeat']; parent::__construct( $manager, $id, $args ); } /** * Enqueue scripts and styles * */ public function enqueue() { wp_enqueue_style( 'armonia-blocks-repeater', get_template_directory_uri() . '/inc/customizer/custom-controls/blocks-repeater/control.css', array(), ARMONIA_VERSION ); wp_enqueue_script( 'armonia-blocks-repeater', get_template_directory_uri() . '/inc/customizer/custom-controls/blocks-repeater/control.js', array( 'jquery' ), ARMONIA_VERSION, true ); } /** * Render content * */ public function render_content() { $defaults = json_decode( $this->setting->default ); // defaults $values = json_decode( $this->value() ); // values ?>
$control ) : switch( $control->name ) { case 'woo-products' : if( class_exists( 'WooCommerce' ) ) : ?>

categories, true ); $product_categories = get_terms( 'product_cat' ); foreach( $product_categories as $product_cat ) : ?>
/>
option, true ); ?>/>
>
' .esc_html__( 'Woocommerce Plugin not activated', 'armonia' ). '

'; endif; break; case 'banner-slider' : ?>

categories, true ); foreach( $block_categories as $cat ) : ?>
/>
titleOption, true ); ?>/>
countOption, true ); ?>/>
option, true ); ?>/>
>

excerptOption, true ); ?>/>
dateOption, true ); ?>/>
commentOption, true ); ?>/>
buttonOption, true ); ?>/>
array( 'label' => esc_html__( 'Layout One', 'armonia' ), 'img' => get_template_directory_uri() . '/assets/images/customizer/grid-one.jpg' ), 'seven' => array( 'label' => esc_html__( 'Layout Seven', 'armonia' ), 'img' => get_template_directory_uri() . '/assets/images/customizer/grid-seven.jpg' ) ); ?>

$layout ) : ?>
option, true ); ?>/>
>

excerptOption, true ); ?>/>
dateOption, true ); ?>/>
commentOption, true ); ?>/>
buttonOption, true ); ?>/>
option, true ); ?>/>
>

label ); ?>

dateOption, true ); ?>/>
' .esc_html__( 'No blocks defined ', 'armonia' ). '

'; } unset($open); endforeach; if( $this->repeat ) { ?>
link()); ?> class="blocks-repeater-control" value="value()); ?>" />