ru-se.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

class-kirki-sections-expanded-section.php (1390B)


      1 <?php
      2 /**
      3  * An expanded section.
      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_Expanded_Section' ) ) {
     13 
     14 	/**
     15 	 * Expanded Section.
     16 	 */
     17 	class Kirki_Sections_Expanded_Section extends Kirki_Sections_Default_Section {
     18 
     19 		/**
     20 		 * The section type.
     21 		 *
     22 		 * @access public
     23 		 * @var string
     24 		 */
     25 		public $type = 'kirki-expanded';
     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 				<ul class="accordion-section-content">
     39 					<li class="customize-section-description-container">
     40 						<div class="customize-section-title">
     41 							<h3>
     42 								{{{ data.title }}}
     43 							</h3>
     44 						</div>
     45 						<# if ( data.description ) { #>
     46 							<div class="description customize-section-description">
     47 								{{{ data.description }}}
     48 							</div>
     49 						<# } #>
     50 					</li>
     51 				</ul>
     52 			</li>
     53 			<?php
     54 		}
     55 	}
     56 }