'_customize-dropdown-categories-' . $this->id, 'echo' => 0, 'show_option_none' => esc_html__( '— Select Category —', 'parallaxsome' ), 'option_none_value' => '0', 'selected' => $this->value(), ) ); // Hackily add in the data link parameter. $dropdown = str_replace( 'get_link(), $dropdown ); printf( '', $this->label, $this->description, $dropdown ); } } /** * A class to create a list of icons in customizer field * * @since 1.0.0 * @access public */ class Parallaxsome_Customize_Icons_Control extends WP_Customize_Control { /** * The type of customize control being rendered. * * @since 1.0.0 * @access public * @var string */ public $type = 'parallaxsome_icons'; /** * Displays the control content. * * @since 1.0.0 * @access public * @return void */ public function render_content() { $saved_icon_value = $this->value(); ?>
choices ) ) return; ?> label ) ) : ?> label ); ?> description ) ) : ?> description); ?> value() ) ? explode( ',', $this->value() ) : $this->value(); ?> link(); ?> value="" /> $this->id, 'teeny' => true, ); wp_editor( esc_textarea( $this->value() ), $this->id, $settings ); do_action('admin_print_footer_scripts'); } } /** * Radio image customize control. * * @since 1.0.0 * @access public */ class Parallaxsome_Customize_Control_Radio_Image extends WP_Customize_Control { /** * The type of customize control being rendered. * * @since 1.0.0 * @access public * @var string */ public $type = 'radio-image'; /** * Loads the jQuery UI Button script and custom scripts/styles. * * @since 1.0.0 * @access public * @return void */ /*public function enqueue() { wp_enqueue_script( 'jquery-ui-button' ); }*/ /** * Add custom JSON parameters to use in the JS template. * * @since 1.0.0 * @access public * @return void */ public function to_json() { parent::to_json(); // We need to make sure we have the correct image URL. foreach ( $this->choices as $value => $args ) $this->choices[ $value ]['url'] = esc_url( sprintf( $args['url'], get_template_directory_uri(), get_stylesheet_directory_uri() ) ); $this->json['choices'] = $this->choices; $this->json['link'] = $this->get_link(); $this->json['value'] = $this->value(); $this->json['id'] = $this->id; } /** * Underscore JS template to handle the control's output. * * @since 1.0.0 * @access public * @return void */ public function content_template() { ?> <# if ( data.label ) { #> {{ data.label }} <# } #> <# if ( data.description ) { #> {{{ data.description }}} <# } #>
<# for ( key in data.choices ) { #> checked="checked" <# } #> /> <# } #>