| Server IP : 87.229.120.60 / Your IP : 216.73.216.245 Web Server : Apache System : Linux outside 5.4.8_Algonet_ZeroMAC_0.9.4.8 #6 SMP Mon Feb 3 20:36:07 CET 2020 x86_64 User : server ( 1002) PHP Version : 8.3.20 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,curl_multi_exec,parse_ini_file,show_source MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/faktorteam/www/wp-content/plugins/rife-elementor-extensions/includes/ |
Upload File : |
<?php
namespace Apollo13_REE;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Custom widgets for Elementor
*
* This class handles custom widgets for Elementor
*
* @since 1.0.0
*/
class Widgets {
/**
* Registers widgets in Elementor
*
*
* @since 1.0.0
* @access public
*/
public function register_widgets() {
/** @noinspection PhpIncludeInspection */
require_once A13REE_PATH . '/includes/elementor/widgets/writing-effect-headline.php';
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Widget_Writing_Effect_Headline );
}
/**
* Registers widgets scripts
*
*
* @since 1.0.0
* @access public
*/
public function widget_scripts() {
//typed.js - writing script
wp_register_script(
'jquery-typed',
A13REE_ASSETS_URL .'js/typed.min.js' ,
[
'jquery',
],
'1.1.4',
true
);
//fronted.js - plugin front-end actions
wp_register_script(
'a13ree-frontend',
A13REE_ASSETS_URL .'js/frontend.js' ,
[
'elementor-waypoints',
'jquery',
],
A13REE_VERSION,
true
);
}
/**
* Enqueue widgets scripts in preview mode, as later calls in widgets render will not work,
* as it happens in admin env
*
*
* @since 1.0.0
* @access public
*/
public function widget_scripts_preview() {
wp_enqueue_script( 'jquery-typed' );
wp_enqueue_script( 'a13ree-frontend' );
}
/**
* Registers widgets styles
*
*
* @since 1.0.0
* @access public
*/
public function widget_styles() {
wp_register_style( 'a13ree-frontend', A13REE_ASSETS_URL .'css/frontend.css' );
}
/**
* Widget constructor.
*
*
* @since 1.0.0
* @access public
*/
public function __construct() {
add_action( 'elementor/widgets/widgets_registered', [ $this, 'register_widgets' ] );
// Register Widget Styles
add_action( 'elementor/frontend/after_enqueue_styles', [ $this, 'widget_styles' ] );
// Register Widget Scripts
add_action( 'elementor/frontend/after_register_scripts', [ $this, 'widget_scripts' ] );
// Enqueue ALL Widgets Scripts for preview
add_action( 'elementor/preview/enqueue_scripts', [ $this, 'widget_scripts_preview' ] );
}
}