balmet.com

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

tab.php (1394B)


      1 <?php
      2 namespace Elementor;
      3 
      4 if ( ! defined( 'ABSPATH' ) ) {
      5 	exit; // Exit if accessed directly.
      6 }
      7 
      8 /**
      9  * Elementor tab control.
     10  *
     11  * A base control for creating tab control. Displays a tab header for a set of
     12  * controls.
     13  *
     14  * Note: Do not use it directly, instead use: `$widget->start_controls_tab()`
     15  * and in the end `$widget->end_controls_tab()`.
     16  *
     17  * @since 1.0.0
     18  */
     19 class Control_Tab extends Base_UI_Control {
     20 
     21 	/**
     22 	 * Get tab control type.
     23 	 *
     24 	 * Retrieve the control type, in this case `tab`.
     25 	 *
     26 	 * @since 1.0.0
     27 	 * @access public
     28 	 *
     29 	 * @return string Control type.
     30 	 */
     31 	public function get_type() {
     32 		return 'tab';
     33 	}
     34 
     35 	/**
     36 	 * Render tab 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-tab-heading">
     48 				{{{ data.label }}}
     49 			</div>
     50 		<?php
     51 	}
     52 
     53 	/**
     54 	 * Get tab control default settings.
     55 	 *
     56 	 * Retrieve the default settings of the tab control. Used to return the
     57 	 * default settings while initializing the tab control.
     58 	 *
     59 	 * @since 1.0.0
     60 	 * @access protected
     61 	 *
     62 	 * @return array Control default settings.
     63 	 */
     64 	protected function get_default_settings() {
     65 		return [
     66 			'separator' => 'none',
     67 		];
     68 	}
     69 }