Plugin Directory

Changeset 2070996


Ignore:
Timestamp:
04/18/2019 10:56:47 PM (7 years ago)
Author:
rabbitbuilder
Message:

updated 1.0.4

Location:
rabbitbuilder-global-central-js-css/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • rabbitbuilder-global-central-js-css/trunk/inc/plugin.php

    r2058181 r2070996  
    250250    if ( !file_exists( RBJSCSS_PLUGIN_UPLOAD_DIR . '/' . $file_name ) ) {
    251251
    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     
    277278      //now save the file
    278279      wp_mkdir_p( RBJSCSS_PLUGIN_UPLOAD_DIR ); //create the dir
     
    313314            if($options->file == 'internal') {
    314315                echo $before;
    315                 include_once(RBJSCSS_PLUGIN_UPLOAD_DIR . '/' . $file_name);
     316                readfile(RBJSCSS_PLUGIN_UPLOAD_DIR . '/' . $file_name);
    316317                echo $after;
    317318            } else if($options->file == 'external') {
     
    333334            if($options->file == 'internal') {
    334335                echo $before;
    335                 include_once(RBJSCSS_PLUGIN_UPLOAD_DIR . '/' . $file_name);
     336                readfile(RBJSCSS_PLUGIN_UPLOAD_DIR . '/' . $file_name);
    336337                echo $after;
    337338            } else if($options->file == 'external') {
     
    353354            if($options->file == 'internal') {
    354355                echo $before;
    355                 include_once(RBJSCSS_PLUGIN_UPLOAD_DIR . '/' . $file_name);
     356                readfile(RBJSCSS_PLUGIN_UPLOAD_DIR . '/' . $file_name);
    356357                echo $after;
    357358            }
  • rabbitbuilder-global-central-js-css/trunk/rabbitbuilder-js-css.php

    r2070992 r2070996  
    44 * Plugin URI:        https://www.rabbitbuilder.com/plugins/rabbitbuilder-js-css
    55 * 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.3
     6 * Version:           1.0.4
    77 * Author:            RabbitBuilder
    88 * Author URI:        https://www.rabbitbuilder.com/
  • rabbitbuilder-global-central-js-css/trunk/readme.txt

    r2070992 r2070996  
    6666== Changelog ==
    6767
     68= 1.0.4 =
     69* Fixed include file as readfie.
     70
    6871= 1.0.3 =
    6972* Better Javascript alert upon santax error.
Note: See TracChangeset for help on using the changeset viewer.