PATH:
home
/
centosnipponia
/
public_html
/
nipponiagt
/
wp-content
/
plugins
/
airi-pro
<?php /** * * @link http://athemes.com * @since 1.0 * @package Airi_Pro * * @wordpress-plugin * Plugin Name: Airi Pro * Description: Provides Elementor blocks and other enhancements for the Airi WordPress theme * Version: 1.0.9 * Author: aThemes * Author URI: http://athemes.com * License: GPL-2.0+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt * Text Domain: airi-toolbox * Domain Path: /languages */ // If this file is called directly, abort. if ( ! defined( 'WPINC' ) ) { die; } $theme = wp_get_theme(); $parent = wp_get_theme()->parent(); if ( ($theme != 'Airi' ) && ($parent != 'Airi') ) return; /** * Set up and initialize */ class Airi_Pro { private static $instance; /** * Returns the instance. */ public static function get_instance() { if ( ! self::$instance ) self::$instance = new self; return self::$instance; } /** * Actions setup */ public function __construct() { add_action( 'plugins_loaded', array( $this, 'constants' ), 2 ); add_action( 'elementor/widgets/widgets_registered', array( $this, 'widgets_registered' ) ); add_action( 'elementor/elements/categories_registered', array( $this, 'block_category' ) ); add_action( 'init', array( $this, 'includes' ), 9999 ); add_action( 'elementor/frontend/after_register_scripts', array( $this, 'elementor_scripts' ), 4 ); add_action( 'wp_head', array( $this, 'slider_block_styles' ) ); add_filter( 'thd_register_settings', array( $this, 'airi_theme_dashboard_settings' ), 11 ); } /** * Constants */ function constants() { define( 'AIRI_PRO_VERSION', '1.0.9' ); define( 'AIRI_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) ); define( 'AIRI_URI', trailingslashit( plugin_dir_url( __FILE__ ) ) ); } /** * Theme dashboard settings */ public function airi_theme_dashboard_settings( $settings ) { $settings['has_pro'] = true; $settings['pro_status'] = true; $settings['documentation_link'] = 'https://docs.athemes.com/category/268-airi-pro'; $settings['changelog_version'] = AIRI_PRO_VERSION; $settings['changelog_link'] = 'https://athemes.com/changelog/airi-pro/'; $settings['support_link'] = 'https://athemes.com/support/'; return $settings; } /** * Load the Elementor custom blocks */ public function widgets_registered() { if ( defined('ELEMENTOR_PATH') && class_exists('Elementor\Widget_Base') ) { require AIRI_DIR . '/blocks/block-shop-categories.php'; require AIRI_DIR . '/blocks/block-portfolio.php'; require AIRI_DIR . '/blocks/block-slider.php'; } } /** * Includes */ function includes() { //Customizer extra options require_once( AIRI_DIR . 'inc/customizer.php' ); //Additional functions require_once( AIRI_DIR . 'inc/functions.php' ); //Updates require_once( AIRI_DIR . 'updates.php' ); } /** * Scripts */ function elementor_scripts() { wp_register_script( 'swiper', AIRI_URI . '/js/swiper-bundle.min.js', array(), '20220328', true ); //Elementor scripts wp_enqueue_script( 'airi-elementor-scripts', AIRI_URI . '/js/elementor.js', array( 'jquery', 'swiper' ), '20220328', true ); } /** * Define an Elementor category for the custom blocks */ public function block_category() { \Elementor\Plugin::$instance->elements_manager->add_category( 'airi-elements', [ 'title' => __( 'Airi Elements', 'airi' ), 'icon' => 'fas fa-plug', ], 1 ); } /** * Add styles for the slider block * @since 1.0.4 */ public function slider_block_styles() { ?> <style> .athemes-hero-slider .swiper-slide { height: 500px; background-repeat: no-repeat; background-size: cover; background-position: center center; } .athemes-hero-slider .swiper-pagination { left: 30px; } .athemes-hero-slider .swiper-pagination-bullets { bottom: 25px; } .athemes-hero-slider .swiper-pagination-bullet { background: #adadad; padding: 0; border-radius: 0; width: 12px; height: 12px; } .athemes-hero-slider .swiper-pagination-bullet.swiper-pagination-bullet-active { background: #1c1c1c; } @media ( max-width: 767px ) { .athemes-hero-wrapper .slide-inner { padding-left: 0; } } </style> <?php } } Airi_Pro::get_instance(); /** * Updates */ define( 'ATHEMES_STORE_URL', 'http://athemes.com' ); define( 'ATHEMES_PLUGIN_NAME', 'Airi Pro' ); if( !class_exists( 'EDD_SL_Plugin_Updater' ) ) { include( plugin_dir_path( __FILE__ ) . '/EDD_SL_Plugin_Updater.php' ); } function airi_pro_plugin_updater() { $license_key = trim( get_option( 'airi_pro_license_key' ) ); // setup the updater $edd_updater = new EDD_SL_Plugin_Updater( ATHEMES_STORE_URL, __FILE__, array( 'version' => '1.0.9', 'license' => $license_key, 'item_name' => ATHEMES_PLUGIN_NAME, 'author' => 'aThemes' ) ); } add_action( 'admin_init', 'airi_pro_plugin_updater', 0 );
[+]
..
[+]
blocks
[+]
inc
[+]
js
[-] airi-pro.php
[edit]
[-] EDD_SL_Plugin_Updater.php
[edit]
[-] README.md
[edit]
[-] updates.php
[edit]
[-] .htaccess.disabled
[edit]