<?php
/**
 *
 * Customizer Control Functions
 *
 * @package Interserver Mommy Blog
 *
 */
 
if (class_exists('WP_Customize_Control')) {
    //Titles
    class Interserver_Mommy_Blog_Info extends WP_Customize_Control {
        public $type = 'info';
        public $label = '';
        public function render_content() { ?>
        <h3 style="margin-top:30px;border:1px dashed;padding:10px;color:#000;background:#ccc;text-transform:uppercase;"><?php echo esc_html( $this->label ); ?></h3>
        <?php
        }
    }   


// Category Dropdown
    class Interserver_Mommy_Blog_Category_Control extends WP_Customize_Control {
        public function render_content() {
            $dropdown = wp_dropdown_categories(
                array(
                    'name'              => '_customize-dropdown-categories-' . $this->id,
                    'show_option_none'  => __( '&mdash; Select &mdash;','interserver-mommy-blog'),
                    'post_type'     => 'post',
                    'hide_empty'         => 1,
                    'option_none_value' => '0',
                    'selected'          => $this->value(),
                    'echo'              => 0
                )
            );
           
            $dropdown = str_replace( '<select', '<select ' . $this->get_link(), $dropdown );
            printf(
    '<label class="customize-control-select"><span class="customize-control-title">%s</span> %s</label>',
    $this->label,
    $dropdown);
        }
    }
}
