-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresponsive-column-widgets.php
More file actions
176 lines (156 loc) · 5.37 KB
/
responsive-column-widgets.php
File metadata and controls
176 lines (156 loc) · 5.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<?php
/**
* Plugin Name: Responsive Column Widgets
* Plugin URI: http://en.michaeluno.jp/responsive-column-widgets
* Description: Creates a widget box which displays widgets in columns with a responsive design.
* Author: Michael Uno (miunosoft)
* Author URI: http://michaeluno.jp
* Requirements: This plugin requires WordPress >= 3.3 and PHP >= 5.2.4
* Text Domain: responsive-column-widgets
* Domain Path: /lang
* Version: 1.2.7
*/
/**
* The base registry information.
*
* @since 1.2.0
*/
class ResponsiveColumnWidgets_Registry_Base {
const VERSION = '1.2.7'; // <--- DON'T FORGET TO CHANGE THIS AS WELL!!
const NAME = 'Responsive Column Widgets';
const DESCRIPTION = 'Creates a widget box which displays widgets in columns with a responsive design..';
const URI = 'http://en.michaeluno.jp/';
const AUTHOR = 'miunosoft (Michael Uno)';
const AUTHOR_URI = 'http://en.michaeluno.jp/';
const COPYRIGHT = 'Copyright (c) 2015, Michael Uno';
const LICENSE = 'GPL v2 or later';
const CONTRIBUTORS = '';
}
/**
* Provides plugin information.
*
* The plugin will refer to these information.
*
* @since 1.2.0
* @remark
*/
final class ResponsiveColumnWidgets_Registry extends ResponsiveColumnWidgets_Registry_Base {
/**
* The plugin option key used for the options table.
*/
static public $aOptionKeys = array(
// 'main' => 'admin_page_framework_loader',
// 'demo' => 'admin_page_framework_demo',
);
/**
* The transient prefix.
*
* @remark This is also accessed from uninstall.php so do not remove.
* @remark Up to 8 characters as transient name allows 45 characters or less ( 40 for site transients ) so that md5 (32 characters) can be added
*/
const TRANSIENT_PREFIX = 'RCW_';
/**
* The text domain slug and its path.
*
* These will be accessed from the bootstrap script.
*/
const TEXT_DOMAIN = 'responsive-column-widgets';
const TEXT_DOMAIN_PATH = '/language';
// These properties will be defined in the setUp() method.
static public $sFilePath = '';
static public $sDirPath = '';
/**
* Requirements.
*/
static public $aRequirements = array(
'php' => array(
'version' => '5.2.4',
'error' => 'The plugin requires the PHP version %1$s or higher.',
),
'wordpress' => array(
'version' => '3.3',
'error' => 'The plugin requires the WordPress version %1$s or higher.',
),
'mysql' => array(
'version' => '5.0',
'error' => 'The plugin requires the MySQL version %1$s or higher.',
),
'functions' => '', // disabled
// array(
// e.g. 'mblang' => 'The plugin requires the mbstring extension.',
// ),
'classes' => '', // disabled
// array(
// e.g. 'DOMDocument' => 'The plugin requires the DOMXML extension.',
// ),
'constants' => '', // disabled
// array(
// e.g. 'THEADDONFILE' => 'The plugin requires the ... addon to be installed.',
// e.g. 'APSPATH' => 'The script cannot be loaded directly.',
// ),
'files' => '', // disabled
// array(
// e.g. 'home/my_user_name/my_dir/scripts/my_scripts.php' => 'The required script could not be found.',
// ),
);
/**
* Used admin pages.
*/
static public $aAdminPages = array(
// key => 'page slug'
// 'about' => 'apfl_about',
// 'tool' => 'apfl_tools',
// 'help' => 'apfl_contact',
);
/**
* Used post types.
*/
static public $aPostTypes = array(
);
/**
* Used taxonomies.
*/
static public $aTaxonomies = array(
);
/**
* Used shortcode slugs.
*/
static public $aShortcodes = array(
'main' => 'responsive_column_widgets',
);
/**
* Sets up static properties.
*/
static function setUp( $sPluginFilePath=null ) {
self::$sFilePath = $sPluginFilePath ? $sPluginFilePath : __FILE__;
self::$sDirPath = dirname( self::$sFilePath );
}
/**
* Returns the URL with the given relative path to the plugin path.
*
* Example: ResponsiveColumnWidgets_Registry::getPluginURL( 'asset/css/meta_box.css' );
* @since 112.0
*/
public static function getPluginURL( $sRelativePath='' ) {
return plugins_url( $sRelativePath, self::$sFilePath );
}
/**
* Returns the information of this class.
*
* @since 1.2.0
*/
static public function getInfo() {
$_oReflection = new ReflectionClass( __CLASS__ );
return $_oReflection->getConstants()
+ $_oReflection->getStaticProperties()
;
}
}
// Registry set-up.
ResponsiveColumnWidgets_Registry::setUp( __FILE__ );
// Bail if accessed directly. Not exit here as uninstall.php will access this file to get registry information.
if ( ! defined( 'ABSPATH' ) ) {
return;
}
include( dirname( __FILE__ ) . '/include/class/boot/ResponsiveColumnWidgets_Bootstrap.php' );
new ResponsiveColumnWidgets_Bootstrap( __FILE__ );