PluginProbe ʕ •ᴥ•ʔ
Custom Sidebars – Dynamic Sidebar Classic Widget Area Manager / 3.1.6
Custom Sidebars – Dynamic Sidebar Classic Widget Area Manager v3.1.6
trunk 2.1.2.0 3.0.0.0 3.0.0.1 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.7.1 3.0.8 3.0.8.1 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.3 3.31 3.32 3.35 3.36 3.37 3.38
custom-sidebars / customsidebars.php
custom-sidebars Last commit date
assets 8 years ago inc 8 years ago languages 8 years ago views 8 years ago customsidebars.php 8 years ago license.txt 10 years ago readme.txt 8 years ago
customsidebars.php
118 lines
1 <?php
2 /**
3 * Plugin Name: Custom Sidebars
4 * Plugin URI: https://wordpress.org/plugins/custom-sidebars/
5 * Description: Allows you to create widgetized areas and custom sidebars. Replace whole sidebars or single widgets for specific posts and pages.
6 * Version: 3.1.6
7 * Author: WPMU DEV
8 * Author URI: http://premium.wpmudev.org/
9 * Textdomain: custom-sidebars
10 * WDP ID: 910520
11 */
12
13 /*
14 Copyright Incsub (http://incsub.com)
15
16 This program is free software; you can redistribute it and/or modify
17 it under the terms of the GNU General Public License (Version 2 - GPLv2) as published by
18 the Free Software Foundation.
19
20 This program is distributed in the hope that it will be useful,
21 but WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 GNU General Public License for more details.
24
25 You should have received a copy of the GNU General Public License
26 along with this program; if not, write to the Free Software
27 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 */
29
30 /*
31 This plugin was originally developed by Javier Marquez.
32 http://arqex.com/
33 */
34
35 function inc_sidebars_init() {
36 if ( class_exists( 'CustomSidebars' ) ) {
37 return false;
38 }
39
40 /**
41 * Do not load plugin when saving file in WP Editor
42 */
43 if ( isset( $_REQUEST['action'] ) && 'edit-theme-plugin-file' == $_REQUEST['action'] ) {
44 return false;
45 }
46
47 $plugin_dir = dirname( __FILE__ );
48 $plugin_dir_rel = dirname( plugin_basename( __FILE__ ) );
49 $plugin_url = plugin_dir_url( __FILE__ );
50
51 define( 'CSB_PLUGIN', __FILE__ );
52 define( 'CSB_IS_PRO', false );
53 define( 'CSB_VIEWS_DIR', $plugin_dir . '/views/' );
54 define( 'CSB_INC_DIR', $plugin_dir . '/inc/' );
55 define( 'CSB_JS_URL', $plugin_url . 'assets/js/' );
56 define( 'CSB_CSS_URL', $plugin_url . 'assets/css/' );
57 define( 'CSB_IMG_URL', $plugin_url . 'assets/img/' );
58
59 // Include function library.
60 $modules[] = CSB_INC_DIR . 'external/wpmu-lib/core.php';
61 $modules[] = CSB_INC_DIR . 'class-custom-sidebars.php';
62
63 $modules[] = CSB_INC_DIR . 'external/wdev-frash/module.php';
64
65
66
67 // Free-version configuration - no drip campaign yet...
68 $cta_label = false;
69 $drip_param = false;
70
71
72
73
74 foreach ( $modules as $path ) {
75 if ( file_exists( $path ) ) { require_once $path; }
76 }
77
78 // Register the current plugin, for pro and free plugins!
79 do_action(
80 'wdev-register-plugin',
81 /* Plugin ID */ plugin_basename( __FILE__ ),
82 /* Plugin Title */ 'CustomSidebars',
83 /* https://wordpress.org */ '/plugins/custom-sidebars/',
84 /* Email Button CTA */ $cta_label,
85 /* getdrip Plugin param */ $drip_param
86 );
87
88 // Initialize the plugin
89 CustomSidebars::instance();
90 }
91
92 inc_sidebars_init();
93
94
95 if ( ! class_exists( 'CustomSidebarsEmptyPlugin' ) ) {
96 class CustomSidebarsEmptyPlugin extends WP_Widget {
97 public function __construct() {
98 parent::__construct( false, $name = 'CustomSidebarsEmptyPlugin' );
99 }
100 public function form( $instance ) {
101 //Nothing, just a dummy plugin to display nothing
102 }
103 public function update( $new_instance, $old_instance ) {
104 //Nothing, just a dummy plugin to display nothing
105 }
106 public function widget( $args, $instance ) {
107 echo '';
108 }
109 } //end class
110 } //end if class exists
111
112
113 // Translation.
114 function inc_sidebars_init_translation() {
115 load_plugin_textdomain( 'custom-sidebars', false, basename( dirname( __FILE__ ) ) . '/languages');
116 }
117 add_action( 'plugins_loaded', 'inc_sidebars_init_translation' );
118