Plugin Directory

Changeset 2606381


Ignore:
Timestamp:
09/28/2021 08:48:29 PM (5 years ago)
Author:
mottodesignstudio
Message:

Preparing for 1.1.3 release

Location:
blaze-css/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • blaze-css/trunk/README.txt

    r2606364 r2606381  
    55Requires at least: 5.2
    66Tested up to: 5.8
    7 Stable tag: 1.1.2
     7Stable tag: 1.1.3
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3333== Changelog ==
    3434
     35= 1.1.3 =
     36* Fixed CSV generation from manual command.
     37
    3538= 1.1.2 =
    3639* Added settings menu.
  • blaze-css/trunk/blaze-css.php

    r2606364 r2606381  
    1010 *
    1111 * @link              https://motto.ca
    12  * @since             1.1.2
     12 * @since             1.1.3
    1313 * @package           Blaze_CSS
    1414 *
     
    1717 * Plugin URI:        https://github.com/wpmotto/wp-blaze-css
    1818 * Description:       WordPress plugin to render your CSS as fast as possible. Crush your lighthouse scores by simply activating the plugin.
    19  * Version:           1.1.2
     19 * Version:           1.1.3
    2020 * Author:            Motto
    2121 * Author URI:        https://motto.ca
  • blaze-css/trunk/dist/scripts/blaze-admin.js

    r2606364 r2606381  
    1 (function( $ ) {
    2     'use strict';
    3    
    4     $( window ).load(function() {
    51
     2(function($) {
     3    $(document).ready(function(){
    64        $( "#blaze_btn_generate_csv" ).click(function() {
    7 
    85            fetch(blaze_ajax_object.ajax_url, {
    96                method: 'POST',
     
    1714            .then(response => {
    1815                console.log('response', response);
    19                 // return response.json();
    2016            })
    21             // .then(data => {
    22             //  console.log('Success:', data);
    23             // })
    24             // .catch(error => {
    25             //  console.error('Error:', error);
    26             // });
    27 
    2817        });
    29 
    3018    });
    31      
    32 
    33 })( jQuery );
     19})(jQuery);
  • blaze-css/trunk/lib/Admin.php

    r2606364 r2606381  
    4545     * @param Plugin $plugin This plugin's instance.
    4646     */
    47     public function __construct( Plugin $plugin ) {
     47    public function __construct( Plugin $plugin ) {     
    4848        $this->plugin = $plugin;
    4949        $this->settings = new Settings( $plugin );
     
    8585    public function enqueue_scripts() {
    8686
    87         /**
    88          * This function is provided for demonstration purposes only.
    89          *
    90          * An instance of this class should be passed to the run() function
    91          * defined in BlazeCss_Loader as all of the hooks are defined
    92          * in that particular class.
    93          *
    94          * The BlazeCss_Loader will then create the relationship
    95          * between the defined hooks and the functions defined in this
    96          * class.
    97          */
     87        $admin_js =  'dist/scripts/blaze-admin.js';
    9888
    9989        \wp_enqueue_script(
    10090            $this->plugin->get_plugin_name(),
    101             \plugin_dir_url( dirname( __FILE__ ) ) . 'dist/scripts/blaze-admin.js',
     91            \plugin_dir_url( dirname( __FILE__ ) ) . $admin_js,
    10292            array( 'jquery' ),
    103             $this->plugin->get_version(),
    104             false );
     93            filectime($this->plugin->get_root_path() . $admin_js),
     94            false
     95        );
    10596
    10697        \wp_localize_script(
     
    189180            '_ajax_nonce'
    190181        );
    191 
     182       
    192183        $file = new File($this->plugin);
    193         $file->write();
    194         die();
     184        $result = $file->write();
     185        echo json_encode((bool) $result); die();
    195186    }
    196187
  • blaze-css/trunk/lib/Common/File.php

    r2606364 r2606381  
    1616    {   
    1717        $csv_file_path = $this->plugin->settings->get_option('gcsv_path_file');
    18         $path = WP_CONTENT_DIR . $csv_file_path;
    19        
     18        $path = WP_CONTENT_DIR . '/' . $csv_file_path;
    2019        $elements = (new Element)->select('DISTINCT el_class')
    2120                                ->where('el_class IS NOT NULL')
     
    2625        );
    2726       
    28         file_put_contents($path, $classes);
     27        return file_put_contents($path, $classes);
    2928    }
    3029
  • blaze-css/trunk/lib/Plugin.php

    r2606364 r2606381  
    111111
    112112        // $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
    113         // $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
     113        $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
    114114
    115115        $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_settings_page' );
    116116        $this->loader->add_action( 'admin_init', $plugin_admin, 'init_settings' );
    117 
    118         if( (bool) $this->settings->get_option('gcsv_auto') )
    119             $this->loader->add_action( 'wp_ajax_blaze_generate_csv', $plugin_admin, 'generate_csv' );
     117        $this->loader->add_action( 'wp_ajax_blaze_generate_csv', $plugin_admin, 'generate_csv' );
    120118    }
    121119
Note: See TracChangeset for help on using the changeset viewer.