PluginProbe
Catch Gallery / 1.6.3
Catch Gallery v1.6.3
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 1.6.3, at catch-gallery.php

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