PluginProbe
MetaSlider Gallery – Image Gallery, Lightbox Galleries, Modal Windows / trunk
MetaSlider Gallery – Image Gallery, Lightbox Galleries, Modal Windows vtrunk
2.37.0 2.36.0 2.35.0 2.34.0 2.33.0 2.32.3 2.32.2 2.32.1 2.31.0 2.32.0 2.30.0 1.9.2 1.9.3 2.0.0 2.10.0 2.11.0 2.11.1 2.12.0 2.20.0 2.21.0 2.22.0 2.23.0 trunk 1.0 1.1 All 51 releases
ml-slider-lightbox / ml-slider-lightbox.php

ml-slider-lightbox.php in MetaSlider Gallery – Image Gallery, Lightbox Galleries, Modal Windows trunk, at ml-slider-lightbox.php

48 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /*
4 * Plugin Name: MetaSlider Gallery
5 * Plugin URI: https://www.metaslider.com
6 * Description: MetaSlider Gallery is the image gallery plugin for WordPress. Create a beautiful display for your photos with carousel, masonry, grid, and more views.
7 * Version: 2.37.0
8 * Requires PHP: 7.0
9 * Author: MetaSlider
10 * Author URI: https://www.metaslider.com
11 * License: GPL-2.0+
12 * Copyright: 2020+ MetaSlider
13 *
14 * Text Domain: ml-slider-lightbox
15 * Domain Path: /languages
16 */
17 if (! defined('ABSPATH')) {
18 die('No direct access.');
19 }
20
21 if (! defined('ML_SLIDER_LIGHTBOX_PATH')) {
22 define('ML_SLIDER_LIGHTBOX_PATH', plugin_dir_path(__FILE__));
23 }
24 if (! defined('ML_SLIDER_LIGHTBOX_URL')) {
25 define('ML_SLIDER_LIGHTBOX_URL', plugin_dir_url(__FILE__));
26 }
27
28 if (! class_exists('MetaSlider\Lightbox\MetaSliderLightboxPlugin')) {
29 require_once plugin_dir_path(__FILE__) . 'class-ml-trigger-control.php';
30 require_once plugin_dir_path(__FILE__) . 'class-ml-gallery-image-size.php';
31 require_once plugin_dir_path(__FILE__) . 'class-ml-slider-lightbox.php';
32 add_action('plugins_loaded', array(MetaSlider\Lightbox\MetaSliderLightboxPlugin::getInstance(), 'setup'), 10);
33
34 register_activation_hook(__FILE__, 'metaslider_lightbox_activation');
35 }
36
37 /**
38 * Plugin activation hook
39 * Sets transients to redirect to the gallery list page and show the
40 * one-time welcome banner there. The welcome transient is consumed on
41 * first render, so the banner appears exactly once.
42 */
43 function metaslider_lightbox_activation()
44 {
45 set_transient('metaslider_lightbox_activation_redirect', true, 30);
46 set_transient('metaslider_lightbox_welcome', true, MINUTE_IN_SECONDS);
47 }
48