| Server IP : 5.83.47.51 / Your IP : 216.73.217.19 Web Server : Apache System : Linux hosting.nxthost.com 5.14.0-687.44.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Sep 9 11:11:28 EDT 2026 x86_64 User : esteemro ( 1261) PHP Version : 7.4.33 Disable Function : show_source, system, shell_exec, passthru, exec, popen, proc_open MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/esteemro/public_html/wp-content/plugins/jet-tricks/ |
Upload File : |
<?php
/**
* Plugin Name: JetTricks
* Plugin URI: https://jettricks.zemez.io/
* Description: Use different eye-catching stylish animation effects and let your content become truly alive with outstanding visual tricks!
* Version: 1.1.6
* Author: Zemez
* Author URI: https://zemez.io/wordpress/
* Text Domain: jet-tricks
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Domain Path: /languages
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die();
}
// If class `Jet_Tricks` doesn't exists yet.
if ( ! class_exists( 'Jet_Tricks' ) ) {
/**
* Sets up and initializes the plugin.
*/
class Jet_Tricks {
/**
* A reference to an instance of this class.
*
* @since 1.0.0
* @access private
* @var object
*/
private static $instance = null;
/**
* A reference to an instance of cherry framework core class.
*
* @since 1.0.0
* @access private
* @var object
*/
private $core = null;
/**
* Holder for base plugin URL
*
* @since 1.0.0
* @access private
* @var string
*/
private $plugin_url = null;
/**
* Plugin version
*
* @var string
*/
private $version = '1.1.6';
/**
* Holder for base plugin path
*
* @since 1.0.0
* @access private
* @var string
*/
private $plugin_path = null;
/**
* Components
*/
public $assets;
/**
* Sets up needed actions/filters for the plugin to initialize.
*
* @since 1.0.0
* @access public
* @return void
*/
public function __construct() {
// Internationalize the text strings used.
add_action( 'init', array( $this, 'lang' ), -999 );
// Load files.
add_action( 'init', array( $this, 'init' ), -999 );
// Plugin row meta
add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 );
// Register activation and deactivation hook.
register_activation_hook( __FILE__, array( $this, 'activation' ) );
register_deactivation_hook( __FILE__, array( $this, 'deactivation' ) );
}
/**
* Returns plugin version
*
* @return string
*/
public function get_version() {
return $this->version;
}
/**
* Manually init required modules.
*
* @return void
*/
public function init() {
$this->load_files();
jet_tricks_element_extension()->init();
jet_tricks_integration()->init();
jet_tricks_assets()->init();
jet_tricks_compatibility()->init();
if ( is_admin() ) {
require $this->plugin_path( 'includes/updater/plugin-update.php' );
jet_tricks_updater()->init( array(
'version' => $this->get_version(),
'slug' => 'jet-tricks',
) );
}
do_action( 'jet-tricks/init', $this );
}
/**
* Show recommended plugins notice.
*
* @return void
*/
public function required_plugins_notice() {
require $this->plugin_path( 'includes/lib/class-tgm-plugin-activation.php' );
add_action( 'tgmpa_register', array( $this, 'register_required_plugins' ) );
}
/**
* Register required plugins
*
* @return void
*/
public function register_required_plugins() {
$plugins = array(
array(
'name' => 'Elementor',
'slug' => 'elementor',
'required' => true,
),
);
$config = array(
'id' => 'jet-tricks',
'default_path' => '',
'menu' => 'jet-tricks-install-plugins',
'parent_slug' => 'plugins.php',
'capability' => 'manage_options',
'has_notices' => true,
'dismissable' => true,
'dismiss_msg' => '',
'is_automatic' => false,
'strings' => array(
'notice_can_install_required' => _n_noop(
'JetTricks for Elementor requires the following plugin: %1$s.',
'JetTricks for Elementor requires the following plugins: %1$s.',
'jet-tricks'
),
'notice_can_install_recommended' => _n_noop(
'JetTricks for Elementor recommends the following plugin: %1$s.',
'JetTricks for Elementor recommends the following plugins: %1$s.',
'jet-tricks'
),
),
);
tgmpa( $plugins, $config );
}
/**
* Load required files
*
* @return void
*/
public function load_files() {
require $this->plugin_path( 'includes/ext/element-extension.php' );
require $this->plugin_path( 'includes/integration.php' );
require $this->plugin_path( 'includes/assets.php' );
require $this->plugin_path( 'includes/compatibility/compatibility.php' );
}
/**
* Check if theme has elementor
*
* @return boolean
*/
public function has_elementor() {
return defined( 'ELEMENTOR_VERSION' );
}
/**
* [elementor description]
* @return [type] [description]
*/
public function elementor() {
return \Elementor\Plugin::$instance;
}
/**
* Returns path to file or dir inside plugin folder
*
* @param string $path Path inside plugin dir.
* @return string
*/
public function plugin_path( $path = null ) {
if ( ! $this->plugin_path ) {
$this->plugin_path = trailingslashit( plugin_dir_path( __FILE__ ) );
}
return $this->plugin_path . $path;
}
/**
* Returns url to file or dir inside plugin folder
*
* @param string $path Path inside plugin dir.
* @return string
*/
public function plugin_url( $path = null ) {
if ( ! $this->plugin_url ) {
$this->plugin_url = trailingslashit( plugin_dir_url( __FILE__ ) );
}
return $this->plugin_url . $path;
}
/**
* Loads the translation files.
*
* @since 1.0.0
* @access public
* @return void
*/
public function lang() {
load_plugin_textdomain( 'jet-tricks', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
}
/**
* Get the template path.
*
* @return string
*/
public function template_path() {
return apply_filters( 'jet-tricks/template-path', 'jet-tricks/' );
}
/**
* Returns path to template file.
*
* @return string|bool
*/
public function get_template( $name = null ) {
$template = locate_template( $this->template_path() . $name );
if ( ! $template ) {
$template = $this->plugin_path( 'templates/' . $name );
}
if ( file_exists( $template ) ) {
return $template;
} else {
return false;
}
}
/**
* Add plugin changelog link.
*
* @param array $plugin_meta
* @param string $plugin_file
*
* @return array
*/
public function plugin_row_meta( $plugin_meta, $plugin_file ) {
if ( plugin_basename( __FILE__ ) === $plugin_file ) {
$plugin_meta['changelog'] = sprintf(
'<a href="http://documentation.zemez.io/wordpress/index.php?project=jettricks&lang=en§ion=jettricks-changelog" target="_blank">%s</a>',
esc_html__( 'Changelog', 'jet-tricks' )
);
}
return $plugin_meta;
}
/**
* Do some stuff on plugin activation
*
* @since 1.0.0
* @return void
*/
public function activation() {
}
/**
* Do some stuff on plugin activation
*
* @since 1.0.0
* @return void
*/
public function deactivation() {
}
/**
* Returns the instance.
*
* @since 1.0.0
* @access public
* @return object
*/
public static function get_instance() {
// If the single instance hasn't been set, set it now.
if ( null == self::$instance ) {
self::$instance = new self;
}
return self::$instance;
}
}
}
if ( ! function_exists( 'jet_tricks' ) ) {
/**
* Returns instanse of the plugin class.
*
* @since 1.0.0
* @return object
*/
function jet_tricks() {
return Jet_Tricks::get_instance();
}
}
jet_tricks();