Файловый менеджер - Редактировать - /home/digitalm/invisalign/wp-content/themes/healthy-smiles/kits/settings/header-mid/header-mid.php
Назад
<?php namespace HealthySmilesSpace\Kits\Settings\HeaderMid; use HealthySmilesSpace\Kits\Controls\Controls_Manager as CmsmastersControls; use HealthySmilesSpace\Kits\Settings\Base\Settings_Tab_Base; use Elementor\Controls_Manager; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } /** * Header Mid settings. * * @since 1.0.0 */ class Header_Mid extends Settings_Tab_Base { /** * Get toggle name. * * Retrieve the toggle name. * * @since 1.0.0 * * @return string Toggle name. */ public static function get_toggle_name() { return 'header_mid'; } /** * Get title. * * Retrieve the toggle title. * * @since 1.0.0 */ public function get_title() { return esc_html__( 'Header Middle', 'healthy-smiles' ); } /** * Get control ID prefix. * * Retrieve the control ID prefix. * * @return string Control ID prefix. */ protected static function get_control_id_prefix() { $toggle_name = self::get_toggle_name(); return parent::get_control_id_prefix() . "_{$toggle_name}"; } /** * Register toggle controls. * * Registers the controls of the kit settings tab toggle. * * @since 1.0.0 */ protected function register_toggle_controls() { $this->add_control( 'notice', array( 'raw' => esc_html__( "If you use a 'Header' template, then the settings will not be applied, if you set the template to sitewide, then these settings will be hidden.", 'healthy-smiles' ), 'type' => Controls_Manager::RAW_HTML, 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info', 'render_type' => 'ui', ) ); $this->add_control( 'type', array( 'label' => esc_html__( 'Type', 'healthy-smiles' ), 'label_block' => false, 'description' => esc_html__( 'This setting will be applied after save and reload.', 'healthy-smiles' ), 'type' => CmsmastersControls::CHOOSE_TEXT, 'options' => array( 'wide' => array( 'title' => esc_html__( 'Wide', 'healthy-smiles' ), ), 'centered' => array( 'title' => esc_html__( 'Centered', 'healthy-smiles' ), ), ), 'default' => $this->get_default_setting( $this->get_control_name_parameter( '', 'type' ), 'centered' ), 'toggle' => false, ) ); $this->add_control( 'height', array( 'label' => esc_html__( 'Height', 'healthy-smiles' ), 'type' => Controls_Manager::SLIDER, 'range' => array( 'px' => array( 'min' => 0, 'max' => 500, ), ), 'size_units' => array( 'px', ), 'selectors' => array( ':root' => '--' . $this->get_control_prefix_parameter( '', 'height' ) . ': {{SIZE}}{{UNIT}};', ), ) ); $this->add_control( 'content_element_heading_control', array( 'label' => esc_html__( 'Content Element', 'healthy-smiles' ), 'type' => Controls_Manager::HEADING, 'condition' => array( $this->get_control_id_parameter( '', 'type' ) => 'wide', ), ) ); $this->add_control( 'content_element', array( 'label_block' => true, 'show_label' => false, 'description' => esc_html__( 'This setting will be applied after save and reload.', 'healthy-smiles' ), 'type' => Controls_Manager::SELECT, 'options' => array( 'none' => esc_html__( 'None', 'healthy-smiles' ), 'info' => esc_html__( 'Short Info', 'healthy-smiles' ), 'html' => esc_html__( 'Custom HTML', 'healthy-smiles' ), 'nav' => esc_html__( 'Navigation', 'healthy-smiles' ), ), 'default' => $this->get_default_setting( $this->get_control_name_parameter( '', 'content_element' ), 'none' ), 'condition' => array( $this->get_control_id_parameter( '', 'type' ) => 'wide', ), ) ); $this->add_responsive_control( 'content_element_gap', array( 'label' => esc_html__( 'Gap Between', 'healthy-smiles' ), 'description' => esc_html__( 'Gap between content and additional content', 'healthy-smiles' ), 'type' => Controls_Manager::SLIDER, 'range' => array( 'px' => array( 'min' => -10, 'max' => 100, ), '%' => array( 'min' => -1, 'max' => 100, ), 'vw' => array( 'min' => -1, 'max' => 10, ), ), 'size_units' => array( 'px', '%', 'vw', ), 'selectors' => array( ':root' => '--' . $this->get_control_prefix_parameter( '', 'content_element_gap' ) . ': {{SIZE}}{{UNIT}};', ), 'condition' => array( $this->get_control_id_parameter( '', 'type' ) => 'wide', $this->get_control_id_parameter( '', 'content_element!' ) => '', ), ) ); $this->add_control( 'add_content_elements_heading_control', array( 'label' => esc_html__( 'Additional Content Elements Order', 'healthy-smiles' ), 'type' => Controls_Manager::HEADING, 'condition' => array( $this->get_control_id_parameter( '', 'type' ) => 'wide', ), ) ); $this->add_control( 'add_content_elements', array( 'label_block' => true, 'show_label' => false, 'description' => esc_html__( 'This setting will be applied after save and reload.', 'healthy-smiles' ), 'type' => CmsmastersControls::SELECTIZE, 'options' => array( 'social' => esc_html__( 'Social Icons', 'healthy-smiles' ), 'button' => esc_html__( 'Button', 'healthy-smiles' ), 'search_button' => esc_html__( 'Search Button', 'healthy-smiles' ), ), 'multiple' => true, 'default' => $this->get_default_setting( $this->get_control_name_parameter( '', 'add_content_elements' ), array() ), 'condition' => array( $this->get_control_id_parameter( '', 'type' ) => 'wide', ), ) ); $this->add_responsive_control( 'add_content_elements_gap', array( 'label' => esc_html__( 'Gap Between', 'healthy-smiles' ), 'description' => esc_html__( 'Gap between additional content items', 'healthy-smiles' ), 'type' => Controls_Manager::SLIDER, 'range' => array( 'px' => array( 'min' => -10, 'max' => 100, ), '%' => array( 'min' => -1, 'max' => 100, ), 'vw' => array( 'min' => -1, 'max' => 10, ), ), 'size_units' => array( 'px', '%', 'vw', ), 'selectors' => array( ':root' => '--' . $this->get_control_prefix_parameter( '', 'add_content_elements_gap' ) . ': {{SIZE}}{{UNIT}};', ), 'condition' => array( $this->get_control_id_parameter( '', 'type' ) => 'wide', $this->get_control_id_parameter( '', 'add_content_elements!' ) => '', ), ) ); $this->add_responsive_control( 'z_index', array( 'label' => esc_html__( 'Z-Index', 'healthy-smiles' ), 'type' => Controls_Manager::NUMBER, 'min' => 0, 'selectors' => array( ':root' => '--' . $this->get_control_prefix_parameter( '', 'z_index' ) . ': {{VALUE}};', ), ) ); $this->add_controls_group( 'container', self::CONTROLS_CONTAINER ); $this->add_controls_group( 'content', self::CONTROLS_CONTENT ); $this->add_control( 'apply_settings', array( 'label_block' => true, 'show_label' => false, 'type' => Controls_Manager::BUTTON, 'text' => esc_html__( 'Save & Reload', 'healthy-smiles' ), 'event' => 'cmsmasters:theme_settings:apply_settings', 'separator' => 'before', ) ); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.23 | Генерация страницы: 0.04 |
proxy
|
phpinfo
|
Настройка