json['value'] = $this->value(); $this->json['link'] = $this->get_link(); $this->json['id'] = $this->id; } public function render_content() {} public function content_template() { ?> <# if ( data.label ) { #>

{{ data.label }}

<# } #> <# if ( data.description ) { #> {{ data.description }} <# } #> json['value'] = $this->value(); $this->json['link'] = $this->get_link(); $this->json['id'] = $this->id; } public function render_content() {} public function content_template() { ?> <# if ( data.label ) { #> {{ data.label }} <# } #> <# if ( data.description ) { #> {{ data.description }} <# } #> taxonomy = esc_attr( $our_taxonomy ); $tax_args = array( 'hierarchical' => 0, 'taxonomy' => $this->taxonomy, ); $all_taxonomies = get_categories( $tax_args ); $choices = array(); $choices[0] = esc_html__( '— Select —', 'belly' ); if ( ! empty( $all_taxonomies ) && ! is_wp_error( $all_taxonomies ) ) { foreach ( $all_taxonomies as $tax ) { $choices[ $tax->term_id ] = $tax->name; } } $this->choices = $choices; parent::__construct( $manager, $id, $args ); } public function to_json() { parent::to_json(); $this->json['choices'] = $this->choices; $this->json['link'] = $this->get_link(); $this->json['value'] = $this->value(); $this->json['id'] = $this->id; } public function enqueue() { wp_enqueue_script( 'belly-customize-controls' ); } public function content_template() { ?> pro_text; $json['pro_url'] = esc_url( $this->pro_url ); return $json; } protected function render_template() { ?>
  • {{ data.title }} <# if ( data.pro_text && data.pro_url ) { #> {{ data.pro_text }} <# } #>