PluginProbe ʕ •ᴥ•ʔ
Custom Sidebars – Dynamic Sidebar Classic Widget Area Manager / 3.0.1
Custom Sidebars – Dynamic Sidebar Classic Widget Area Manager v3.0.1
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
css 9 years ago img 9 years ago inc 9 years ago js 9 years ago lang 9 years ago views 9 years ago customsidebars.php 9 years ago license.txt 10 years ago readme.txt 9 years ago
customsidebars.php
117 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.0.1.0
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 Author - Javier Marquez (http://arqex.com/)
16 Contributor - Philipp Stracker (Incsub)
17 This program is free software; you can redistribute it and/or modify
18 it under the terms of the GNU General Public License (Version 2 - GPLv2) as published by
19 the Free Software Foundation.
20
21 This program is distributed in the hope that it will be useful,
22 but WITHOUT ANY WARRANTY; without even the implied warranty of
23 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 GNU General Public License for more details.
25
26 You should have received a copy of the GNU General Public License
27 along with this program; if not, write to the Free Software
28 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 */
30
31 /*
32 This plugin was originally developed by Javier Marquez.
33 http://arqex.com/
34 */
35
36 function inc_sidebars_init() {
37 if ( class_exists( 'CustomSidebars' ) ) {
38 return false;
39 }
40
41 $plugin_dir = dirname( __FILE__ );
42 $plugin_dir_rel = dirname( plugin_basename( __FILE__ ) );
43 $plugin_url = plugin_dir_url( __FILE__ );
44
45 define( 'CSB_PLUGIN', __FILE__ );
46 define( 'CSB_IS_PRO', false );
47 define( 'CSB_LANG_DIR', $plugin_dir_rel . '/lang/' );
48 define( 'CSB_VIEWS_DIR', $plugin_dir . '/views/' );
49 define( 'CSB_INC_DIR', $plugin_dir . '/inc/' );
50 define( 'CSB_JS_URL', $plugin_url . 'js/' );
51 define( 'CSB_CSS_URL', $plugin_url . 'css/' );
52 define( 'CSB_IMG_URL', $plugin_url . 'img/' );
53
54 // Include function library.
55 $modules[] = CSB_INC_DIR . 'external/wpmu-lib/core.php';
56 $modules[] = CSB_INC_DIR . 'external/wdev-frash/module.php';
57 $modules[] = CSB_INC_DIR . 'class-custom-sidebars.php';
58
59
60 // Free-version configuration - no drip campaign yet...
61 $cta_label = false;
62 $drip_param = false;
63
64
65
66
67 foreach ( $modules as $path ) {
68 if ( file_exists( $path ) ) { require_once $path; }
69 }
70
71 // Register the current plugin, for pro and free plugins!
72 do_action(
73 'wdev-register-plugin',
74 /* Plugin ID */ plugin_basename( __FILE__ ),
75 /* Plugin Title */ 'CustomSidebars',
76 /* https://wordpress.org */ '/plugins/custom-sidebars/',
77 /* Email Button CTA */ $cta_label,
78 /* getdrip Plugin param */ $drip_param
79 );
80
81 // Initialize the plugin
82 CustomSidebars::instance();
83 }
84
85 inc_sidebars_init();
86
87
88 if ( ! class_exists( 'CustomSidebarsEmptyPlugin' ) ) {
89 class CustomSidebarsEmptyPlugin extends WP_Widget {
90 public function __construct() {
91 parent::__construct( false, $name = 'CustomSidebarsEmptyPlugin' );
92 }
93 public function form( $instance ) {
94 //Nothing, just a dummy plugin to display nothing
95 }
96 public function update( $new_instance, $old_instance ) {
97 //Nothing, just a dummy plugin to display nothing
98 }
99 public function widget( $args, $instance ) {
100 echo '';
101 }
102 } //end class
103 } //end if class exists
104
105
106 // Translation.
107 function inc_sidebars_init_translation() {
108 if ( defined( 'CSB_LANG_DIR' ) ) {
109 load_plugin_textdomain(
110 'custom-sidebars',
111 false,
112 CSB_LANG_DIR
113 );
114 }
115 }
116 add_action( 'plugins_loaded', 'inc_sidebars_init_translation' );
117