Plugin Directory

Changeset 2838384


Ignore:
Timestamp:
12/23/2022 08:42:17 AM (3 years ago)
Author:
codetot
Message:

Release v1.0.16

Location:
ct-optimization
Files:
35 added
2 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • ct-optimization/trunk/README.txt

    r2646424 r2838384  
    44Tags: optimization, compress, settings, codetot
    55Requires at least: 5.0
    6 Tested up to: 5.8
    7 Stable tag: 1.0.15
     6Tested up to: 6.1
     7Stable tag: 1.0.16
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    323212. Disable WLW Manifest
    333313. Disable Inline Comment styles
     34
     35Assets Optimization:
     36
     371. Remove Global Styles (Duotone and Extra CSS Style from WP 5.9)
    3438
    3539Advanced Settings:
     
    7377
    7478== Changelog ==
     79
     80= 1.0.16 =
     81
     82* Add option to remove duotone and extra CSS style in WP 5.9
    7583
    7684= 1.0.15 =
  • ct-optimization/trunk/admin/class-codetot-optimization-admin.php

    r2646424 r2838384  
    5959            'text' => '',
    6060            'fields' => $this->generate_global_options()
     61          ),
     62          'assets_optimization' => array(
     63            'title' => esc_html__('Assets Optimization', 'codetot-optimization'),
     64            'text' => '',
     65            'fields' => $this->generate_assets_optimization_options()
    6166          ),
    6267          'advanced' => array(
     
    156161  }
    157162
     163  public function generate_assets_optimization_options() {
     164    return array(
     165      'disable_global_styles' => array(
     166        'title' => __('Disable Global Styles', 'codetot-optimization'),
     167        'type' => 'radio',
     168        'value' => 'no',
     169        'choices' => array(
     170          'yes' => __('Yes', 'codetot-optimization'),
     171          'no' => __('No', 'codetot-optimization')
     172        )
     173      )
     174    );
     175  }
     176
    158177  public function get_plugin_options() {
    159178    return array(
  • ct-optimization/trunk/codetot-optimization.php

    r2646424 r2838384  
    99 * Plugin URI:        https://codetot.com
    1010 * Description:       Provides settings for enable/disable WordPress core features and some tweaks for ACF, Gravity Forms, such like Enable CDN, Lazyload assets.
    11  * Version:           1.0.15
     11 * Version:           1.0.16
     12 * Requires at least: 5.0
     13 * Requires PHP:      7.3
    1214 * Author:            CODE TOT JSC
    1315 * Author URI:        https://codetot.com
     
    2325}
    2426
    25 define( 'CODETOT_OPTIMIZATION_VERSION', '1.0.15' );
     27define( 'CODETOT_OPTIMIZATION_VERSION', '1.0.16' );
    2628define( 'CODETOT_OPTIMIZATION_PATH', plugin_dir_path(__FILE__) );
    2729define( 'CODETOT_OPTIMIZATION_URL', plugin_dir_url(__FILE__) );
  • ct-optimization/trunk/includes/class-codetot-optimization-process.php

    r2580081 r2838384  
    8585    add_action('init', array($this, 'check_comment_style'));
    8686
     87    // Assets Optimization
     88    add_action('after_setup_theme', array($this, 'check_global_styles'));
     89
    8790    // Advanced Settings
    8891    add_action('init', array($this, 'check_cdn'));
     
    342345  }
    343346
     347  public function check_global_styles()
     348  {
     349    if (!empty($this->options['disable_global_styles'])) {
     350      remove_action('wp_enqueue_scripts', 'wp_enqueue_global_styles');
     351      remove_action('wp_footer', 'wp_enqueue_global_styles', 1);
     352      remove_action('wp_body_open', 'wp_global_styles_render_svg_filters');
     353      remove_action('in_admin_header', 'wp_global_styles_render_svg_filters');
     354    }
     355  }
     356
    344357  public function check_cdn()
    345358  {
Note: See TracChangeset for help on using the changeset viewer.