/** * js, css enqueue * @return void */ public function enqueue() { wp_enqueue_media(); // js $js_path = epigone_theme_customizer_url() . '/fields/image/assets/js/customize-media-uploader.js'; wp_enqueue_script('wp-mutli-image-control', $js_path, array('jquery', 'jquery-ui-sortable')); // css $css_path = epigone_theme_customizer_url() . '/fields/image/assets/css/customize-media-uploader.css'; wp_enqueue_style('wp-mutli-image-control', $css_path); }
/** * Render the content on the theme customizer page_ */ public function render_content() { ?> <label> <span class="customize-control-title"><?php echo esc_html($this->label); ?> </span> <ul> <li> <input type="radio" id="<?php echo esc_attr($this->id); ?> _l-full" name="<?php echo esc_attr($this->id); ?> " <?php echo $this->link(); ?> class="radioImageSelect" value="l-full" <?php echo checked($this->value(), 'l-full'); ?> > <label for="<?php echo esc_attr($this->id); ?> _l-full"> <img src="<?php echo epigone_theme_customizer_url() . '/fields/layout/img/1col.png'; ?> " alt=""> </label> </input> </li> <li> <input type="radio" id="<?php echo esc_attr($this->id); ?> _l-left-sidebar" name="<?php echo esc_attr($this->id); ?> " <?php echo $this->link(); ?> class="radioImageSelect" value="l-left-sidebar" <?php echo checked($this->value(), 'l-left-sidebar'); ?> > <label for="<?php echo esc_attr($this->id); ?> _l-left-sidebar"> <img src="<?php echo epigone_theme_customizer_url() . '/fields/layout/img/2cl.png'; ?> " alt=""> </label> </input> </li> <li> <input type="radio" id="<?php echo esc_attr($this->id); ?> _l-right-sidebar" name="<?php echo esc_attr($this->id); ?> " <?php echo $this->link(); ?> class="radioImageSelect" value="l-right-sidebar" <?php echo checked($this->value(), 'l-right-sidebar'); ?> > <label for="<?php echo esc_attr($this->id); ?> _l-right-sidebar"> <img src="<?php echo epigone_theme_customizer_url() . '/fields/layout/img/2cr.png'; ?> " alt=""> </label> </input> </li> </ul> </label> <?php }