| Server IP : 103.249.100.196 / Your IP : 216.73.216.194 Web Server : Apache System : Linux cp196.maytech.vn 5.14.0-687.66.2.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 6 16:20:31 EST 2026 x86_64 User : dlsafepha ( 1078) PHP Version : 8.2.36 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home2/dlsafepha/public_html/wp-content/plugins/elementor-sm-widgets/ |
Upload File : |
<?php // phpcs:ignore
namespace SmWidgets;
use SmWidgets\Widgets\Service_Block;
use SmWidgets\Widgets\ServiceBlockII;
use SmWidgets\Widgets\ServiceBlockIII;
use SmWidgets\Widgets\Offices;
use SmWidgets\Widgets\Timeline;
use SmWidgets\Widgets\Advantages;
use SmWidgets\Widgets\Testimonials;
use SmWidgets\Widgets\News;
use SmWidgets\Widgets\DefaultButton;
use SmWidgets\Widgets\WooCategories;
use SmWidgets\Widgets\WooProducts;
use SmWidgets\Widgets\Menu;
use SmWidgets\Widgets\Logo;
use SmWidgets\Widgets\Search;
use SmWidgets\Widgets\Basket;
use SmWidgets\Widgets\AbsoluteImage;
use SmWidgets\Widgets\NumberBlock;
use SmWidgets\Widgets\Demos;
use SmWidgets\Widgets\Slider;
use SmWidgets\Widgets\MenuLinks;
use SmWidgets\Widgets\VideoLink;
use SmWidgets\Widgets\StmPosts;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
/**
* Main Plugin Class
*
* Register new elementor widget.
*
* @since 1.0.0
*/
class Plugin {
/**
* Constructor
*
* @since 1.0.0
*
* @access public
*/
public function __construct() {
$this->add_actions();
}
/**
* Add Actions
*
* @since 1.0.0
*
* @access private
*/
private function add_actions() {
add_action( 'elementor/widgets/register', array( $this, 'on_widgets_registered' ) );
}
/**
* On Widgets Registered
*
* @since 1.0.0
*
* @access public
*/
public function on_widgets_registered() {
$this->includes();
$this->register_widget();
}
public static function instance() {
if ( is_null( self::$_instance ) ) {
self::$_instance = new self();
}
return self::$_instance;
}
public static function widgets_elementor() {
// filename => ClassNmae
return array(
'service_block' => 'Service_Block',
'service_blockII' => 'ServiceBlockII',
'service_blockIII' => 'ServiceBlockIII',
'offices' => 'Offices',
'timeline' => 'Timeline',
'advantages' => 'Advantages',
'testimonials' => 'Testimonials',
'news' => 'News',
'default_button' => 'DefaultButton',
'woo_categories' => 'WooCategories',
'woo_products' => 'WooProducts',
'menu' => 'Menu',
'logo' => 'Logo',
'search' => 'Search',
'absolute_image' => 'AbsoluteImage',
'number_block' => 'NumberBlock',
'demos' => 'Demos',
'basket' => 'Basket',
'slider' => 'Slider',
'menu_links' => 'MenuLinks',
'video_link' => 'VideoLink',
'stm_posts' => 'StmPosts',
);
}
/**
* Includes
*
* @since 1.0.0
*
* @access private
*/
private function includes() {
foreach ( $this->widgets_elementor() as $filename => $elementor_class ) {
$dir = apply_filters( 'elementor_sm_widgets_path', __DIR__, $filename );
require_once $dir . '/widgets/' . $filename . '.php';
}
require_once __DIR__ . '/fields/icons.php';
}
/**
* Register Widget
*
* @since 1.0.0
*
* @access private
*/
private function register_widget() {
\Elementor\Plugin::instance()->widgets_manager->register( new Service_Block() );
\Elementor\Plugin::instance()->widgets_manager->register( new ServiceBlockII() );
\Elementor\Plugin::instance()->widgets_manager->register( new ServiceBlockIII() );
\Elementor\Plugin::instance()->widgets_manager->register( new Offices() );
\Elementor\Plugin::instance()->widgets_manager->register( new Timeline() );
\Elementor\Plugin::instance()->widgets_manager->register( new Advantages() );
\Elementor\Plugin::instance()->widgets_manager->register( new Testimonials() );
\Elementor\Plugin::instance()->widgets_manager->register( new News() );
\Elementor\Plugin::instance()->widgets_manager->register( new DefaultButton() );
\Elementor\Plugin::instance()->widgets_manager->register( new WooCategories() );
\Elementor\Plugin::instance()->widgets_manager->register( new WooProducts() );
\Elementor\Plugin::instance()->widgets_manager->register( new Menu() );
\Elementor\Plugin::instance()->widgets_manager->register( new Logo() );
\Elementor\Plugin::instance()->widgets_manager->register( new Search() );
\Elementor\Plugin::instance()->widgets_manager->register( new AbsoluteImage() );
\Elementor\Plugin::instance()->widgets_manager->register( new NumberBlock() );
\Elementor\Plugin::instance()->widgets_manager->register( new Demos() );
\Elementor\Plugin::instance()->widgets_manager->register( new Basket() );
\Elementor\Plugin::instance()->widgets_manager->register( new Slider() );
\Elementor\Plugin::instance()->widgets_manager->register( new MenuLinks() );
\Elementor\Plugin::instance()->widgets_manager->register( new VideoLink() );
\Elementor\Plugin::instance()->widgets_manager->register( new StmPosts() );
}
}
new Plugin();