PluginProbe
Easy Elements for Elementor – Addons & Website Templates / 1.0.0
Easy Elements for Elementor – Addons & Website Templates v1.0.0
1.5.3 1.5.2 1.5.1 1.5.0 1.4.9 1.4.6 1.4.7 1.4.8 1.4.5 1.4.4 1.4.3 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 All 47 releases
easy-elements / easy-elements.php

easy-elements.php in Easy Elements for Elementor – Addons & Website Templates 1.0.0, at easy-elements.php

63 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Easy Elements
4 * Plugin URI: https://wpeasyelements.com
5 * Description: Provides a set of custom Elementor widgets, shortcodes, and enhancements.
6 * Version: 1.0.0
7 * Author: Themewant
8 * Author URI: https://themewant.com/
9 * Text Domain: easy-elements
10 * Domain Path: /languages
11 * License: GPLv2 or later
12 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
13 */
14
15 if ( ! defined( 'ABSPATH' ) ) {
16 exit;
17 }
18
19
20 // Define constants
21 define( 'EASYELEMENTS_FILE', __FILE__ );
22 define( 'EASYELEMENTS_DIR_PATH', plugin_dir_path( __FILE__ ) );
23 define( 'EASYELEMENTS_DIR_URL', plugin_dir_url( __FILE__ ) );
24 define( 'EASYELEMENTS_ASSETS_URL', EASYELEMENTS_DIR_URL . 'assets/' );
25
26
27
28 $required_files = [
29 'base.php',
30 ];
31
32 foreach ( $required_files as $file ) {
33 $filepath = EASYELEMENTS_DIR_PATH . $file;
34 if ( file_exists( $filepath ) ) {
35 require_once $filepath;
36 } else {
37 }
38 }
39
40
41 // Elementor missing notice
42 function easy_elements_elementor_missing_notice() {
43 echo '<div class="notice notice-error"><p>';
44 echo esc_html__( 'Easy Elements requires Elementor to be installed and activated.', 'easy-elements' );
45 echo '</p></div>';
46 }
47
48
49 register_activation_hook( __FILE__, 'easy_elements_activate' );
50 function easy_elements_activate() {
51 // Register post types first
52 if (function_exists('easy_elements_register_archive_template_post_type')) {
53 easy_elements_register_archive_template_post_type();
54 }
55 flush_rewrite_rules();
56 }
57
58 add_filter( 'body_class', function( $classes ) {
59 if ( is_plugin_active( 'easy-elements/easy-elements.php' ) ) {
60 $classes[] = 'eel-easy-elements';
61 }
62 return $classes;
63 });