visible = ! get_theme_mod( $args['hiding_control'] ); } } /** * Add custom parameters to pass to the JS via JSON. * * @since 1.1.47 * @access public */ public function json() { $json = parent::json(); $json['visible'] = $this->visible; $json['hiding_control'] = $this->hiding_control; return $json; } /** * Enqueue function. * * @since 1.1.47 * @access public * @return void */ public function enqueue() { wp_enqueue_script( 'hestia-hiding-section', get_template_directory_uri() . '/inc/customizer-hiding-section/js/script.js', array( 'jquery' ), HESTIA_VERSION, true ); wp_enqueue_style( 'hestia-hiding-section-style', get_template_directory_uri() . '/inc/customizer-hiding-section/css/style.css', array(), HESTIA_VERSION ); } /** * Outputs the Underscore.js template. * * @since 1.1.47 * @access public * @return void */ protected function render_template() { ?>
  • {{ data.title }} <# if ( data.visible ) { #> <# } else { #> <# } #>