Changeset 2070996
- Timestamp:
- 04/18/2019 10:56:47 PM (7 years ago)
- Location:
- rabbitbuilder-global-central-js-css/trunk
- Files:
-
- 3 edited
-
inc/plugin.php (modified) (4 diffs)
-
rabbitbuilder-js-css.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
rabbitbuilder-global-central-js-css/trunk/inc/plugin.php
r2058181 r2070996 250 250 if ( !file_exists( RBJSCSS_PLUGIN_UPLOAD_DIR . '/' . $file_name ) ) { 251 251 252 global $wpdb; 253 $table = $wpdb->prefix . RBJSCSS_PLUGIN_NAME; 254 255 $query = 'SELECT `data` FROM ' . $table . ' WHERE id = '.$itemId; 256 $file_data = $wpdb->get_var( $query); 257 258 //now we need to see if elementor plugin is installed and if yes we need to replace the text 259 require_once( plugin_dir_path( dirname(__FILE__) ) . 'inc/elementor_functions.php' ); 260 $file_data = rabbitbuilder_js_css_replace_ele_key_text( $file_data ); 261 262 if( $options->preprocessor == 'scss' ){ 263 264 require_once( plugin_dir_path( dirname(__FILE__) ) . 'inc/lib/scssphp/scss.inc.php' ); 265 $scss = new Leafo\ScssPhp\Compiler; 266 267 try { 268 $scss->setFormatter('Leafo\ScssPhp\Formatter\Expanded'); 269 $file_data = $scss->compile($file_data); 270 } catch (exception $ex) { 271 $error = true; 272 $data['msg'] = __('Can\'t compile SCSS data.<br>Message: ', RBJSCSS_PLUGIN_NAME); 273 $data['msg'] = $data['msg'] . $ex->getMessage(); 274 } 275 276 } 252 global $wpdb; 253 $table = $wpdb->prefix . RBJSCSS_PLUGIN_NAME; 254 255 $query = 'SELECT `data` FROM ' . $table . ' WHERE id = '.$itemId; 256 $file_data = $wpdb->get_var( $query); 257 258 //now we need to see if elementor plugin is installed and if yes we need to replace the text 259 require_once( plugin_dir_path( dirname(__FILE__) ) . 'inc/elementor_functions.php' ); 260 $file_data = rabbitbuilder_js_css_replace_ele_key_text( $file_data ); 261 262 if( $options->preprocessor == 'scss' ){ //if this is scss starts 263 264 require_once( plugin_dir_path( dirname(__FILE__) ) . 'inc/lib/scssphp/scss.inc.php' ); 265 $scss = new Leafo\ScssPhp\Compiler; 266 267 try { 268 $scss->setFormatter('Leafo\ScssPhp\Formatter\Expanded'); 269 $file_data = $scss->compile($file_data); 270 } catch (exception $ex) { 271 $error = true; 272 $data['msg'] = __('Can\'t compile SCSS data.<br>Message: ', RBJSCSS_PLUGIN_NAME); 273 $data['msg'] = $data['msg'] . $ex->getMessage(); 274 } 275 276 } //if this is scss ends 277 277 278 //now save the file 278 279 wp_mkdir_p( RBJSCSS_PLUGIN_UPLOAD_DIR ); //create the dir … … 313 314 if($options->file == 'internal') { 314 315 echo $before; 315 include_once(RBJSCSS_PLUGIN_UPLOAD_DIR . '/' . $file_name);316 readfile(RBJSCSS_PLUGIN_UPLOAD_DIR . '/' . $file_name); 316 317 echo $after; 317 318 } else if($options->file == 'external') { … … 333 334 if($options->file == 'internal') { 334 335 echo $before; 335 include_once(RBJSCSS_PLUGIN_UPLOAD_DIR . '/' . $file_name);336 readfile(RBJSCSS_PLUGIN_UPLOAD_DIR . '/' . $file_name); 336 337 echo $after; 337 338 } else if($options->file == 'external') { … … 353 354 if($options->file == 'internal') { 354 355 echo $before; 355 include_once(RBJSCSS_PLUGIN_UPLOAD_DIR . '/' . $file_name);356 readfile(RBJSCSS_PLUGIN_UPLOAD_DIR . '/' . $file_name); 356 357 echo $after; 357 358 } -
rabbitbuilder-global-central-js-css/trunk/rabbitbuilder-js-css.php
r2070992 r2070996 4 4 * Plugin URI: https://www.rabbitbuilder.com/plugins/rabbitbuilder-js-css 5 5 * Description: Better CSS editing in a central location with scss preprocessing, Supports Elementor Global Styles, Centralised area for CSS editing in Elementor, to keep things tidy and easy to implement, as well as maintain. The current way of doing things, ends up being very messy very quickly, with css code attached to elements here there and everywhere, with no indication for where custom styles are. This Plugin allows you to add your own custom css styles and javascript code with a powerful editor. 6 * Version: 1.0. 36 * Version: 1.0.4 7 7 * Author: RabbitBuilder 8 8 * Author URI: https://www.rabbitbuilder.com/ -
rabbitbuilder-global-central-js-css/trunk/readme.txt
r2070992 r2070996 66 66 == Changelog == 67 67 68 = 1.0.4 = 69 * Fixed include file as readfie. 70 68 71 = 1.0.3 = 69 72 * Better Javascript alert upon santax error.
Note: See TracChangeset
for help on using the changeset viewer.