PATH:
home
/
centosnipponia
/
public_html
/
sweetrich
/
wp-content
/
themes
/
sydney-pro-ii
/
inc
/
elementor
<?php namespace Elementor; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Elementor icon list widget. * * Elementor widget that displays a bullet list with any chosen icons and texts. * * @since 1.0.0 */ class aThemes_Elementor_Animated_Heading extends Widget_Base { public function __construct($data = [], $args = null) { parent::__construct($data, $args); wp_register_script( 'sydney-typed-js', get_template_directory_uri() . '/js/typed.min.js', [ 'elementor-frontend' ], '1.0.0', true ); } public function get_script_depends() { return [ 'sydney-typed-js' ]; } /** * Get widget name. * * Retrieve icon list widget name. * * @since 1.0.0 * @access public * * @return string Widget name. */ public function get_name() { return 'athemes-animated-heading'; } /** * Get widget title. * * Retrieve icon list widget title. * * @since 1.0.0 * @access public * * @return string Widget title. */ public function get_title() { return __( 'aThemes: Animated heading', 'sydney' ); } /** * Get widget icon. * * Retrieve icon list widget icon. * * @since 1.0.0 * @access public * * @return string Widget icon. */ public function get_icon() { return 'eicon-animation-text'; } /** * Get widget categories. * * Retrieve the list of categories the icon list widget belongs to. * * Used to determine where to display the widget in the editor. * * @since 1.0.0 * @access public * * @return array Widget categories. */ public function get_categories() { return [ 'sydney-elements' ]; } /** * Register icon list widget controls. * * Adds different input fields to allow the user to change and customize the widget settings. * * @since 1.0.0 * @access protected */ protected function register_controls() { $this->start_controls_section( 'section_animated_heading', [ 'label' => __( 'Animated heading', 'sydney' ), ] ); $this->add_control( 'text_before', [ 'label' => __( 'Text before', 'sydney' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'placeholder' => '', 'default' => __( 'I am a', 'sydney' ), ] ); $repeater = new Repeater(); $repeater->add_control( 'animated_heading_field', [ 'label' => __( 'String', 'sydney' ), 'type' => Controls_Manager::TEXT, 'default' => __( 'developer', 'sydney' ), 'show_label' => true, ] ); $this->add_control( 'typed_strings', [ 'label' => '', 'type' => Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'default' => [ [ 'animated_heading_field' => __( 'proffesional', 'sydney' ), ], [ 'animated_heading_field' => __( 'experienced', 'sydney' ), ], ], 'title_field' => '{{{ name }}}', ] ); $this->add_control( 'text_after', [ 'label' => __( 'Text after', 'sydney' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'placeholder' => '', 'default' => __( 'designer', 'sydney' ), ] ); $this->add_control( 'title_tag', [ 'label' => __('HTML Tag', 'sydney'), 'type' => Controls_Manager::SELECT, 'default' => 'h2', 'options' => [ 'h1' => __('H1', 'sydney'), 'h2' => __('H2', 'sydney'), 'h3' => __('H3', 'sydney'), 'h4' => __('H4', 'sydney'), 'h5' => __('H5', 'sydney'), 'h6' => __('H6', 'sydney'), 'span' => __('Span', 'sydney'), 'p' => __('P', 'sydney'), 'div' => __('Div', 'sydney'), ], 'separator' => 'before', ] ); $this->add_control( 'type_speed', [ 'label' => __( 'Typing speed', 'sydney' ), 'type' => Controls_Manager::NUMBER, 'label_block' => true, 'placeholder' => '', 'default' => 70, 'separator' => 'before', 'min' => 5, 'max' => 300, 'step' => 5, ] ); $this->add_control( 'back_speed', [ 'label' => __( 'Backspace speed', 'sydney' ), 'type' => Controls_Manager::NUMBER, 'label_block' => true, 'placeholder' => '', 'default' => 30, 'min' => 5, 'max' => 300, 'step' => 5, ] ); $this->add_control( 'back_delay', [ 'label' => __( 'Backspace delay', 'sydney' ), 'type' => Controls_Manager::NUMBER, 'label_block' => true, 'placeholder' => '', 'default' => 2000, 'min' => 0, 'max' => 10000, 'step' => 5, ] ); $this->add_control( 'view', [ 'label' => __( 'View', 'sydney' ), 'type' => Controls_Manager::HIDDEN, 'default' => 'traditional', ] ); $this->end_controls_section(); //Text before $this->start_controls_section( 'section_text_before_style', [ 'label' => __( 'Text before', 'sydney' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'text_before_color', [ 'label' => __( 'Color', 'sydney' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .typed-text-before' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'text_before_typography', 'selector' => '{{WRAPPER}} .typed-text-before', 'scheme' => Core\Schemes\Typography::TYPOGRAPHY_3, ] ); $this->end_controls_section(); //Text strings $this->start_controls_section( 'section_text_strings_style', [ 'label' => __( 'Animated strings', 'sydney' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'text_strings_color', [ 'label' => __( 'Color', 'sydney' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .typed-strings' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'text_strings_typography', 'selector' => '{{WRAPPER}} .typed-strings', 'scheme' => Core\Schemes\Typography::TYPOGRAPHY_3, ] ); $this->end_controls_section(); //Text after $this->start_controls_section( 'section_text_after_style', [ 'label' => __( 'Text after', 'sydney' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'text_after_color', [ 'label' => __( 'Color', 'sydney' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .typed-text-after' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'text_after_typography', 'selector' => '{{WRAPPER}} .typed-text-after', 'scheme' => Core\Schemes\Typography::TYPOGRAPHY_3, ] ); $this->end_controls_section(); } /** * Render icon list widget output on the frontend. * * Written in PHP and used to generate the final HTML. * * @since 1.0.0 * @access protected */ protected function render() { $settings = $this->get_settings_for_display(); $strings = array(); foreach ( $settings['typed_strings'] as $item ) { if ( ! empty( $item['animated_heading_field'] ) ) { $strings[] = $item['animated_heading_field']; } } $strings = implode( '|', $strings); $this->add_render_attribute( 'animated-heading', 'class', 'sydney-typed-strings' ); $this->add_render_attribute( 'animated-heading', 'data-strings', $strings ); $this->add_render_attribute( 'animated-heading', 'data-id', $this->get_id() ); $this->add_render_attribute( 'animated-heading', 'data-type-speed', $settings['type_speed'] ); $this->add_render_attribute( 'animated-heading', 'data-back-speed', $settings['back_speed'] ); $this->add_render_attribute( 'animated-heading', 'data-back-delay', $settings['back_delay'] ); ?> <div <?php echo $this->get_render_attribute_string( 'animated-heading' ); ?> > <<?php echo esc_attr( $settings['title_tag'] ); ?>> <span class="typed-text-before"><?php echo esc_html( $settings['text_before'] ); ?></span> <span class="typed-strings" id="sydney-animated-heading-<?php echo esc_attr( $this->get_id() ); ?>"></span> <span class="typed-text-after"><?php echo esc_html( $settings['text_after'] ); ?></span> </<?php echo esc_attr( $settings['title_tag'] ); ?>> </div> <?php } /** * Render icon list widget output in the editor. * * Written as a Backbone JavaScript template and used to generate the live preview. * * @since 1.0.0 * @access protected */ protected function content_template() { } } Plugin::instance()->widgets_manager->register_widget_type( new aThemes_Elementor_Animated_Heading() );
[+]
..
[-] block-animated-heading.php
[edit]
[-] block-contact-form7.php
[edit]
[-] block-dual-buttons.php
[edit]
[-] block-dual-heading.php
[edit]
[-] block-food-menu.php
[edit]
[-] block-hotspots.php
[edit]
[-] block-ninjaforms.php
[edit]
[-] block-wpforms.php
[edit]
[-] .htaccess.disabled
[edit]