cloggier
↑
/wp-content/themes/hestia/inc/customizer/controls
marsupiataab
hypermuffing
cloggier
hypermuffing
marsupiataab
customizer-scroll/
cloggier
marsupiataab
customizer-tabs/
cloggier
marsupiataab
helper-plugin-install/
cloggier
marsupiataab
subscribe-info/
cloggier
marsupiataab
class-hestia-button.php
3,997 B
cloggier
marsupiataab
class-hestia-contact-info.php
1,136 B
cloggier
marsupiataab
class-hestia-control-upsell.php
2,718 B
cloggier
marsupiataab
class-hestia-customize-control-radio.php
2,184 B
cloggier
marsupiataab
class-hestia-customizer-heading.php
836 B
cloggier
marsupiataab
class-hestia-generic-notice-section.php
2,543 B
cloggier
marsupiataab
class-hestia-main-notice-section.php
3,306 B
cloggier
marsupiataab
class-hestia-pagebuilder-button.php
5,632 B
cloggier
marsupiataab
class-hestia-section-docs.php
1,649 B
cloggier
marsupiataab
class-hestia-section-upsell.php
2,949 B
cloggier
marsupiataab
class-hestia-separator-section.php
595 B
cloggier
marsupiataab
<?php /** * Customizer info main class. * * @package Hestia * @since Hestia 1.0 */ /** * Pro customizer section. * * @since 1.0.0 * @access public */ class Hestia_Generic_Notice_Section extends WP_Customize_Section { /** * The type of customize section being rendered. * * @since 1.0.0 * @access public * @var string */ public $type = 'customizer-notice'; /** * Label text to output. * * @since 1.0.0 * @access public * @var string */ public $section_text = ''; /** * Plugin slug for which to create install button. * * @since 1.0.0 * @access public * @var string */ public $slug = ''; /** * Hide notice. * * @since 1.1.34 * @access public * @var string */ public $hide_notice = false; /** * Screen reader text on dismiss button. * * @since 1.1.34 * @access public * @var string */ public $button_screenreader = ''; /** * Control options. * * Ex: redirect link after install * * @var array */ public $options = array(); /** * Enqueue function. */ public function enqueue() { Hestia_Plugin_Install_Helper::instance()->enqueue_scripts(); } /** * Add custom parameters to pass to the JS via JSON. * * @since 1.0.0 * @access public * @return array */ public function json() { $json = parent::json(); $json['section_text'] = $this->section_text; $json['hide_notice'] = $this->hide_notice; $json['plugin_install_button'] = $this->create_plugin_install_button( $this->slug, $this->options ); return $json; } /** * Outputs the Underscore.js template. * * @since 1.0.0 * @access public * @return void */ protected function render_template() { ?> <# if ( !data.hide_notice ) { #> <li id="accordion-section-{{ data.id }}" class="hestia-notice control-section-{{ data.type }} cannot-expand no-tcollapse"> <button type="button" class="notice-dismiss" style="z-index: 1;"></button> <h4 class="accordion-section-title" style="padding-right: 36px"> <# if ( data.section_text ) { #> {{{data.section_text}}} <# } #> <# if ( data.plugin_install_button ) { #> {{{data.plugin_install_button}}} <# } #> </h4> </li> <# } #> <?php } /** * Check plugin state. * * @param string $slug plugin slug. * * @return bool */ public function create_plugin_install_button( $slug, $settings = array() ) { return Hestia_Plugin_Install_Helper::instance()->get_button_html( $slug, $settings ); } }
cloggier