PluginProbe
CSS & JavaScript Toolbox / 8.0.3
CSS & JavaScript Toolbox v8.0.3
trunk 0.3 0.8 10 10.1 11 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 11.9.1 12 12.0 12.0.1 12.0.3 12.0.4 12.0.5 12.0.6 12.0.7 6.0 6.0.11 All 60 releases
← All changes | css-js-toolbox.class.php +13 -6 6.08.0.3 View file →
@@ -46,9 +46,9 @@
46 46 * @author Original Developer
47 47 * @version 0.3
48 48 */
49 49 class cssJSToolbox extends CJTHookableClass {
50 -
50 +
51 51 /**
52 52 *
53 53 */
54 54 const CJT_WEB_SITE_DOMAIN = 'css-javascript-toolbox.com';
@@ -136,9 +136,9 @@
136 136 /**
137 137 * put your comment there...
138 138 *
139 139 */
140 - public function getCJTWebSiteURL($path = null) {
140 + public static function getCJTWebSiteURL($path = null) {
141 141 $domain = self::CJT_WEB_SITE_DOMAIN;
142 142 return "http://{$domain}/{$path}";
143 143 }
144 144
@@ -145,9 +145,9 @@
145 145 /**
146 146 * put your comment there...
147 147 *
148 148 */
149 - public function getDBDriver() {
149 + public function & getDBDriver() {
150 150 return $this->dbDriver;
151 151 }
152 152
153 153 /**
@@ -154,9 +154,9 @@
154 154 * Get CJT Plugin object.
155 155 *
156 156 * @return cssJSToolbox
157 157 */
158 - public static function getInstance() {
158 + public static function & getInstance() {
159 159 if (!self::$instance) {
160 160 self::$instance = self::trigger('cssJSToolbox.instantiate', (new cssJSToolbox()));
161 161 }
162 162 return self::$instance;
@@ -165,9 +165,9 @@
165 165 /**
166 166 * put your comment there...
167 167 *
168 168 */
169 - public function getSecurityToken() {
169 + public static function getSecurityToken() {
170 170 return wp_create_nonce(CJTController::NONCE_ACTION);
171 171 }
172 172
173 173 /**
@@ -174,9 +174,9 @@
174 174 * put your comment there...
175 175 *
176 176 * @param mixed $text
177 177 */
178 - public function getText($text) {
178 + public static function getText($text) {
179 179 // Make sure to don't use $this while calling!
180 180 // $this might be an object other than CssJSToolbox!
181 181 return self::__callStatic('cssJSToolbox.ongettext', array(__($text, CJTOOLBOX_TEXT_DOMAIN)));
182 182 }
@@ -230,8 +230,15 @@
230 230 * @param mixed $vPath
231 231 * @param mixed $base
232 232 */
233 233 public static function resolvePath($vPath, $base = CJTOOLBOX_PATH) {
234 + // Resolve CJT extensions path
235 + if (strpos($vPath, 'extension://') === 0) {
236 + // Remove extension wrapper
237 + $vPath = str_replace('extension://', '', $vPath);
238 + // Point to plugin directory
239 + $base = WP_PLUGIN_DIR;
240 + }
234 241 // Replace all :'s with /'s.
235 242 $path = str_replace(':', '/', $vPath);
236 243 $path = "{$base}/{$path}";
237 244 return self::trigger('cssJSToolbox.resolvepath', $path, $vPath);