| 1 |
<?php |
| 2 |
/* |
| 3 |
* Plugin Name: Swipe Slider |
| 4 |
* Plugin URI: https://pluginenvision.com/plugins/swipe-slider |
| 5 |
* Description: Make dynamic slider with solid, gradient, or image background. |
| 6 |
* Version: 0.23 |
| 7 |
* Requires at least: 6.5 |
| 8 |
* Requires PHP: 7.2 |
| 9 |
* Author: Plugin Envision |
| 10 |
* Author URI: https://pluginenvision.com |
| 11 |
* License: GPLv3 or later |
| 12 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.html |
| 13 |
* Text Domain: swipe-slider |
| 14 |
* Domain Path: /languages |
| 15 |
*/ |
| 16 |
|
| 17 |
if( !defined( 'ABSPATH' ) ) { exit; } |
| 18 |
|
| 19 |
if( function_exists( 'evss_fs' ) ) { |
| 20 |
evss_fs()->set_basename( false, __FILE__ ); |
| 21 |
}else { |
| 22 |
define( 'EVSS_VERSION', isset( $_SERVER['HTTP_HOST'] ) && 'localhost' === $_SERVER['HTTP_HOST'] ? time() : '0.19' ); |
| 23 |
define( 'EVSS_DIR_URL', plugin_dir_url( __FILE__ ) ); |
| 24 |
define( 'EVSS_DIR_PATH', plugin_dir_path( __FILE__ ) ); |
| 25 |
define( 'EVSS_HAS_FS', file_exists( EVSS_DIR_PATH . 'vendor/freemius/start.php' ) ); |
| 26 |
|
| 27 |
if( EVSS_HAS_FS ) { |
| 28 |
require_once EVSS_DIR_PATH . 'includes/fs-config.php'; |
| 29 |
}else{ |
| 30 |
require_once EVSS_DIR_PATH . 'includes/fs-lite-config.php'; |
| 31 |
} |
| 32 |
|
| 33 |
function evssWusul() { |
| 34 |
if( EVSS_HAS_FS ) { |
| 35 |
return evss_fs()->can_use_premium_code(); |
| 36 |
}else { |
| 37 |
return false; |
| 38 |
} |
| 39 |
} |
| 40 |
|
| 41 |
include_once 'includes/Admin/Submenu.php'; |
| 42 |
require_once 'includes/DesignLibrary/DesignLibrary.php'; |
| 43 |
|
| 44 |
if( !class_exists( 'EVSSPlugin' ) ) { |
| 45 |
class EVSSPlugin { |
| 46 |
public function __construct() { |
| 47 |
add_action( 'init', [ $this, 'onInit' ] ); |
| 48 |
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), [$this, 'pluginActionLinks'] ); |
| 49 |
add_action( 'wp_ajax_evssWusulDekho', [$this, 'evssWusulDekho'] ); |
| 50 |
add_action( 'wp_ajax_nopriv_evssWusulDekho', [$this, 'evssWusulDekho'] ); |
| 51 |
} |
| 52 |
|
| 53 |
function onInit() { |
| 54 |
register_block_type( __DIR__ . '/build' ); |
| 55 |
} |
| 56 |
|
| 57 |
function pluginActionLinks ( $links ) { |
| 58 |
$acLinks = []; |
| 59 |
|
| 60 |
if( !evssWusul() ) { |
| 61 |
$acLinks[] = "<a href='https://pluginenvision.com/plugins/swipe-slider/#plans' target='_blank' style='font-size: 1.1em; font-weight: bold; color: #1d0bbd; text-shadow: 1px 1px 1px #eee;'>Get Pro</a>"; |
| 62 |
} |
| 63 |
|
| 64 |
return array_merge( $links, $acLinks ); |
| 65 |
} |
| 66 |
|
| 67 |
function evssWusulDekho() { |
| 68 |
$nonce = sanitize_text_field( wp_unslash( $_POST['_wpnonce'] ) ) ?? null; |
| 69 |
|
| 70 |
if( !wp_verify_nonce( $nonce, 'wp_rest' ) ) { |
| 71 |
wp_send_json_error( 'Invalid Request' ); |
| 72 |
} |
| 73 |
|
| 74 |
wp_send_json_success( [ 'wusul' => evssWusul() ] ); |
| 75 |
} |
| 76 |
} |
| 77 |
new EVSSPlugin(); |
| 78 |
} |
| 79 |
} |