PluginProbe ʕ •ᴥ•ʔ
Modula Image Gallery – Photo Grid & Video Gallery / 2.14.13
Modula Image Gallery – Photo Grid & Video Gallery v2.14.13
2.14.30 2.14.29 2.14.28 2.14.27 2.14.26 2.14.25 trunk 2.12.0 2.12.1 2.12.10 2.12.11 2.12.12 2.12.13 2.12.14 2.12.15 2.12.16 2.12.17 2.12.18 2.12.19 2.12.2 2.12.20 2.12.21 2.12.22 2.12.23 2.12.24 2.12.25 2.12.26 2.12.27 2.12.28 2.12.29 2.12.3 2.12.30 2.12.4 2.12.5 2.12.6 2.12.7 2.12.8 2.12.9 2.13.0 2.13.1 2.13.2 2.13.3 2.13.4 2.13.5 2.13.6 2.13.7 2.13.8 2.13.9 2.14.0 2.14.1 2.14.10 2.14.11 2.14.12 2.14.13 2.14.14 2.14.15 2.14.16 2.14.17 2.14.18 2.14.19 2.14.2 2.14.20 2.14.21 2.14.22 2.14.23 2.14.24 2.14.3 2.14.4 2.14.5 2.14.6 2.14.7 2.14.8 2.14.9
modula-best-grid-gallery / Modula.php
modula-best-grid-gallery Last commit date
assets 4 months ago includes 4 months ago languages 1 year ago .prettierrc.js 4 months ago Modula.php 4 months ago changelog.txt 4 months ago license.txt 1 year ago readme.md 1 year ago readme.txt 4 months ago
Modula.php
122 lines
1 <?php
2 /**
3 * Plugin Name: Modula
4 * Plugin URI: https://wp-modula.com/
5 * Description: Modula is the most powerful, user-friendly WordPress gallery plugin. Add galleries, masonry grids and more in a few clicks.
6 * Author: WPChill
7 * Version: 2.14.13
8 * Author URI: https://www.wpchill.com/
9 * License: GPLv3 or later
10 * License URI: http://www.gnu.org/licenses/gpl-3.0.html
11 * Requires PHP: 5.6
12 * Text Domain: modula-best-grid-gallery
13 * Domain Path: /languages
14 *
15 * Copyright 2015-2017 GreenTreeLabs diego@greentreelabs.net
16 * Copyright 2017-2020 MachoThemes hello@wp-modula.com
17 * Copyright 2020 WPchill hello@wp-modula.com
18 *
19 * Original Plugin URI: https://modula.greentreelabs.net/
20 * Original Author URI: https://greentreelabs.net
21 * Original Author: https://profiles.wordpress.org/greentreelabs/
22 *
23 * NOTE:
24 * GreenTreeLabs transferred ownership rights on: 03/29/2017 06:34:07 PM when ownership was handed over to MachoThemes
25 * The MachoThemes ownership period started on: 03/29/2017 06:34:08 PM
26 * SVN commit proof of ownership transferral: https://plugins.trac.wordpress.org/changeset/1607943/modula-best-grid-gallery
27 *
28 * MachoThemes has transferred ownership to WPChill on: 5th of November, 2020. WPChill is a rebrand & restructure of MachoThemes.
29 *
30 * This program is free software; you can redistribute it and/or modify
31 * it under the terms of the GNU General Public License, version 3, as
32 * published by the Free Software Foundation.
33 *
34 * This program is distributed in the hope that it will be useful,
35 * but WITHOUT ANY WARRANTY; without even the implied warranty of
36 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37 * GNU General Public License for more details.
38 *
39 * You should have received a copy of the GNU General Public License
40 * along with this program; if not, write to the Free software
41 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
42 */
43
44 /**
45 * Define Constants
46 *
47 * @since 2.0.2
48 */
49
50 define( 'MODULA_LITE_VERSION', '2.14.13' );
51 define( 'MODULA_PATH', plugin_dir_path( __FILE__ ) );
52 define( 'MODULA_URL', plugin_dir_url( __FILE__ ) );
53 defined( 'MODULA_PRO_STORE_URL' ) || define( 'MODULA_PRO_STORE_URL', 'https://wp-modula.com' );
54 defined( 'MODULA_PRO_STORE_UPGRADE_URL' ) || define( 'MODULA_PRO_STORE_UPGRADE_URL', 'https://wp-modula.com/pricing' );
55 define( 'MODULA_FILE', plugin_basename( __FILE__ ) );
56
57 define( 'MODULA_LITE_TRANSLATE', dirname( plugin_basename( __FILE__ ) ) . '/languages' );
58
59 define( 'MODULA_CPT_NAME', 'modula-gallery' );
60 define( 'MODULA_AI_ENDPOINT', 'https://api.imageseo.com' );
61
62 /**
63 * The code that runs during plugin activation.
64 * This action is documented in includes/class-modula-activator.php
65 */
66 function modula_activate() {}
67
68 register_activation_hook( __FILE__, 'modula_activate' );
69
70 /**
71 * The core plugin class that is used to define internationalization,
72 * admin-specific hooks, and public-facing site hooks.
73 */
74 require plugin_dir_path( __FILE__ ) . 'includes/class-modula.php';
75
76 // Action Scheduler
77 require_once plugin_dir_path( __FILE__ ) . 'includes/libraries/action-scheduler/action-scheduler.php';
78 /**
79 * Ensures Modula Pro (modula/Modula.php) loads right after Lite so extensions
80 * that depend on Modula_Pro do not run before the class exists.
81 * Runs on every request when Lite loads first; updates DB for the next request.
82 *
83 * @since 2.14.0
84 */
85 function modula_ensure_pro_loads_after_lite() {
86 $lite = 'modula-best-grid-gallery/Modula.php';
87 $pro = 'modula/Modula.php';
88 $list = (array) get_option( 'active_plugins', array() );
89
90 $key_lite = array_search( $lite, $list, true );
91 $key_pro = array_search( $pro, $list, true );
92
93 if ( false === $key_pro ) {
94 return;
95 }
96
97 $want_pro_index = ( false !== $key_lite ) ? 1 : 0;
98 if ( $key_pro === $want_pro_index ) {
99 return;
100 }
101 unset( $list[ $key_pro ] );
102 $list = array_values( $list );
103 array_splice( $list, $want_pro_index, 0, array( $pro ) );
104
105 update_option( 'active_plugins', $list );
106 }
107 /**
108 * Begins execution of the plugin.
109 *
110 * Since everything within the plugin is registered via hooks,
111 * then kicking off the plugin from this point in the file does
112 * not affect the page life cycle.
113 *
114 * @since 2.0.0
115 */
116 function modula_run() {
117 modula_ensure_pro_loads_after_lite();
118 new Modula();
119 }
120
121 modula_run();
122