PluginProbe
Responsive Starter Templates – Elementor Templates & Starter Sites / 3.5.3
Responsive Starter Templates – Elementor Templates & Starter Sites v3.5.3
3.5.3 3.5.2 3.5.1 3.5.0 3.4.9 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.3.0 3.3.1 3.3.2 3.3.2.1 3.3.3 3.3.4 3.3.5 3.4.0 All 121 releases
responsive-add-ons / responsive-add-ons.php

responsive-add-ons.php in Responsive Starter Templates – Elementor Templates & Starter Sites 3.5.3, at responsive-add-ons.php

153 lines 4.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Responsive Starter Templates – Elementor Templates & Starter Sites
4 * Plugin URI: http://wordpress.org/plugins/responsive-add-ons/
5 * Description: Responsive Starter Templates – Elementor Templates & Starter Sites offers you a library of premium Elementor and block templates so you can launch your website quickly.
6 * Version: 3.5.3
7 * Author: Cyberchimps
8 * Author URI: https://cyberchimps.com/responsive-starter-templates/
9 * License: GPL2
10 * Text Domain: responsive-add-ons
11 * Domain Path: /languages
12 *
13 * @package Responsive_Add_Ons
14 */
15
16 /*
17 Copyright 2013 CyberChimps (email : support@cyberchimps.com)
18
19 This program is free software; you can redistribute it and/or modify
20 it under the terms of the GNU General Public License, version 2, as
21 published by the Free Software Foundation.
22
23 This program is distributed in the hope that it will be useful,
24 but WITHOUT ANY WARRANTY; without even the implied warranty of
25 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 GNU General Public License for more details.
27
28 You should have received a copy of the GNU General Public License
29 along with this program; if not, write to the Free Software
30 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31 */
32
33 if( !defined( 'ABSPATH' ))
34 {
35 exit;
36 }
37
38 // Set Constants.
39 if ( ! defined( 'RESPONSIVE_ADDONS_FILE' ) ) {
40 define( 'RESPONSIVE_ADDONS_FILE', __FILE__ );
41 }
42
43 if ( ! defined( 'RESPONSIVE_ADDONS_DIR' ) ) {
44 define( 'RESPONSIVE_ADDONS_DIR', plugin_dir_path( RESPONSIVE_ADDONS_FILE ) );
45 }
46
47 if ( ! defined( 'RESPONSIVE_ADDONS_DIR_URL' ) ) {
48 define( 'RESPONSIVE_ADDONS_DIR_URL', plugin_dir_url( RESPONSIVE_ADDONS_FILE ) );
49 }
50
51 if ( ! defined( 'RESPONSIVE_ADDONS_URI' ) ) {
52 define( 'RESPONSIVE_ADDONS_URI', plugins_url( '/', RESPONSIVE_ADDONS_FILE ) );
53 }
54
55 if ( ! defined( 'RESPONSIVE_ADDONS_VER' ) ) {
56 define( 'RESPONSIVE_ADDONS_VER', '3.5.3' );
57 }
58
59 if ( ! defined( 'CC_APP_URL' ) ) {
60 define( 'CC_APP_URL', 'https://app.cyberchimps.com' );
61 }
62
63 if ( ! defined( 'CCRS_URL' ) ) {
64 define( 'CCRS_URL', 'https://ccreadysites.cyberchimps.com' );
65 }
66
67 /**
68 * Load WC_AM_Client class if it exists.
69 */
70 if ( ! class_exists( 'WC_AM_Client_Addons' ) ) {
71 require_once plugin_dir_path( __FILE__ ) . 'class-wc-am-client-addons.php';
72 }
73
74 /*
75 * Instantiate WC_AM_Client class object if the WC_AM_Client class is loaded.
76 */
77 if ( class_exists( 'WC_AM_Client_Addons' ) ) {
78
79 $wcam_lib_responsive_addons = new WC_AM_Client_Addons( __FILE__, '', RESPONSIVE_ADDONS_VER, 'plugin', CC_APP_URL, 'Responsive Addons', 'responsive-add-ons' );
80 }
81
82 /**
83 * The core plugin class that is used to define internationalization,
84 * admin-specific hooks, and public-facing site hooks.
85 */
86 require plugin_dir_path( __FILE__ ) . 'includes/class-responsive-add-ons.php';
87
88 /**
89 * The code that runs during plugin activation.
90 */
91 function activate_responsive_addons() {
92
93 $settings = get_option( 'rpro_elementor_settings' );
94
95 if ( is_array( $settings ) ) {
96 $settings['hide_wl_settings'] = 'off';
97 }
98 update_option( 'rpro_elementor_settings', $settings );
99
100 require_once plugin_dir_path( __FILE__ ) . 'includes/class-responsive-add-ons-activator.php';
101 Responsive_Add_Ons_Activator::activate();
102
103 if ( class_exists( 'Responsive_Ready_Sites_Batch_Processing' ) ) {
104 Responsive_Ready_Sites_Batch_Processing::get_instance()->schedule_library_sync();
105 }
106 }
107
108 /**
109 * The code that runs during plugin deactivation.
110 */
111 function deactivate_responsive_addons() {
112 require_once plugin_dir_path( __FILE__ ) . 'includes/class-responsive-add-ons-deactivator.php';
113 Responsive_Add_Ons_Deactivator::deactivate();
114 }
115
116 register_activation_hook( __FILE__, 'activate_responsive_addons' );
117 register_deactivation_hook( __FILE__, 'deactivate_responsive_addons' );
118
119 /**
120 * Initialize Plugin
121 */
122 if ( class_exists( 'Responsive_Add_Ons' ) ) {
123
124 // Initialise Class.
125 $responsive = new Responsive_Add_Ons();
126 }
127
128 if ( ! function_exists( 'responsive_addon_load_sdk' ) ) {
129 /**
130 * Loads products array.
131 *
132 * @param array $products All products.
133 *
134 * @return array Products array.
135 */
136 function responsive_addon_load_sdk( $products ) {
137 $theme_name = wp_get_theme();
138 if ( 'Responsive' === $theme_name->get( 'Name' ) ) {
139 $products[] = get_template_directory() . '/style.css';
140 }
141 return $products;
142 }
143 }
144 add_filter( 'responsive_sdk_products', 'responsive_addon_load_sdk' );
145
146 function responsive_addons_enqueue_admin_assets( $hook ) {
147 if ( $hook === 'toplevel_page_responsive' ) {
148 wp_enqueue_media();
149 wp_enqueue_script( 'responsive-wl-media-upload', plugin_dir_url( __FILE__ ) . 'admin/js/wl-media-upload.js', [ 'jquery' ], '1.0', true );
150 }
151 }
152 add_action( 'admin_enqueue_scripts', 'responsive_addons_enqueue_admin_assets' );
153