class-kirki-sections-hover-section.php (1854B)
1 <?php 2 /** 3 * Hover sections. 4 * 5 * @package Kirki 6 * @subpackage Controls 7 * @copyright Copyright (c) 2016, Aristeides Stathopoulos 8 * @license http://opensource.org/licenses/https://opensource.org/licenses/MIT 9 * @since 2.2.0 10 */ 11 12 if ( ! class_exists( 'Kirki_Sections_Hover_Section' ) ) { 13 14 /** 15 * Hover Section. 16 */ 17 class Kirki_Sections_Hover_Section extends Kirki_Sections_Default_Section { 18 19 /** 20 * The section type. 21 * 22 * @access public 23 * @var string 24 */ 25 public $type = 'kirki-hover'; 26 27 /** 28 * An Underscore (JS) template for rendering this section. 29 * 30 * Class variables for this section class are available in the `data` JS object; 31 * export custom variables by overriding WP_Customize_Section::json(). 32 * 33 * @access protected 34 */ 35 protected function render_template() { 36 ?> 37 <li id="accordion-section-{{ data.id }}" class="accordion-section control-section control-section-{{ data.type }}"> 38 <h3 class="accordion-section-title" tabindex="0"> 39 {{{ data.title }}} 40 <span class="screen-reader-text"><?php esc_html_e( 'Press return or enter to open this section', 'materialis' ); ?></span> 41 </h3> 42 <ul class="accordion-section-content"> 43 <li class="customize-section-description-container"> 44 <div class="customize-section-title"> 45 <button class="customize-section-back" tabindex="-1"> 46 <span class="screen-reader-text"><?php esc_html_e( 'Back', 'materialis' ); ?></span> 47 </button> 48 <h3> 49 <span class="customize-action"> 50 {{{ data.customizeAction }}} 51 </span> 52 {{{ data.title }}} 53 </h3> 54 </div> 55 <# if ( data.description ) { #> 56 <div class="description customize-section-description"> 57 {{{ data.description }}} 58 </div> 59 <# } #> 60 </li> 61 </ul> 62 </li> 63 <?php 64 } 65 } 66 }