-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathultra-slideshow.php
103 lines (86 loc) · 2.53 KB
/
ultra-slideshow.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php
/**
* Main Plugin File
*
* @package UltraSlideShow
*/
/**
* Plugin Name: Ultra Slideshow
* Plugin URI: https://ultradevs.com/plugins/ultra-slideshow
* Description: Ultra Slideshow is a modern sortable slide show plugin for WordPress.
* Version: 1.0.0
* Requires at least: 5.2
* Requires PHP: 7.2
* Author: ultraDevs
* Author URI: https://ultradevs.com
* License: GPL v2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: ultra-slideshow
* Domain Path: /languages
*/
// If this file is called directly, abort!
defined( 'ABSPATH' ) || die( 'bYe bYe!' );
// Constant.
define( 'ULTRA_SLIDESHOW_VERSION', '1.0.0' );
define( 'ULTRA_SLIDESHOW_DIR_PATH', plugin_dir_path( __FILE__ ) );
define( 'ULTRA_SLIDESHOW_DIR_URL', plugin_dir_url( __FILE__ ) );
define( 'ULTRA_SLIDESHOW_ASSETS', ULTRA_SLIDESHOW_DIR_URL . 'assets/' );
/**
* The code that runs during plugin activation.
*/
if ( ! function_exists( 'ultra_slideshow_activate' ) ) {
function ultra_slideshow_activate() {
flush_rewrite_rules();
}
}
register_activation_hook( __FILE__, 'ultra_slideshow_activate' );
/**
* The code that runs during plugin deactivation.
*/
if ( ! function_exists( 'ultra_slideshow_deactivate' ) ) {
function ultra_slideshow_deactivate() {
}
}
register_deactivation_hook( __FILE__, 'ultra_slideshow_deactivate' );
/**
* The code that helps translating
*/
if ( ! function_exists( 'ultra_slideshow_load_text_domain' ) ) {
/**
* Loads a plugin’s translated strings.
*
* @return void
*/
function ultra_slideshow_load_text_domain() {
load_plugin_textdomain( 'ultra-slideshow', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
}
}
add_action( 'init', 'ultra_slideshow_load_text_domain' );
/**
* Core plugin class
*/
require ULTRA_SLIDESHOW_DIR_PATH . 'includes/Init.php';
/**
* Initialize the plugin tracker
*
* @return void
*/
function appsero_init_tracker_ultra_slideshow() {
if ( ! class_exists( 'Appsero\Client' ) ) {
require ULTRA_SLIDESHOW_DIR_PATH . 'includes/appsero/src/Client.php';
}
$client = new Appsero\Client( 'c4481911-35b5-4fa9-89f4-411d2fe88e88', 'Ultra Slideshow', __FILE__ );
// Active insights.
$client->insights()->init();
}
appsero_init_tracker_ultra_slideshow();
/**
* Begin execution of the plugin
*/
if ( ! function_exists( 'ultra_slideshow_run' ) ) {
function ultra_slideshow_run() {
$plugin = new UltraSlideshow\Init();
$plugin->run();
}
}
ultra_slideshow_run();