taxonomy = esc_attr( $taxonomy );
parent::__construct( $manager, $id, $args );
}
/**
* Render content.
*
* @since Academic 0.3
*/
public function render_content() {
$tax_args = array(
'hierarchical' => 0,
'taxonomy' => $this->taxonomy,
);
$taxonomies = get_categories( $tax_args );
?>
taxonomy = esc_attr( $taxonomy );
parent::__construct( $manager, $id, $args );
}
/**
* Render content.
*
* @since Academic 0.3
*/
public function render_content() {
$tax_args = array(
'hierarchical' => 0,
'taxonomy' => $this->taxonomy,
);
$taxonomies = get_categories( $tax_args );
?>
' . $this->label . '';
}
}
/**
* Customize Control for parent category Select.
*
* @since Academic 0.3
*
* @see WP_Customize_Control
*/
class Academic_Dropdown_Taxonomy extends WP_Customize_Control {
/**
* Control type.
*
* @access public
* @var string
*/
public $type = 'dropdown-custom-taxonomy';
/**
* Category.
*
* @access public
* @var string
*/
public $taxonomy = '';
/**
* Constructor.
*
* @since Academic 0.3
*
* @param WP_Customize_Manager $manager Customizer bootstrap instance.
* @param string $id Control ID.
* @param array $args Optional. Arguments to override class property defaults.
*/
public function __construct( $manager, $id, $args = array() ) {
$taxonomy = get_taxonomies( array( '_builtin' => false ), 'objects');
$this->taxonomy = $taxonomy;
parent::__construct( $manager, $id, $args );
}
/**
* Render content.
*
* @since Academic 0.3
*/
public function render_content() { ?>