balmet.com

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

section.php (1723B)


      1 <?php
      2 namespace Elementor;
      3 
      4 if ( ! defined( 'ABSPATH' ) ) {
      5 	exit; // Exit if accessed directly.
      6 }
      7 
      8 /**
      9  * Elementor section control.
     10  *
     11  * A base control for creating section control. Displays a header that
     12  * functions as a toggle to show or hide a set of controls.
     13  *
     14  * Note: Do not use it directly, instead use `$widget->start_controls_section()`
     15  * and `$widget->end_controls_section()` to wrap a set of controls.
     16  *
     17  * @since 1.0.0
     18  */
     19 class Control_Section extends Base_UI_Control {
     20 
     21 	/**
     22 	 * Get section control type.
     23 	 *
     24 	 * Retrieve the control type, in this case `section`.
     25 	 *
     26 	 * @since 1.0.0
     27 	 * @access public
     28 	 *
     29 	 * @return string Control type.
     30 	 */
     31 	public function get_type() {
     32 		return 'section';
     33 	}
     34 
     35 	/**
     36 	 * Render section control output in the editor.
     37 	 *
     38 	 * Used to generate the control HTML in the editor using Underscore JS
     39 	 * template. The variables for the class are available using `data` JS
     40 	 * object.
     41 	 *
     42 	 * @since 1.0.0
     43 	 * @access public
     44 	 */
     45 	public function content_template() {
     46 		?>
     47 		<div class="elementor-panel-heading">
     48 			<div class="elementor-panel-heading-toggle elementor-section-toggle" data-collapse_id="{{ data.name }}">
     49 				<i class="eicon" aria-hidden="true"></i>
     50 			</div>
     51 			<div class="elementor-panel-heading-title elementor-section-title">{{{ data.label }}}</div>
     52 		</div>
     53 		<?php
     54 	}
     55 
     56 	/**
     57 	 * Get repeater control default settings.
     58 	 *
     59 	 * Retrieve the default settings of the repeater control. Used to return the
     60 	 * default settings while initializing the repeater control.
     61 	 *
     62 	 * @since 1.0.0
     63 	 * @access protected
     64 	 *
     65 	 * @return array Control default settings.
     66 	 */
     67 	protected function get_default_settings() {
     68 		return [
     69 			'separator' => 'none',
     70 		];
     71 	}
     72 }