PluginProbe
Catch Gallery / 2.4
Catch Gallery v2.4
trunk 1.0 1.0.1 1.1 1.2 1.3 1.4 1.5 1.6 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 All 27 releases
catch-gallery / catch-gallery.php

catch-gallery.php in Catch Gallery 2.4, at catch-gallery.php

110 lines 3.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // Exit if accessed directly
4 if (! defined('ABSPATH')) exit;
5
6 /**
7 * @link catchplugins.com
8 * @since 1.0
9 * @package Catch_Gallery
10 *
11 * @wordpress-plugin
12 * Plugin Name: Catch Gallery
13 * Plugin URI: https://catchplugins.com/plugins/catch-gallery/
14 * Description: Catch Gallery allows you to add three different types of layouts (in addition to the default layout provided by WordPress – Thumbnail Grid) for your galleries to stand out—Tiled Mosaic, Square Tiles, Circles.
15 * Version: 2.4
16 * Author: Catch Plugins
17 * Author URI: https://catchplugins.com
18 * License: GPL-2.0+
19 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
20 * Text Domain: catch-gallery
21 * Tags: gallery, tiled gallery, image gallery, mosaic, carousel, lightbox, media, jetpack, jetpack lite
22 * Domain Path: /languages
23 */
24
25 /*
26 Copyright (C) 2018 Catch Plugins, (info@catchplugins.com)
27
28 This program is free software; you can redistribute it and/or modify
29 it under the terms of the GNU General Public License as published by
30 the Free Software Foundation; either version 3 of the License, or
31 (at your option) any later version.
32
33 This program is distributed in the hope that it will be useful,
34 but WITHOUT ANY WARRANTY; without even the implied warranty of
35 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36 GNU General Public License for more details.
37
38 You should have received a copy of the GNU General Public License
39 along with this program. If not, see <http://www.gnu.org/licenses/>.
40 */
41
42 if (! defined('CATCH_GALLERY_VERSION')) {
43 define('CATCH_GALLERY_VERSION', '2.4');
44 }
45
46 // The URL of the directory that contains the plugin
47 if (! defined('CATCH_GALLERY_URL')) {
48 define('CATCH_GALLERY_URL', plugin_dir_url(__FILE__));
49 }
50
51
52 // The absolute path of the directory that contains the file
53 if (! defined('CATCH_GALLERY_PATH')) {
54 define('CATCH_GALLERY_PATH', plugin_dir_path(__FILE__));
55 }
56
57
58 // Gets the path to a plugin file or directory, relative to the plugins directory, without the leading and trailing slashes.
59 if (! defined('CATCH_GALLERY_BASENAME')) {
60 define('CATCH_GALLERY_BASENAME', plugin_basename(__FILE__));
61 }
62
63 if (! function_exists('activate_catch_gallery')) :
64 function activate_catch_gallery()
65 {
66 /* Check if Catch Gallery Pro is installed and active, abort plugin activation and return with message */
67 $required = 'catch-gallery-pro/catch-gallery.php';
68 if (is_plugin_active($required)) {
69 $message =
70 // Translators: Information about pro version is already active while trying to activate free version %2$s is a Pro URL to go to plugin page.
71 esc_html__(
72 'Sorry, Pro plugin is already active. No need to activate Free version. %1$s&laquo; Return to Plugins%2$s.',
73 'catch-gallery'
74 );
75 $message = sprintf($message, '<br><a href="' . esc_url(admin_url('plugins.php')) . '">', '</a>');
76 wp_die(wp_kses_post($message));
77 }
78 }
79 endif;
80 register_activation_hook(__FILE__, 'activate_catch_gallery');
81
82 if (! function_exists('catch_gallery_load_textdomain')) :
83 function catch_gallery_load_textdomain()
84 {
85 load_plugin_textdomain('catch-gallery', false, plugin_basename(dirname(__FILE__)) . '/languages');
86 }
87 endif;
88 add_action('plugins_loaded', 'catch_gallery_load_textdomain');
89
90
91 // Include admin part.
92 include(plugin_dir_path(__FILE__) . 'admin/admin.php');
93
94 include(plugin_dir_path(__FILE__) . 'inc/functions.php');
95
96 include(plugin_dir_path(__FILE__) . 'inc/tiled-gallery.php');
97
98 include(plugin_dir_path(__FILE__) . 'inc/jetpack-carousel.php');
99
100 /* CTP tabs removal options */
101 require plugin_dir_path(__FILE__) . '/inc/ctp-tabs-removal.php';
102
103 $ctp_options = ctp_get_options();
104 if (1 == $ctp_options['theme_plugin_tabs']) {
105 /* Adds Catch Themes tab in Add theme page and Themes by Catch Themes in Customizer's change theme option. */
106 if (! class_exists('CatchThemesThemePlugin') && ! function_exists('add_our_plugins_tab')) {
107 require plugin_dir_path(__FILE__) . '/inc/CatchThemesThemePlugin.php';
108 }
109 }
110