Gestionnaire de fichiers - Editer - /home/wwgoat/public_html/blog/wp-content/plugins/foxiz-core/elementor/heading.php
Arrière
<?php namespace foxizElementor\Widgets; use Elementor\Widget_Base; use Elementor\Controls_Manager; use foxizElementorControl\Options; if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Class Foxiz_Heading * @package foxizElementor\Widgets */ class Block_Heading extends Widget_Base { public function get_name() { return 'foxiz-heading'; } public function get_title() { return esc_html__( 'Foxiz - Heading', 'foxiz-core' ); } public function get_icon() { return 'eicon-favorite'; } public function get_categories() { return array( 'foxiz' ); } protected function register_controls() { $this->start_controls_section( 'section_title', array( 'label' => esc_html__( 'General Settings', 'foxiz-core' ), 'tab' => Controls_Manager::TAB_CONTENT, ) ); $this->add_control( 'title', array( 'label' => esc_html__( 'Title', 'foxiz-core' ), 'type' => Controls_Manager::TEXTAREA, 'rows' => 2, 'description' => esc_html__( 'Input your heading title, allow i tags for icon classname.', 'foxiz-core' ), 'default' => esc_html__( 'Latest News', 'foxiz-core' ), ) ); $this->add_control( 'tagline', array( 'label' => esc_html__( 'Tagline', 'foxiz-core' ), 'type' => Controls_Manager::TEXTAREA, 'rows' => 2, 'description' => esc_html__( 'Input a right tagline text for this heading. You can change font values of this element in Theme Options > Typography > Blog Heading', 'foxiz-core' ), 'default' => '', ) ); $this->add_control( 'link', array( 'label' => esc_html__( 'Link', 'foxiz-core' ), 'type' => Controls_Manager::URL ) ); $this->add_control( 'html_tag', array( 'label' => esc_html__( 'Heading HTML Tag', 'foxiz-core' ), 'type' => Controls_Manager::SELECT, 'options' => array( 'h1' => 'H1', 'h2' => 'H2', 'h3' => 'H3', 'h4' => 'H4', 'h5' => 'H5', 'h6' => 'H6', 'span' => 'span', 'p' => 'p', ), 'default' => 'h2', ) ); $this->end_controls_section(); $this->start_controls_section( 'layout_section', array( 'label' => esc_html__( 'Layout Settings', 'foxiz-core' ), 'tab' => Controls_Manager::TAB_STYLE, ) ); $this->add_control( 'layout', array( 'label' => esc_html__( 'Heading Layout', 'foxiz-core' ), 'type' => Controls_Manager::SELECT, 'description' => esc_html__( 'Select a style for your heading.', 'foxiz-core' ), 'options' => array( '0' => esc_html__( '- Default -', 'foxiz-core' ), '1' => esc_html__( 'Layout 1', 'foxiz-core' ), '2' => esc_html__( 'Layout 2', 'foxiz-core' ), '3' => esc_html__( 'Layout 3', 'foxiz-core' ), '4' => esc_html__( 'Layout 4', 'foxiz-core' ), '5' => esc_html__( 'Layout 5', 'foxiz-core' ), '6' => esc_html__( 'Layout 6', 'foxiz-core' ), '7' => esc_html__( 'Layout 7', 'foxiz-core' ), '8' => esc_html__( 'Layout 8', 'foxiz-core' ), '9' => esc_html__( 'Layout 9', 'foxiz-core' ), '10' => esc_html__( 'Layout 10', 'foxiz-core' ), '11' => esc_html__( 'Layout 11', 'foxiz-core' ), '12' => esc_html__( 'Layout 12', 'foxiz-core' ), '13' => esc_html__( 'Layout 13', 'foxiz-core' ), 'c1' => esc_html__( 'Layout 1 - Center', 'foxiz-core' ), 'c2' => esc_html__( 'Layout 2 - Center', 'foxiz-core' ), 'c3' => esc_html__( 'Layout 3 - Center', 'foxiz-core' ), 'c4' => esc_html__( 'Layout 4 - Center', 'foxiz-core' ), 'c5' => esc_html__( 'Layout 5 - Center', 'foxiz-core' ), 'c6' => esc_html__( 'Layout 6 - Center', 'foxiz-core' ), 'c7' => esc_html__( 'Layout 7 - Center', 'foxiz-core' ), 'c8' => esc_html__( 'Layout 8 - Center', 'foxiz-core' ), 'c9' => esc_html__( 'Layout 9 - Center', 'foxiz-core' ), 'c10' => esc_html__( 'Layout 10 - Center', 'foxiz-core' ), 'c11' => esc_html__( 'Layout 11 - Center', 'foxiz-core' ), 'c12' => esc_html__( 'Layout 12 - Center', 'foxiz-core' ), 'c13' => esc_html__( 'Layout 13 - Center', 'foxiz-core' ), ), 'default' => '0', ) ); $this->add_responsive_control( 'heading_size', array( 'label' => esc_html__( 'Font Size', 'foxiz-core' ), 'type' => Controls_Manager::TEXT, 'description' => esc_html__( 'Input a custom font size value (px) for this heading. Leave this option blank to set the default value.', 'foxiz-core' ), 'default' => '', 'devices' => array( 'desktop', 'tablet', 'mobile' ), 'selectors' => array( '{{WRAPPER}} .heading-title > *' => 'font-size: {{VALUE}}px;' ) ) ); $this->add_responsive_control( 'tagline_size', array( 'label' => esc_html__( 'Tagline - Font Size', 'foxiz-core' ), 'type' => Controls_Manager::TEXT, 'description' => esc_html__( 'Input a custom font size value (px) for this tagline. Leave this option blank to set the default value.', 'foxiz-core' ), 'default' => '', 'devices' => array( 'desktop', 'tablet', 'mobile' ), 'selectors' => array( '{{WRAPPER}} .heading-tagline > *' => 'font-size: {{VALUE}}px;' ) ) ); $this->add_control( 'tagline_arrow', array( 'label' => esc_html__( 'Tagline Arrow', 'foxiz-core' ), 'description' => esc_html__( 'Show an arrow icon at the right of the tagline.', 'foxiz-core' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes' ) ); $this->end_controls_section(); $this->start_controls_section( 'section_color', array( 'label' => esc_html__( 'Color Settings', 'foxiz-core' ), 'tab' => Controls_Manager::TAB_STYLE, ) ); $this->add_control( 'color_info', array( 'type' => Controls_Manager::RAW_HTML, 'raw' => esc_html__( 'Note: The colors settings will based on the heading layout. Primary color will not apply on the style 6.', 'foxiz-core' ), 'content_classes' => 'elementor-panel-alert elementor-panel-alert-warning', ) ); $this->add_control( 'primary_color', array( 'label' => esc_html__( 'Primary Color', 'foxiz-core' ), 'type' => Controls_Manager::COLOR, 'description' => esc_html__( 'Select a primary color for this heading.', 'foxiz-core' ), 'selectors' => array( '{{WRAPPER}} ' => '--heading-color: {{VALUE}};' ) ) ); $this->add_control( 'accent_color', array( 'label' => esc_html__( 'Accent Color', 'foxiz-core' ), 'type' => Controls_Manager::COLOR, 'description' => esc_html__( 'Select a accent color for this heading.', 'foxiz-core' ), 'default' => '', 'selectors' => array( '{{WRAPPER}} ' => '--heading-sub-color: {{VALUE}};' ) ) ); $this->add_control( 'tagline_color', array( 'label' => esc_html__( 'Tagline Color', 'foxiz-core' ), 'type' => Controls_Manager::COLOR, 'description' => esc_html__( 'Select a color for the tagline of this heading.', 'foxiz-core' ), 'default' => '', 'selectors' => array( '{{WRAPPER}} ' => '--heading-tagline-color: {{VALUE}};' ) ) ); $this->add_control( 'dark_primary_color', array( 'label' => esc_html__( 'Dark Mode - Primary Color', 'foxiz-core' ), 'type' => Controls_Manager::COLOR, 'description' => esc_html__( 'Select a primary color for this heading in the dark mode.', 'foxiz-core' ), 'selectors' => array( '[data-theme="dark"] {{WRAPPER}}, {{WRAPPER}} .light-scheme' => '--heading-color: {{VALUE}};' ) ) ); $this->add_control( 'dark_accent_color', array( 'label' => esc_html__( 'Dark Mode - Accent Color', 'foxiz-core' ), 'type' => Controls_Manager::COLOR, 'description' => esc_html__( 'Select a accent color for this heading in the dark mode.', 'foxiz-core' ), 'default' => '', 'selectors' => array( '[data-theme="dark"] {{WRAPPER}}, {{WRAPPER}} .light-scheme' => '--heading-sub-color: {{VALUE}};' ) ) ); $this->add_control( 'dark_tagline_color', array( 'label' => esc_html__( 'Dark Mode - Tagline Color', 'foxiz-core' ), 'type' => Controls_Manager::COLOR, 'description' => esc_html__( 'Select a tagline color for this heading in the dark mode.', 'foxiz-core' ), 'default' => '', 'selectors' => array( '[data-theme="dark"] {{WRAPPER}}, {{WRAPPER}} .light-scheme' => '--heading-tagline-color: {{VALUE}};' ) ) ); $this->end_controls_section(); $this->start_controls_section( 'color_section', array( 'label' => esc_html__( 'Text Color Scheme', 'foxiz-core' ), 'tab' => Controls_Manager::TAB_STYLE, ) ); $this->add_control( 'color_scheme_info', array( 'type' => Controls_Manager::RAW_HTML, 'raw' => Options::color_scheme_info_description(), 'content_classes' => 'elementor-panel-alert elementor-panel-alert-success', ) ); $this->add_control( 'color_scheme', array( 'label' => esc_html__( 'Text Color Scheme', 'foxiz-core' ), 'type' => Controls_Manager::SELECT, 'description' => Options::color_scheme_description(), 'options' => array( '0' => esc_html__( 'Default (Dark Text)', 'foxiz-core' ), '1' => esc_html__( 'Light Text', 'foxiz-core' ) ), 'default' => '0', ) ); $this->end_controls_section(); $this->start_controls_section( 'font_section', array( 'label' => esc_html__( 'Custom Font', 'foxiz-core' ), 'tab' => Controls_Manager::TAB_STYLE, ) ); $this->add_control( 'custom_font_info', array( 'type' => Controls_Manager::RAW_HTML, 'raw' => Options::custom_font_info_description(), 'content_classes' => 'elementor-panel-alert elementor-panel-alert-success', ) ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), array( 'label' => esc_html__( 'Heading Font', 'foxiz-core' ), 'name' => 'title_font', 'selector' => '{{WRAPPER}} .heading-title > *', ) ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), array( 'label' => esc_html__( 'Tagline Font', 'foxiz-core' ), 'name' => 'category_font', 'selector' => '{{WRAPPER}} .heading-tagline > *', ) ); $this->end_controls_section(); } /** * render layout */ protected function render() { if ( function_exists( 'foxiz_get_heading' ) ) { $settings = $this->get_settings(); $settings['uuid'] = 'uid_' . $this->get_id(); echo \foxiz_get_heading( $settings ); } } }
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Génération de la page: 0 |
proxy
|
phpinfo
|
Réglages