Plugin Directory

Changeset 2943924


Ignore:
Timestamp:
07/26/2023 10:16:43 PM (3 years ago)
Author:
disablebloat
Message:

Update to version 3.2.11 from GitHub

Location:
disable-dashboard-for-woocommerce
Files:
4 deleted
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • disable-dashboard-for-woocommerce/tags/3.2.11/disable-dashboard-for-woocommerce.php

    r2943912 r2943924  
    55 * Plugin URI: https://disablebloat.com/
    66 * Description: All-in-One solution to speed up your WordPress & WooCommerce. Remove unnecessary features and make your site faster and cleaner.
    7  * Version: 3.2.10
     7 * Version: 3.2.11
    88 * Author: Disable Bloat
    99 * Developer: Disable Bloat
     
    1919 * License URI: http://www.gnu.org/licenses/gpl-3.0.html
    2020 */
    21 
    22 if (!defined('ABSPATH')) {
     21if ( !defined( 'ABSPATH' ) ) {
    2322    exit;
    2423}
    2524
    26 if (function_exists('wcbloat_fs')) {
    27     wcbloat_fs()->set_basename(false, __FILE__);
     25if ( function_exists( 'wcbloat_fs' ) ) {
     26    wcbloat_fs()->set_basename( false, __FILE__ );
    2827} else {
    2928    // DO NOT REMOVE THIS IF, IT IS ESSENTIAL FOR THE `function_exists` CALL ABOVE TO PROPERLY WORK.
    30 
    31     if (!function_exists('wcbloat_fs')) {
     29   
     30    if ( !function_exists( 'wcbloat_fs' ) ) {
    3231        // Actual Freemius integration snippet
    33 
    34         if (!function_exists('wcbloat_fs')) {
     32       
     33        if ( !function_exists( 'wcbloat_fs' ) ) {
    3534            // Create a helper function for easy SDK access.
    3635            function wcbloat_fs()
    3736            {
    38                 global  $wcbloat_fs;
    39 
    40                 if (!isset($wcbloat_fs)) {
     37                global  $wcbloat_fs ;
     38               
     39                if ( !isset( $wcbloat_fs ) ) {
    4140                    // Activate multisite network integration.
    42                     if (!defined('WP_FS__PRODUCT_10157_MULTISITE')) {
    43                         define('WP_FS__PRODUCT_10157_MULTISITE', true);
     41                    if ( !defined( 'WP_FS__PRODUCT_10157_MULTISITE' ) ) {
     42                        define( 'WP_FS__PRODUCT_10157_MULTISITE', true );
    4443                    }
    4544                    // Include Freemius SDK.
    46                     require_once dirname(__FILE__) . '/includes/freemius/start.php';
    47                     $wcbloat_fs = fs_dynamic_init(array(
     45                    require_once dirname( __FILE__ ) . '/includes/freemius/start.php';
     46                    $wcbloat_fs = fs_dynamic_init( array(
    4847                        'id'             => '10157',
    4948                        'slug'           => 'disable-dashboard-for-woocommerce',
     
    5150                        'type'           => 'plugin',
    5251                        'public_key'     => 'pk_16f665643a809fd13e01f8a3d1381',
    53                         'is_premium'     => true,
     52                        'is_premium'     => false,
    5453                        'premium_suffix' => 'PRO',
    5554                        'has_addons'     => false,
    5655                        'has_paid_plans' => true,
    5756                        'menu'           => array(
    58                             'contact' => false,
    59                             'support' => false,
    60                             'account' => false,
    61                             'pricing' => false,
    62                         ),
     57                        'contact' => false,
     58                        'support' => false,
     59                        'account' => false,
     60                        'pricing' => false,
     61                    ),
    6362                        'pricing'        => false,
    64                         'anonymous_mode' => !function_exists('is_anonymous_mode_disabled__premium_only') || !is_anonymous_mode_disabled__premium_only(),
    65                         'secret_key'          => 'sk_29&*CUAZ^AKR8gvgAAPAB*p]o8;il',
    66 
    67                     ));
     63                        'anonymous_mode' => !function_exists( 'is_anonymous_mode_disabled__premium_only' ) || !is_anonymous_mode_disabled__premium_only(),
     64                        'is_live'        => true,
     65                    ) );
    6866                }
    69 
     67               
    7068                return $wcbloat_fs;
    7169            }
    72 
     70           
    7371            // Init Freemius.
    7472            wcbloat_fs();
    7573            // Signal that SDK was initiated.
    76             do_action('wcbloat_fs_loaded');
     74            do_action( 'wcbloat_fs_loaded' );
    7775        }
    78 
    79         if (function_exists('fs_override_i18n')) {
    80             fs_override_i18n(array(
    81                 'opt-in' => __('', 'disable-dashboard-for-woocommerce'),
    82             ), 'disable-dashboard-for-woocommerce');
     76       
     77        if ( function_exists( 'fs_override_i18n' ) ) {
     78            fs_override_i18n( array(
     79                'opt-in' => __( '', 'disable-dashboard-for-woocommerce' ),
     80            ), 'disable-dashboard-for-woocommerce' );
    8381        }
    84         wcbloat_fs()->add_filter('default_to_anonymous_feedback', '__return_true');
    85         wcbloat_fs()->add_filter('hide_freemius_powered_by', '__return_true');
    86         wcbloat_fs()->add_filter('hide_billing_and_payments_info', '__return_true');
     82        wcbloat_fs()->add_filter( 'default_to_anonymous_feedback', '__return_true' );
     83        wcbloat_fs()->add_filter( 'hide_freemius_powered_by', '__return_true' );
     84        wcbloat_fs()->add_filter( 'hide_billing_and_payments_info', '__return_true' );
    8785        // Opt-In Icon Customization
    8886        function wcbloat_custom_plugin_icon()
    8987        {
    90             return dirname(__FILE__) . '/assets/img/disable-dashboard-for-woocommerce.png';
     88            return dirname( __FILE__ ) . '/assets/img/disable-dashboard-for-woocommerce.png';
    9189        }
    92 
    93         wcbloat_fs()->add_filter('plugin_icon', 'wcbloat_custom_plugin_icon');
     90       
     91        wcbloat_fs()->add_filter( 'plugin_icon', 'wcbloat_custom_plugin_icon' );
    9492        // Freemius END
    9593        // load plugin text domain
    9694        function wcbloat_init()
    9795        {
    98             load_plugin_textdomain('disable-dashboard-for-woocommerce', false, dirname(plugin_basename(__FILE__)) . '/languages');
     96            load_plugin_textdomain( 'disable-dashboard-for-woocommerce', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
    9997        }
    100 
    101         add_action('plugins_loaded', 'wcbloat_init');
     98       
     99        add_action( 'plugins_loaded', 'wcbloat_init' );
    102100        // Links on Plugins screen
    103         function wcbloat_action_links($links)
     101        function wcbloat_action_links( $links )
    104102        {
    105             $custom_links = ['<a href="' . admin_url('options-general.php?page=disable-bloat') . '">' . __('Settings') . '</a>'];
    106 
    107             if (!wcbloat_fs()->is_premium()) {
    108                 $custom_links[] = '<a href="https://disablebloat.com/?utm_source=plugins_list&utm_medium=referral&utm_campaign=Plugin+links" target="_blank"><b>' . __('Upgrade', 'disable-dashboard-for-woocommerce') . '</b></a>';
     103            $custom_links = [ '<a href="' . admin_url( 'options-general.php?page=disable-bloat' ) . '">' . __( 'Settings' ) . '</a>' ];
     104            if ( !wcbloat_fs()->is_premium() ) {
     105                $custom_links[] = '<a href="https://disablebloat.com/?utm_source=plugins_list&utm_medium=referral&utm_campaign=Plugin+links" target="_blank"><b>' . __( 'Upgrade', 'disable-dashboard-for-woocommerce' ) . '</b></a>';
    109106            }
    110 
    111             if (wcbloat_fs()->is_plan('pro')) {
    112                 $custom_links[] = sprintf(
    113                     '<a href="%1$s">%2$s</a>',
    114                     esc_url(wcbloat_fs()->get_account_url()),
    115                     __('My Account', 'disable-dashboard-for-woocommerce')
    116                 );
     107            if ( wcbloat_fs()->is_plan( 'pro' ) ) {
     108                $custom_links[] = sprintf( '<a href="%1$s">%2$s</a>', esc_url( wcbloat_fs()->get_account_url() ), __( 'My Account', 'disable-dashboard-for-woocommerce' ) );
    117109            }
    118 
    119             return array_merge($custom_links, $links);
     110            return array_merge( $custom_links, $links );
    120111        }
    121 
    122         add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'wcbloat_action_links');
     112       
     113        add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'wcbloat_action_links' );
    123114    }
    124 
     115   
    125116    // Add CSS and JS to the plugin settings screens
    126117    function wcbloat_custom_wp_admin_assets()
    127118    {
    128         $page = isset($_GET['page']) ? $_GET['page'] : '';
    129 
    130         if ($page === 'disable-bloat') {
    131             wp_enqueue_style('wcbloat_wp_admin_css', plugin_dir_url(__FILE__) . 'assets/css/disable-bloat-admin-style.css');
    132             wp_enqueue_script('wcbloat_wp_admin_js', plugin_dir_url(__FILE__) . 'assets/js/disable-bloat-admin.js');
     119        $page = ( isset( $_GET['page'] ) ? $_GET['page'] : '' );
     120       
     121        if ( $page === 'disable-bloat' ) {
     122            wp_enqueue_style( 'wcbloat_wp_admin_css', plugin_dir_url( __FILE__ ) . 'assets/css/disable-bloat-admin-style.css' );
     123            wp_enqueue_script( 'wcbloat_wp_admin_js', plugin_dir_url( __FILE__ ) . 'assets/js/disable-bloat-admin.js' );
    133124        }
     125   
    134126    }
    135 
    136     add_action('admin_enqueue_scripts', 'wcbloat_custom_wp_admin_assets');
    137 
     127   
     128    add_action( 'admin_enqueue_scripts', 'wcbloat_custom_wp_admin_assets' );
    138129    // Include WooCommerce integration
    139130    require_once 'includes/functions/disable-bloat-woocommerce.php';
    140 
    141131    // Include functions files
    142132    require_once 'includes/functions/disable-bloat-functions_free.php';
    143 
    144     if (wcbloat_fs()->is__premium_only()) {
    145         if (wcbloat_fs()->is_plan('pro')) {
    146             require_once 'includes/functions/disable-bloat-functions_pro__premium_only.php';
    147         }
    148     }
    149 
    150133    // Include Options pages
    151134    require_once 'includes/settings/class-disable-bloat-settings.php';
    152 
    153135    // Include Uninstall Cleanup code
    154136    require_once 'includes/functions/disable-bloat-uninstall-cleanup.php';
    155 
    156137    // Compatibility with WooCommerce HPOS (Custom order tables) - only if WooCommmerce is active
    157     if (wcbloat_is_woo_active()) {
    158         add_action('before_woocommerce_init', function () {
    159             if (class_exists(\Automattic\WooCommerce\Utilities\FeaturesUtil::class)) {
    160                 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility('custom_order_tables', __FILE__, true);
     138    if ( wcbloat_is_woo_active() ) {
     139        add_action( 'before_woocommerce_init', function () {
     140            if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
     141                \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
    161142            }
    162         });
     143        } );
    163144    }
    164 
    165145    // MAIN PLUGIN FILE END
    166146    // DO NOT REMOVE THE BRACKET BELOW, AS IT IS NEEDED FOR THE MECHANISM OF AUTO DEACTIVATING THE FREE VERSION DURING PRO ACTIVATION:
  • disable-dashboard-for-woocommerce/tags/3.2.11/includes/settings/class-disable-bloat-settings-admin.php

    r2943912 r2943924  
    11<?php
    22
    3 if (!defined('ABSPATH')) exit; // Exit if accessed directly
    4 
     3if ( !defined( 'ABSPATH' ) ) {
     4    exit;
     5}
     6// Exit if accessed directly
    57// Add sections and fields on Main settings screen
    68function wcbloat_admin_settings_init()
    79{
    8 
    9     // Section's icon
    10     add_settings_section(
    11         'wcbloat-admin-desc-icon-section',
    12         '',
    13         'wcbloat_admin_desc_icon_callback',
    14         'wcbloat-admin'
    15     );
    16 
    17     // Section's title and description
    18     add_settings_section(
    19         'wcbloat-admin-desc-section',
    20         esc_attr__('Admin panel optimization', 'disable-dashboard-for-woocommerce'),
    21         'wcbloat_admin_desc_callback',
    22         'wcbloat-admin'
    23     );
    24 
    25     // Clean admin interface section
    26     add_settings_section(
    27         'wcbloat_clean_admin_section',
    28         esc_attr__('Clean admin interface', 'disable-dashboard-for-woocommerce'),
    29         'wcbloat_clean_admin_desc_section_callback',
    30         'wcbloat-admin'
    31     );
    32 
    33     // Hide update notice for non-admin users
    34     add_settings_field(
    35         'wcbloat_wp_update_nag_disable',
    36         'Hide update notice for non-admin users',
    37         'wcbloat_wp_update_nag_disable_callback',
    38         'wcbloat-admin',
    39         'wcbloat_clean_admin_section'
    40     );
    41     register_setting(
    42         'wcbloat-admin-options',
    43         'wcbloat_wp_update_nag_disable',
    44         array('sanitize_callback' => 'sanitize_key')
    45     );
    46 
    47     // Disable Dashboard widgets PRO
    48     add_settings_field(
    49         'wcbloat_wp_dashboard_widgets_disable',
    50         esc_attr__( 'Disable WordPress Dashboard widgets', 'disable-dashboard-for-woocommerce' ),
    51         'wcbloat_wp_dashboard_widgets_disable_callback',
    52         'wcbloat-admin',
    53         'wcbloat_clean_admin_section' );
    54     register_setting(
    55         'wcbloat-admin-options',
    56         'wcbloat_wp_dashboard_widgets_disable',
    57         'validate_setting'
    58     );
    59 
    60     // Remove the WordPress logo ("W") from the admin bar PRO
    61     add_settings_field(
    62         'wcbloat_w_logo_disable',
    63         'WordPress logo in the admin bar',
    64         'wcbloat_w_logo_disable_callback',
    65         'wcbloat-admin',
    66         'wcbloat_clean_admin_section'
    67     );
    68     register_setting(
    69         'wcbloat-admin-options',
    70         'wcbloat_w_logo_disable',
    71         array('sanitize_callback' => 'sanitize_key')
    72     );
    73 
    74     // Remove admin footer text PRO
    75     add_settings_field(
    76         'wcbloat_wp_footer_disable',
    77         'Admin footer text',
    78         'wcbloat_wp_footer_disable_callback',
    79         'wcbloat-admin',
    80         'wcbloat_clean_admin_section'
    81     );
    82     register_setting(
    83         'wcbloat-admin-options',
    84         'wcbloat_wp_footer_disable',
    85         array('sanitize_callback' => 'sanitize_key')
    86     );
    87 
    88     // WordPress login page section
    89     add_settings_section(
    90         'wcbloat-admin-wp-login-page-section',
    91         esc_attr__('WordPress login page', 'disable-dashboard-for-woocommerce'),
    92         'wcbloat_admin_wp_login_page_section_callback',
    93         'wcbloat-admin'
    94     );
    95 
    96     // Hide WordPress logo on the WordPress Login Page PRO
    97     add_settings_field(
    98         'wcbloat_hide_wp_logo_on_login_page',
    99         'Hide WordPress logo on the Login Page',
    100         'wcbloat_hide_wp_logo_on_login_page_callback',
    101         'wcbloat-admin',
    102         'wcbloat-admin-wp-login-page-section'
    103     );
    104     register_setting(
    105         'wcbloat-admin-options',
    106         'wcbloat_hide_wp_logo_on_login_page',
    107         array('sanitize_callback' => 'sanitize_key')
    108     );
    109 
    110     // Change the Logo URL on the WordPress Login Page PRO
    111     add_settings_field(
    112         'wcbloat_wp_logo_url_disable',
    113         'Change the Logo Link',
    114         'wcbloat_wp_logo_url_disable_callback',
    115         'wcbloat-admin',
    116         'wcbloat-admin-wp-login-page-section'
    117     );
    118     register_setting(
    119         'wcbloat-admin-options',
    120         'wcbloat_wp_logo_url_disable',
    121         array('sanitize_callback' => 'sanitize_key')
    122     );
    123 
    124     // Change the Logo title the WordPress Login Page PRO
    125     add_settings_field(
    126         'wcbloat_wp_logo_title',
    127         'Change the Logo title parameter',
    128         'wcbloat_wp_logo_title_callback',
    129         'wcbloat-admin',
    130         'wcbloat-admin-wp-login-page-section'
    131     );
    132     register_setting(
    133         'wcbloat-admin-options',
    134         'wcbloat_wp_logo_title',
    135         array('sanitize_callback' => 'sanitize_key')
    136     );
    137 
    138     // Disable WordPress Login Language Switcher PRO
    139     add_settings_field(
    140         'wcbloat_wp_language_select_disable',
    141         'Disable WordPress Login Language Switcher',
    142         'wcbloat_wp_language_select_disable_callback',
    143         'wcbloat-admin',
    144         'wcbloat-admin-wp-login-page-section'
    145     );
    146     register_setting(
    147         'wcbloat-admin-options',
    148         'wcbloat_wp_language_select_disable',
    149         array('sanitize_callback' => 'sanitize_key')
    150     );
     10    // Section's icon
     11    add_settings_section(
     12        'wcbloat-admin-desc-icon-section',
     13        '',
     14        'wcbloat_admin_desc_icon_callback',
     15        'wcbloat-admin'
     16    );
     17    // Section's title and description
     18    add_settings_section(
     19        'wcbloat-admin-desc-section',
     20        esc_attr__( 'Admin panel optimization', 'disable-dashboard-for-woocommerce' ),
     21        'wcbloat_admin_desc_callback',
     22        'wcbloat-admin'
     23    );
     24    // Clean admin interface section
     25    add_settings_section(
     26        'wcbloat_clean_admin_section',
     27        esc_attr__( 'Clean admin interface', 'disable-dashboard-for-woocommerce' ),
     28        'wcbloat_clean_admin_desc_section_callback',
     29        'wcbloat-admin'
     30    );
     31    // Hide update notice for non-admin users
     32    add_settings_field(
     33        'wcbloat_wp_update_nag_disable',
     34        'Hide update notice for non-admin users',
     35        'wcbloat_wp_update_nag_disable_callback',
     36        'wcbloat-admin',
     37        'wcbloat_clean_admin_section'
     38    );
     39    register_setting( 'wcbloat-admin-options', 'wcbloat_wp_update_nag_disable', array(
     40        'sanitize_callback' => 'sanitize_key',
     41    ) );
     42    // Disable Dashboard widgets PRO
     43    add_settings_field(
     44        'wcbloat_wp_dashboard_widgets_disable',
     45        esc_attr__( 'Disable WordPress Dashboard widgets', 'disable-dashboard-for-woocommerce' ),
     46        'wcbloat_wp_dashboard_widgets_disable_callback',
     47        'wcbloat-admin',
     48        'wcbloat_clean_admin_section'
     49    );
     50    register_setting( 'wcbloat-admin-options', 'wcbloat_wp_dashboard_widgets_disable', 'validate_setting' );
     51    // Remove the WordPress logo ("W") from the admin bar PRO
     52    add_settings_field(
     53        'wcbloat_w_logo_disable',
     54        'WordPress logo in the admin bar',
     55        'wcbloat_w_logo_disable_callback',
     56        'wcbloat-admin',
     57        'wcbloat_clean_admin_section'
     58    );
     59    register_setting( 'wcbloat-admin-options', 'wcbloat_w_logo_disable', array(
     60        'sanitize_callback' => 'sanitize_key',
     61    ) );
     62    // Remove admin footer text PRO
     63    add_settings_field(
     64        'wcbloat_wp_footer_disable',
     65        'Admin footer text',
     66        'wcbloat_wp_footer_disable_callback',
     67        'wcbloat-admin',
     68        'wcbloat_clean_admin_section'
     69    );
     70    register_setting( 'wcbloat-admin-options', 'wcbloat_wp_footer_disable', array(
     71        'sanitize_callback' => 'sanitize_key',
     72    ) );
     73    // WordPress login page section
     74    add_settings_section(
     75        'wcbloat-admin-wp-login-page-section',
     76        esc_attr__( 'WordPress login page', 'disable-dashboard-for-woocommerce' ),
     77        'wcbloat_admin_wp_login_page_section_callback',
     78        'wcbloat-admin'
     79    );
     80    // Hide WordPress logo on the WordPress Login Page PRO
     81    add_settings_field(
     82        'wcbloat_hide_wp_logo_on_login_page',
     83        'Hide WordPress logo on the Login Page',
     84        'wcbloat_hide_wp_logo_on_login_page_callback',
     85        'wcbloat-admin',
     86        'wcbloat-admin-wp-login-page-section'
     87    );
     88    register_setting( 'wcbloat-admin-options', 'wcbloat_hide_wp_logo_on_login_page', array(
     89        'sanitize_callback' => 'sanitize_key',
     90    ) );
     91    // Change the Logo URL on the WordPress Login Page PRO
     92    add_settings_field(
     93        'wcbloat_wp_logo_url_disable',
     94        'Change the Logo Link',
     95        'wcbloat_wp_logo_url_disable_callback',
     96        'wcbloat-admin',
     97        'wcbloat-admin-wp-login-page-section'
     98    );
     99    register_setting( 'wcbloat-admin-options', 'wcbloat_wp_logo_url_disable', array(
     100        'sanitize_callback' => 'sanitize_key',
     101    ) );
     102    // Change the Logo title the WordPress Login Page PRO
     103    add_settings_field(
     104        'wcbloat_wp_logo_title',
     105        'Change the Logo title parameter',
     106        'wcbloat_wp_logo_title_callback',
     107        'wcbloat-admin',
     108        'wcbloat-admin-wp-login-page-section'
     109    );
     110    register_setting( 'wcbloat-admin-options', 'wcbloat_wp_logo_title', array(
     111        'sanitize_callback' => 'sanitize_key',
     112    ) );
     113    // Disable WordPress Login Language Switcher PRO
     114    add_settings_field(
     115        'wcbloat_wp_language_select_disable',
     116        'Disable WordPress Login Language Switcher',
     117        'wcbloat_wp_language_select_disable_callback',
     118        'wcbloat-admin',
     119        'wcbloat-admin-wp-login-page-section'
     120    );
     121    register_setting( 'wcbloat-admin-options', 'wcbloat_wp_language_select_disable', array(
     122        'sanitize_callback' => 'sanitize_key',
     123    ) );
    151124}
    152125
    153126// Display the fields added before
    154 add_action('admin_init', 'wcbloat_admin_settings_init');
    155 
     127add_action( 'admin_init', 'wcbloat_admin_settings_init' );
    156128// Fields callbacks
    157 
    158129// Section's icon
    159130function wcbloat_admin_desc_icon_callback()
    160131{
    161     _e('<span class="dashicons dashicons-hammer"></span>');
     132    _e( '<span class="dashicons dashicons-hammer"></span>' );
    162133}
    163134
     
    165136function wcbloat_admin_desc_callback()
    166137{
    167     _e('By default, the WordPress admin panel is cluttered with preinstalled elements that may distract you from your work. You can simplify your WordPress admin panel by hiding or turning them off.<hr />', 'disable-dashboard-for-woocommerce');
    168     _e ( wcbloat_buy_pro_bar() );
     138    _e( 'By default, the WordPress admin panel is cluttered with preinstalled elements that may distract you from your work. You can simplify your WordPress admin panel by hiding or turning them off.<hr />', 'disable-dashboard-for-woocommerce' );
     139    _e( wcbloat_buy_pro_bar() );
    169140}
    170141
     
    172143function wcbloat_clean_admin_desc_section_callback()
    173144{
    174     _e('If you love a simple and flexible interface, use the options below to maximize your performance while browsing through the WordPress admin panel. By removing unnecessary elements, you will be 100% focused on your tasks.', 'disable-dashboard-for-woocommerce');
     145    _e( 'If you love a simple and flexible interface, use the options below to maximize your performance while browsing through the WordPress admin panel. By removing unnecessary elements, you will be 100% focused on your tasks.', 'disable-dashboard-for-woocommerce' );
    175146}
    176147
     
    178149function wcbloat_wp_update_nag_disable_callback()
    179150{
    180     $value = get_option('wcbloat_wp_update_nag_disable');
    181 ?>
     151    $value = get_option( 'wcbloat_wp_update_nag_disable' );
     152    ?>
    182153    <input type='hidden' name='wcbloat_wp_update_nag_disable' value='no'>
    183     <label><input type='checkbox' name='wcbloat_wp_update_nag_disable' <?php checked(esc_attr($value), 'yes'); ?> value='yes'> <?php esc_attr_e('Hide update notice for non-admin users', 'disable-dashboard-for-woocommerce'); ?></label>
    184     <p><?php _e('The next time any user with the Role set as Subscriber, Contributor, Author, or Editor access the WordPress back-end, they will not be prompted to update the WordPress core. The notification will continue to display for admin users.', 'disable-dashboard-for-woocommerce'); ?></p>
    185 <?php
     154    <label><input type='checkbox' name='wcbloat_wp_update_nag_disable' <?php
     155    checked( esc_attr( $value ), 'yes' );
     156    ?> value='yes'> <?php
     157    esc_attr_e( 'Hide update notice for non-admin users', 'disable-dashboard-for-woocommerce' );
     158    ?></label>
     159    <p><?php
     160    _e( 'The next time any user with the Role set as Subscriber, Contributor, Author, or Editor access the WordPress back-end, they will not be prompted to update the WordPress core. The notification will continue to display for admin users.', 'disable-dashboard-for-woocommerce' );
     161    ?></p>
     162<?php
    186163}
    187164
     
    189166function wcbloat_wp_dashboard_widgets_disable_callback()
    190167{
    191     $options = get_option('wcbloat_wp_dashboard_widgets_disable'); 
    192     ?>
     168    $options = get_option( 'wcbloat_wp_dashboard_widgets_disable' );
     169    ?>
    193170<div class="wcbloat-select-unselect-buttons">
    194     <a <?php if ( wcbloat_fs()->is__premium_only() ) { if ( wcbloat_fs()->is_plan( 'pro' ) ) { _e('id="select-all"'); }} ?> class="button button-secondary"<?php echo wcbloat_is_pro_readonly();?>><?php esc_attr_e('Select / Deselect All', 'disable-dashboard-for-woocommerce'); ?></a>
     171    <a <?php
     172    ?> class="button button-secondary"<?php
     173    echo  wcbloat_is_pro_readonly() ;
     174    ?>><?php
     175    esc_attr_e( 'Select / Deselect All', 'disable-dashboard-for-woocommerce' );
     176    ?></a>
    195177</div>
    196178<table id="wcbloat-multi-checkbox-table">
    197179<tbody>
    198180  <tr>
    199     <td class="wcbloat-wp-widgets-disable-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_dashboard_widgets_disable[]' <?php if (!empty($options)) { if (in_array('site_health', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='site_health'><?php esc_attr_e('Site Health Status', 'disable-dashboard-for-woocommerce'); ?></td>
    200     <td class="wcbloat-wp-widgets-disable-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_dashboard_widgets_disable[]' <?php if (!empty($options)) { if (in_array('at_a_glance', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='at_a_glance'><?php esc_attr_e('At a Glance', 'disable-dashboard-for-woocommerce'); ?></td>
     181    <td class="wcbloat-wp-widgets-disable-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_dashboard_widgets_disable[]' <?php
     182    if ( !empty($options) ) {
     183        if ( in_array( 'site_health', $options ) ) {
     184            esc_attr_e( 'checked' );
     185        }
     186    }
     187    echo  wcbloat_is_pro_readonly() ;
     188    ?> value='site_health'><?php
     189    esc_attr_e( 'Site Health Status', 'disable-dashboard-for-woocommerce' );
     190    ?></td>
     191    <td class="wcbloat-wp-widgets-disable-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_dashboard_widgets_disable[]' <?php
     192    if ( !empty($options) ) {
     193        if ( in_array( 'at_a_glance', $options ) ) {
     194            esc_attr_e( 'checked' );
     195        }
     196    }
     197    echo  wcbloat_is_pro_readonly() ;
     198    ?> value='at_a_glance'><?php
     199    esc_attr_e( 'At a Glance', 'disable-dashboard-for-woocommerce' );
     200    ?></td>
    201201</tr>
    202202  <tr>
    203   <td class="wcbloat-wp-widgets-disable-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_dashboard_widgets_disable[]' <?php if (!empty($options)) { if (in_array('activity', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='activity'><?php esc_attr_e('Activity', 'disable-dashboard-for-woocommerce'); ?></td>
    204   <td class="wcbloat-wp-widgets-disable-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_dashboard_widgets_disable[]' <?php if (!empty($options)) { if (in_array('draft', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='draft'><?php esc_attr_e('Quick Draft', 'disable-dashboard-for-woocommerce'); ?></td>
     203  <td class="wcbloat-wp-widgets-disable-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_dashboard_widgets_disable[]' <?php
     204    if ( !empty($options) ) {
     205        if ( in_array( 'activity', $options ) ) {
     206            esc_attr_e( 'checked' );
     207        }
     208    }
     209    echo  wcbloat_is_pro_readonly() ;
     210    ?> value='activity'><?php
     211    esc_attr_e( 'Activity', 'disable-dashboard-for-woocommerce' );
     212    ?></td>
     213  <td class="wcbloat-wp-widgets-disable-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_dashboard_widgets_disable[]' <?php
     214    if ( !empty($options) ) {
     215        if ( in_array( 'draft', $options ) ) {
     216            esc_attr_e( 'checked' );
     217        }
     218    }
     219    echo  wcbloat_is_pro_readonly() ;
     220    ?> value='draft'><?php
     221    esc_attr_e( 'Quick Draft', 'disable-dashboard-for-woocommerce' );
     222    ?></td>
    205223  </tr>
    206224  <tr>
    207   <td class="wcbloat-wp-widgets-disable-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_dashboard_widgets_disable[]' <?php if (!empty($options)) { if (in_array('news', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='news'><?php esc_attr_e('WordPress Events and News', 'disable-dashboard-for-woocommerce'); ?></td>
    208   <td class="wcbloat-wp-widgets-disable-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_dashboard_widgets_disable[]' <?php if (!empty($options)) { if (in_array('welcome', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='welcome'><?php esc_attr_e('Welcome panel', 'disable-dashboard-for-woocommerce'); ?></td>
     225  <td class="wcbloat-wp-widgets-disable-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_dashboard_widgets_disable[]' <?php
     226    if ( !empty($options) ) {
     227        if ( in_array( 'news', $options ) ) {
     228            esc_attr_e( 'checked' );
     229        }
     230    }
     231    echo  wcbloat_is_pro_readonly() ;
     232    ?> value='news'><?php
     233    esc_attr_e( 'WordPress Events and News', 'disable-dashboard-for-woocommerce' );
     234    ?></td>
     235  <td class="wcbloat-wp-widgets-disable-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_dashboard_widgets_disable[]' <?php
     236    if ( !empty($options) ) {
     237        if ( in_array( 'welcome', $options ) ) {
     238            esc_attr_e( 'checked' );
     239        }
     240    }
     241    echo  wcbloat_is_pro_readonly() ;
     242    ?> value='welcome'><?php
     243    esc_attr_e( 'Welcome panel', 'disable-dashboard-for-woocommerce' );
     244    ?></td>
    209245  </tr>
    210246</tbody>
    211247</table>
    212     <p><?php echo wcbloat_is_pro_badge(); _e('WordPress by default comes with a lot of Dashboard widgets installed. They often are not used at all, but can add backend load and front-end load. Choose which of the WordPress Dashboard Widgets should be disabled. The <strong>ones you choose will be disabled</strong>, and the <strong>ones that had not been selected</strong> will stay <strong>active</strong>.', 'disable-dashboard-for-woocommerce'); ?></p>
    213 
    214     <?php
     248    <p><?php
     249    echo  wcbloat_is_pro_badge() ;
     250    _e( 'WordPress by default comes with a lot of Dashboard widgets installed. They often are not used at all, but can add backend load and front-end load. Choose which of the WordPress Dashboard Widgets should be disabled. The <strong>ones you choose will be disabled</strong>, and the <strong>ones that had not been selected</strong> will stay <strong>active</strong>.', 'disable-dashboard-for-woocommerce' );
     251    ?></p>
     252
     253    <?php
    215254}
    216255
     
    218257function wcbloat_w_logo_disable_callback()
    219258{
    220     $value = get_option('wcbloat_w_logo_disable');
    221 ?>
     259    $value = get_option( 'wcbloat_w_logo_disable' );
     260    ?>
    222261    <input type='hidden' name='wcbloat_w_logo_disable' value='no'>
    223     <label><input type='checkbox' name='wcbloat_w_logo_disable' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Remove the WordPress logo (“W”) from the admin bar', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    224     <p><?php _e('This option will hide the WordPress logo in the upper left corner. The logo won\'t be visible in your admin panel and in your site (on the admin bar visible on the front-end after logging in.', 'disable-dashboard-for-woocommerce'); ?></p>
    225 <?php
     262    <label><input type='checkbox' name='wcbloat_w_logo_disable' <?php
     263    checked( esc_attr( $value ), 'yes' );
     264    echo  wcbloat_is_pro_readonly() ;
     265    ?> value='yes'> <?php
     266    esc_attr_e( 'Remove the WordPress logo (“W”) from the admin bar', 'disable-dashboard-for-woocommerce' );
     267    echo  wcbloat_is_pro_badge() ;
     268    ?></label>
     269    <p><?php
     270    _e( 'This option will hide the WordPress logo in the upper left corner. The logo won\'t be visible in your admin panel and in your site (on the admin bar visible on the front-end after logging in.', 'disable-dashboard-for-woocommerce' );
     271    ?></p>
     272<?php
    226273}
    227274
     
    229276function wcbloat_wp_footer_disable_callback()
    230277{
    231     $value = get_option('wcbloat_wp_footer_disable');
    232 ?>
     278    $value = get_option( 'wcbloat_wp_footer_disable' );
     279    ?>
    233280    <input type='hidden' name='wcbloat_wp_footer_disable' value='no'>
    234     <label><input type='checkbox' name='wcbloat_wp_footer_disable' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Remove admin footer text', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    235     <p><?php _e('This option hides the text at the bottom of the WordPress admin: <code>Thank you for creating with WordPress</code> on the bottom left, and the WordPress version on the bottom right.', 'disable-dashboard-for-woocommerce'); ?></p>
    236 <?php
     281    <label><input type='checkbox' name='wcbloat_wp_footer_disable' <?php
     282    checked( esc_attr( $value ), 'yes' );
     283    echo  wcbloat_is_pro_readonly() ;
     284    ?> value='yes'> <?php
     285    esc_attr_e( 'Remove admin footer text', 'disable-dashboard-for-woocommerce' );
     286    echo  wcbloat_is_pro_badge() ;
     287    ?></label>
     288    <p><?php
     289    _e( 'This option hides the text at the bottom of the WordPress admin: <code>Thank you for creating with WordPress</code> on the bottom left, and the WordPress version on the bottom right.', 'disable-dashboard-for-woocommerce' );
     290    ?></p>
     291<?php
    237292}
    238293
     
    240295function wcbloat_admin_wp_login_page_section_callback()
    241296{
    242     _e('There are situations when you may prefer to hide or change the standard WordPress branding on the Login Page.', 'disable-dashboard-for-woocommerce');
     297    _e( 'There are situations when you may prefer to hide or change the standard WordPress branding on the Login Page.', 'disable-dashboard-for-woocommerce' );
    243298}
    244299
     
    246301function wcbloat_hide_wp_logo_on_login_page_callback()
    247302{
    248     $value = get_option('wcbloat_hide_wp_logo_on_login_page');
    249 ?>
     303    $value = get_option( 'wcbloat_hide_wp_logo_on_login_page' );
     304    ?>
    250305    <input type='hidden' name='wcbloat_hide_wp_logo_on_login_page' value='no'>
    251     <label><input type='checkbox' name='wcbloat_hide_wp_logo_on_login_page' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Hide WordPress logo on the WordPress Login Page', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    252     <p><?php _e('Hide standard WordPress Logo from Login Page', 'disable-dashboard-for-woocommerce'); ?></p>
    253 <?php
     306    <label><input type='checkbox' name='wcbloat_hide_wp_logo_on_login_page' <?php
     307    checked( esc_attr( $value ), 'yes' );
     308    echo  wcbloat_is_pro_readonly() ;
     309    ?> value='yes'> <?php
     310    esc_attr_e( 'Hide WordPress logo on the WordPress Login Page', 'disable-dashboard-for-woocommerce' );
     311    echo  wcbloat_is_pro_badge() ;
     312    ?></label>
     313    <p><?php
     314    _e( 'Hide standard WordPress Logo from Login Page', 'disable-dashboard-for-woocommerce' );
     315    ?></p>
     316<?php
    254317}
    255318
     
    257320function wcbloat_wp_logo_url_disable_callback()
    258321{
    259     $value = get_option('wcbloat_wp_logo_url_disable');
    260 ?>
     322    $value = get_option( 'wcbloat_wp_logo_url_disable' );
     323    ?>
    261324    <input type='hidden' name='wcbloat_wp_logo_url_disable' value='no'>
    262     <label><input type='checkbox' name='wcbloat_wp_logo_url_disable' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Change the Logo Link on the WordPress Login Page', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    263     <p><?php _e('By default, the WordPress login page displays the WordPress logo which is linking to WordPress.org site. After activating this option, the logo on the login page will be linking to your site\'s homepage.', 'disable-dashboard-for-woocommerce'); ?></p>
    264 <?php
     325    <label><input type='checkbox' name='wcbloat_wp_logo_url_disable' <?php
     326    checked( esc_attr( $value ), 'yes' );
     327    echo  wcbloat_is_pro_readonly() ;
     328    ?> value='yes'> <?php
     329    esc_attr_e( 'Change the Logo Link on the WordPress Login Page', 'disable-dashboard-for-woocommerce' );
     330    echo  wcbloat_is_pro_badge() ;
     331    ?></label>
     332    <p><?php
     333    _e( 'By default, the WordPress login page displays the WordPress logo which is linking to WordPress.org site. After activating this option, the logo on the login page will be linking to your site\'s homepage.', 'disable-dashboard-for-woocommerce' );
     334    ?></p>
     335<?php
    265336}
    266337
     
    268339function wcbloat_wp_logo_title_callback()
    269340{
    270     $value = get_option('wcbloat_wp_logo_title');
    271 ?>
     341    $value = get_option( 'wcbloat_wp_logo_title' );
     342    ?>
    272343    <input type='hidden' name='wcbloat_wp_logo_title' value='no'>
    273     <label><input type='checkbox' name='wcbloat_wp_logo_title' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Change the Logo title parameter on the WordPress Login Page', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    274     <p><?php _e('By default, the WordPress Logo displayed on the WordPress Login Page has a title parameter that says <code>Powered by WordPress</code>. After activating this option, it will match your Site Name.', 'disable-dashboard-for-woocommerce'); ?></p>
    275 <?php
     344    <label><input type='checkbox' name='wcbloat_wp_logo_title' <?php
     345    checked( esc_attr( $value ), 'yes' );
     346    echo  wcbloat_is_pro_readonly() ;
     347    ?> value='yes'> <?php
     348    esc_attr_e( 'Change the Logo title parameter on the WordPress Login Page', 'disable-dashboard-for-woocommerce' );
     349    echo  wcbloat_is_pro_badge() ;
     350    ?></label>
     351    <p><?php
     352    _e( 'By default, the WordPress Logo displayed on the WordPress Login Page has a title parameter that says <code>Powered by WordPress</code>. After activating this option, it will match your Site Name.', 'disable-dashboard-for-woocommerce' );
     353    ?></p>
     354<?php
    276355}
    277356
     
    279358function wcbloat_wp_language_select_disable_callback()
    280359{
    281     $value = get_option('wcbloat_wp_language_select_disable');
    282 ?>
     360    $value = get_option( 'wcbloat_wp_language_select_disable' );
     361    ?>
    283362    <input type='hidden' name='wcbloat_wp_language_select_disable' value='no'>
    284     <label><input type='checkbox' name='wcbloat_wp_language_select_disable' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Disable WordPress Login Language Switcher', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    285     <p><?php _e('This option will disable the language selector which allows users to switch languages from a dropdown on the login screen if more than one language is enabled on your WordPress installation.', 'disable-dashboard-for-woocommerce'); ?></p>
    286 <?php
    287 }
     363    <label><input type='checkbox' name='wcbloat_wp_language_select_disable' <?php
     364    checked( esc_attr( $value ), 'yes' );
     365    echo  wcbloat_is_pro_readonly() ;
     366    ?> value='yes'> <?php
     367    esc_attr_e( 'Disable WordPress Login Language Switcher', 'disable-dashboard-for-woocommerce' );
     368    echo  wcbloat_is_pro_badge() ;
     369    ?></label>
     370    <p><?php
     371    _e( 'This option will disable the language selector which allows users to switch languages from a dropdown on the login screen if more than one language is enabled on your WordPress installation.', 'disable-dashboard-for-woocommerce' );
     372    ?></p>
     373<?php
     374}
  • disable-dashboard-for-woocommerce/tags/3.2.11/includes/settings/class-disable-bloat-settings-performance.php

    r2943912 r2943924  
    11<?php
    22
    3 if (!defined('ABSPATH')) exit; // Exit if accessed directly
    4 
     3if ( !defined( 'ABSPATH' ) ) {
     4    exit;
     5}
     6// Exit if accessed directly
    57// Add sections and fields on Main settings screen
    68function wcbloat_performance_settings_init()
    79{
    8 
    9     // Section's icon
    10     add_settings_section(
    11         'wcbloat-performance-icon-section',
    12         '',
    13         'wcbloat_performance_icon_callback',
    14         'wcbloat-performance'
    15     );
    16 
    17     // Section's title and description
    18     add_settings_section(
    19         'wcbloat-site-performance-desc-section',
    20         esc_attr__('Site performance', 'disable-dashboard-for-woocommerce'),
    21         'wcbloat_site_performance_desc_callback',
    22         'wcbloat-performance'
    23     );
    24 
    25     // Speed up your site section
    26     add_settings_section(
    27         'wcbloat-performance-speed-section',
    28         esc_attr__('Speed up your site', 'disable-dashboard-for-woocommerce'),
    29         'wcbloat_performance_speed_section_callback',
    30         'wcbloat-performance'
    31     );
    32 
    33     // Disable Password Strength Meter
    34     add_settings_field(
    35         'wcbloat_password_meter_disable',
    36         'Password Strength Meter',
    37         'wcbloat_password_meter_disable_callback',
    38         'wcbloat-performance',
    39         'wcbloat-performance-speed-section'
    40     );
    41     register_setting(
    42         'wcbloat-performance-options',
    43         'wcbloat_password_meter_disable',
    44         array('sanitize_callback' => 'sanitize_key')
    45     );
    46 
    47     // Load comment script only when needed
    48     add_settings_field(
    49         'wcbloat_load_comment_scripts_when_needed',
    50         'Comments scripts',
    51         'wcbloat_load_comment_scripts_when_needed_callback',
    52         'wcbloat-performance',
    53         'wcbloat-performance-speed-section'
    54     );
    55     register_setting(
    56         'wcbloat-performance-options',
    57         'wcbloat_load_comment_scripts_when_needed',
    58         array('sanitize_callback' => 'sanitize_key')
    59     );
    60 
    61     // Prevent auto-linking URLs in comments
    62     add_settings_field(
    63         'wcbloat_prevent_linking_url_comments',
    64         'Auto-linking URLs in comments',
    65         'wcbloat_prevent_linking_url_comments_callback',
    66         'wcbloat-performance',
    67         'wcbloat-performance-speed-section'
    68     );
    69     register_setting(
    70         'wcbloat-performance-options',
    71         'wcbloat_prevent_linking_url_comments',
    72         array('sanitize_callback' => 'sanitize_key')
    73     );
    74 
    75     // Disable Dashicons
    76     add_settings_field(
    77         'wcbloat_disable_dashicons',
    78         'Disable Dashicons',
    79         'wcbloat_disable_dashicons_callback',
    80         'wcbloat-performance',
    81         'wcbloat-performance-speed-section'
    82     );
    83     register_setting(
    84         'wcbloat-performance-options',
    85         'wcbloat_disable_dashicons',
    86         array('sanitize_callback' => 'sanitize_key')
    87     );
    88 
    89     // Remove DNS prefetch to s.w.org PRO
    90     add_settings_field(
    91         'wcbloat_remove_dns_prefetch',
    92         'DNS prefetch to s.w.org',
    93         'wcbloat_remove_dns_prefetch_callback',
    94         'wcbloat-performance',
    95         'wcbloat-performance-speed-section'
    96     );
    97     register_setting(
    98         'wcbloat-performance-options',
    99         'wcbloat_remove_dns_prefetch',
    100         array('sanitize_callback' => 'sanitize_key')
    101     );
    102 
    103     // Disable jQuery Migrate PRO
    104     add_settings_field(
    105         'wcbloat_disable_jquery_migrate',
    106         'Disable jQuery Migrate',
    107         'wcbloat_disable_jquery_migrate_callback',
    108         'wcbloat-performance',
    109         'wcbloat-performance-speed-section'
    110     );
    111     register_setting(
    112         'wcbloat-performance-options',
    113         'wcbloat_disable_jquery_migrate',
    114         array('sanitize_callback' => 'sanitize_key')
    115     );
    116 
    117     // Disable Sidebar WordPress Widgets PRO
    118     add_settings_field(
    119         'wcbloat_wp_sidebar_widgets_disable',
    120         esc_attr__( 'Disable Sidebar WordPress Widgets', 'disable-dashboard-for-woocommerce' ),
    121         'wcbloat_wp_sidebar_widgets_disable_callback',
    122         'wcbloat-performance',
    123         'wcbloat-performance-speed-section' );
    124     register_setting(
    125         'wcbloat-performance-options',
    126         'wcbloat_wp_sidebar_widgets_disable',
    127         'validate_setting'
    128     );
    129 
    130     // Remove WordPress Meta Generator Tag PRO
    131     add_settings_field(
    132         'wcbloat_wp_meta_generator_disable',
    133         'WordPress & WooCommerce Meta Generator Tag',
    134         'wcbloat_wp_meta_generator_disable_callback',
    135         'wcbloat-performance',
    136         'wcbloat-performance-speed-section'
    137     );
    138     register_setting(
    139         'wcbloat-performance-options',
    140         'wcbloat_wp_meta_generator_disable',
    141         array('sanitize_callback' => 'sanitize_key')
    142     );
    143 
    144     // Remove emoji styles and scripts PRO
    145     add_settings_field(
    146         'wcbloat_remove_emoji_scripts',
    147         'Emoji styles and scripts',
    148         'wcbloat_remove_emoji_scripts_callback',
    149         'wcbloat-performance',
    150         'wcbloat-performance-speed-section'
    151     );
    152     register_setting(
    153         'wcbloat-performance-options',
    154         'wcbloat_remove_emoji_scripts',
    155         array('sanitize_callback' => 'sanitize_key')
    156     );
    157 
    158     // Disable wp-embed PRO
    159     add_settings_field(
    160         'wcbloat_disable_wp_embed',
    161         'Disable wp-embed',
    162         'wcbloat_disable_wp_embed_callback',
    163         'wcbloat-performance',
    164         'wcbloat-performance-speed-section'
    165     );
    166     register_setting(
    167         'wcbloat-performance-options',
    168         'wcbloat_disable_wp_embed',
    169         array('sanitize_callback' => 'sanitize_key')
    170     );
    171 
    172     // Remove unwanted scripts from header section
    173     add_settings_section(
    174         'wcbloat-site-performance-header-section',
    175         esc_attr__('Remove scripts from Header', 'disable-dashboard-for-woocommerce'),
    176         'wcbloat_site_performance_header_section_callback',
    177         'wcbloat-performance'
    178     );
    179 
    180     // Remove RSS Feed Links PRO
    181     add_settings_field(
    182         'wcbloat_remove_rss_links',
    183         'RSS Feed Links',
    184         'wcbloat_remove_rss_links_callback',
    185         'wcbloat-performance',
    186         'wcbloat-site-performance-header-section'
    187     );
    188     register_setting(
    189         'wcbloat-performance-options',
    190         'wcbloat_remove_rss_links',
    191         array('sanitize_callback' => 'sanitize_key')
    192     );
    193 
    194     // Disable the RSS feeds PRO
    195     add_settings_field(
    196         'wcbloat_disable_all_feeds',
    197         'RSS feeds',
    198         'wcbloat_disable_all_feeds_callback',
    199         'wcbloat-performance',
    200         'wcbloat-site-performance-header-section'
    201     );
    202     register_setting(
    203         'wcbloat-performance-options',
    204         'wcbloat_disable_all_feeds',
    205         array('sanitize_callback' => 'sanitize_key')
    206     );
    207 
    208     // Remove Feed Generator Tag PRO
    209     add_settings_field(
    210         'wcbloat_remove_feed_generator_tag',
    211         'Feed Generator Tag',
    212         'wcbloat_remove_feed_generator_tag_callback',
    213         'wcbloat-performance',
    214         'wcbloat-site-performance-header-section'
    215     );
    216     register_setting(
    217         'wcbloat-performance-options',
    218         'wcbloat_remove_feed_generator_tag',
    219         array('sanitize_callback' => 'sanitize_key')
    220     );
    221 
    222     // Remove Link to the WLW Manifest File PRO
    223     add_settings_field(
    224         'wcbloat_disable_wlw_link',
    225         'Windows Live Writer',
    226         'wcbloat_disable_wlw_link_callback',
    227         'wcbloat-performance',
    228         'wcbloat-site-performance-header-section'
    229     );
    230     register_setting(
    231         'wcbloat-performance-options',
    232         'wcbloat_disable_wlw_link',
    233         array('sanitize_callback' => 'sanitize_key')
    234     );
    235 
    236     // Remove RSD link PRO
    237     add_settings_field(
    238         'wcbloat_disable_rsd_link',
    239         'RSD Link',
    240         'wcbloat_disable_rsd_link_callback',
    241         'wcbloat-performance',
    242         'wcbloat-site-performance-header-section'
    243     );
    244     register_setting(
    245         'wcbloat-performance-options',
    246         'wcbloat_disable_rsd_link',
    247         array('sanitize_callback' => 'sanitize_key')
    248     );
    249 
    250     // Remove RSD link PRO
    251     add_settings_field(
    252         'wcbloat_disable_rsd_link',
    253         'RSD Link',
    254         'wcbloat_disable_rsd_link_callback',
    255         'wcbloat-performance',
    256         'wcbloat-site-performance-header-section'
    257     );
    258     register_setting(
    259         'wcbloat-performance-options',
    260         'wcbloat_disable_rsd_link',
    261         array('sanitize_callback' => 'sanitize_key')
    262     );
    263 
    264     // Remove Shortlink From HTTP Header PRO
    265     add_settings_field(
    266         'wcbloat_remove_shortlink',
    267         'Shortlink',
    268         'wcbloat_remove_shortlink_callback',
    269         'wcbloat-performance',
    270         'wcbloat-site-performance-header-section'
    271     );
    272     register_setting(
    273         'wcbloat-performance-options',
    274         'wcbloat_remove_shortlink',
    275         array('sanitize_callback' => 'sanitize_key')
    276     );
    277 
     10    // Section's icon
     11    add_settings_section(
     12        'wcbloat-performance-icon-section',
     13        '',
     14        'wcbloat_performance_icon_callback',
     15        'wcbloat-performance'
     16    );
     17    // Section's title and description
     18    add_settings_section(
     19        'wcbloat-site-performance-desc-section',
     20        esc_attr__( 'Site performance', 'disable-dashboard-for-woocommerce' ),
     21        'wcbloat_site_performance_desc_callback',
     22        'wcbloat-performance'
     23    );
     24    // Speed up your site section
     25    add_settings_section(
     26        'wcbloat-performance-speed-section',
     27        esc_attr__( 'Speed up your site', 'disable-dashboard-for-woocommerce' ),
     28        'wcbloat_performance_speed_section_callback',
     29        'wcbloat-performance'
     30    );
     31    // Disable Password Strength Meter
     32    add_settings_field(
     33        'wcbloat_password_meter_disable',
     34        'Password Strength Meter',
     35        'wcbloat_password_meter_disable_callback',
     36        'wcbloat-performance',
     37        'wcbloat-performance-speed-section'
     38    );
     39    register_setting( 'wcbloat-performance-options', 'wcbloat_password_meter_disable', array(
     40        'sanitize_callback' => 'sanitize_key',
     41    ) );
     42    // Load comment script only when needed
     43    add_settings_field(
     44        'wcbloat_load_comment_scripts_when_needed',
     45        'Comments scripts',
     46        'wcbloat_load_comment_scripts_when_needed_callback',
     47        'wcbloat-performance',
     48        'wcbloat-performance-speed-section'
     49    );
     50    register_setting( 'wcbloat-performance-options', 'wcbloat_load_comment_scripts_when_needed', array(
     51        'sanitize_callback' => 'sanitize_key',
     52    ) );
     53    // Prevent auto-linking URLs in comments
     54    add_settings_field(
     55        'wcbloat_prevent_linking_url_comments',
     56        'Auto-linking URLs in comments',
     57        'wcbloat_prevent_linking_url_comments_callback',
     58        'wcbloat-performance',
     59        'wcbloat-performance-speed-section'
     60    );
     61    register_setting( 'wcbloat-performance-options', 'wcbloat_prevent_linking_url_comments', array(
     62        'sanitize_callback' => 'sanitize_key',
     63    ) );
     64    // Disable Dashicons
     65    add_settings_field(
     66        'wcbloat_disable_dashicons',
     67        'Disable Dashicons',
     68        'wcbloat_disable_dashicons_callback',
     69        'wcbloat-performance',
     70        'wcbloat-performance-speed-section'
     71    );
     72    register_setting( 'wcbloat-performance-options', 'wcbloat_disable_dashicons', array(
     73        'sanitize_callback' => 'sanitize_key',
     74    ) );
     75    // Remove DNS prefetch to s.w.org PRO
     76    add_settings_field(
     77        'wcbloat_remove_dns_prefetch',
     78        'DNS prefetch to s.w.org',
     79        'wcbloat_remove_dns_prefetch_callback',
     80        'wcbloat-performance',
     81        'wcbloat-performance-speed-section'
     82    );
     83    register_setting( 'wcbloat-performance-options', 'wcbloat_remove_dns_prefetch', array(
     84        'sanitize_callback' => 'sanitize_key',
     85    ) );
     86    // Disable jQuery Migrate PRO
     87    add_settings_field(
     88        'wcbloat_disable_jquery_migrate',
     89        'Disable jQuery Migrate',
     90        'wcbloat_disable_jquery_migrate_callback',
     91        'wcbloat-performance',
     92        'wcbloat-performance-speed-section'
     93    );
     94    register_setting( 'wcbloat-performance-options', 'wcbloat_disable_jquery_migrate', array(
     95        'sanitize_callback' => 'sanitize_key',
     96    ) );
     97    // Disable Sidebar WordPress Widgets PRO
     98    add_settings_field(
     99        'wcbloat_wp_sidebar_widgets_disable',
     100        esc_attr__( 'Disable Sidebar WordPress Widgets', 'disable-dashboard-for-woocommerce' ),
     101        'wcbloat_wp_sidebar_widgets_disable_callback',
     102        'wcbloat-performance',
     103        'wcbloat-performance-speed-section'
     104    );
     105    register_setting( 'wcbloat-performance-options', 'wcbloat_wp_sidebar_widgets_disable', 'validate_setting' );
     106    // Remove WordPress Meta Generator Tag PRO
     107    add_settings_field(
     108        'wcbloat_wp_meta_generator_disable',
     109        'WordPress & WooCommerce Meta Generator Tag',
     110        'wcbloat_wp_meta_generator_disable_callback',
     111        'wcbloat-performance',
     112        'wcbloat-performance-speed-section'
     113    );
     114    register_setting( 'wcbloat-performance-options', 'wcbloat_wp_meta_generator_disable', array(
     115        'sanitize_callback' => 'sanitize_key',
     116    ) );
     117    // Remove emoji styles and scripts PRO
     118    add_settings_field(
     119        'wcbloat_remove_emoji_scripts',
     120        'Emoji styles and scripts',
     121        'wcbloat_remove_emoji_scripts_callback',
     122        'wcbloat-performance',
     123        'wcbloat-performance-speed-section'
     124    );
     125    register_setting( 'wcbloat-performance-options', 'wcbloat_remove_emoji_scripts', array(
     126        'sanitize_callback' => 'sanitize_key',
     127    ) );
     128    // Disable wp-embed PRO
     129    add_settings_field(
     130        'wcbloat_disable_wp_embed',
     131        'Disable wp-embed',
     132        'wcbloat_disable_wp_embed_callback',
     133        'wcbloat-performance',
     134        'wcbloat-performance-speed-section'
     135    );
     136    register_setting( 'wcbloat-performance-options', 'wcbloat_disable_wp_embed', array(
     137        'sanitize_callback' => 'sanitize_key',
     138    ) );
     139    // Remove unwanted scripts from header section
     140    add_settings_section(
     141        'wcbloat-site-performance-header-section',
     142        esc_attr__( 'Remove scripts from Header', 'disable-dashboard-for-woocommerce' ),
     143        'wcbloat_site_performance_header_section_callback',
     144        'wcbloat-performance'
     145    );
     146    // Remove RSS Feed Links PRO
     147    add_settings_field(
     148        'wcbloat_remove_rss_links',
     149        'RSS Feed Links',
     150        'wcbloat_remove_rss_links_callback',
     151        'wcbloat-performance',
     152        'wcbloat-site-performance-header-section'
     153    );
     154    register_setting( 'wcbloat-performance-options', 'wcbloat_remove_rss_links', array(
     155        'sanitize_callback' => 'sanitize_key',
     156    ) );
     157    // Disable the RSS feeds PRO
     158    add_settings_field(
     159        'wcbloat_disable_all_feeds',
     160        'RSS feeds',
     161        'wcbloat_disable_all_feeds_callback',
     162        'wcbloat-performance',
     163        'wcbloat-site-performance-header-section'
     164    );
     165    register_setting( 'wcbloat-performance-options', 'wcbloat_disable_all_feeds', array(
     166        'sanitize_callback' => 'sanitize_key',
     167    ) );
     168    // Remove Feed Generator Tag PRO
     169    add_settings_field(
     170        'wcbloat_remove_feed_generator_tag',
     171        'Feed Generator Tag',
     172        'wcbloat_remove_feed_generator_tag_callback',
     173        'wcbloat-performance',
     174        'wcbloat-site-performance-header-section'
     175    );
     176    register_setting( 'wcbloat-performance-options', 'wcbloat_remove_feed_generator_tag', array(
     177        'sanitize_callback' => 'sanitize_key',
     178    ) );
     179    // Remove Link to the WLW Manifest File PRO
     180    add_settings_field(
     181        'wcbloat_disable_wlw_link',
     182        'Windows Live Writer',
     183        'wcbloat_disable_wlw_link_callback',
     184        'wcbloat-performance',
     185        'wcbloat-site-performance-header-section'
     186    );
     187    register_setting( 'wcbloat-performance-options', 'wcbloat_disable_wlw_link', array(
     188        'sanitize_callback' => 'sanitize_key',
     189    ) );
     190    // Remove RSD link PRO
     191    add_settings_field(
     192        'wcbloat_disable_rsd_link',
     193        'RSD Link',
     194        'wcbloat_disable_rsd_link_callback',
     195        'wcbloat-performance',
     196        'wcbloat-site-performance-header-section'
     197    );
     198    register_setting( 'wcbloat-performance-options', 'wcbloat_disable_rsd_link', array(
     199        'sanitize_callback' => 'sanitize_key',
     200    ) );
     201    // Remove RSD link PRO
     202    add_settings_field(
     203        'wcbloat_disable_rsd_link',
     204        'RSD Link',
     205        'wcbloat_disable_rsd_link_callback',
     206        'wcbloat-performance',
     207        'wcbloat-site-performance-header-section'
     208    );
     209    register_setting( 'wcbloat-performance-options', 'wcbloat_disable_rsd_link', array(
     210        'sanitize_callback' => 'sanitize_key',
     211    ) );
     212    // Remove Shortlink From HTTP Header PRO
     213    add_settings_field(
     214        'wcbloat_remove_shortlink',
     215        'Shortlink',
     216        'wcbloat_remove_shortlink_callback',
     217        'wcbloat-performance',
     218        'wcbloat-site-performance-header-section'
     219    );
     220    register_setting( 'wcbloat-performance-options', 'wcbloat_remove_shortlink', array(
     221        'sanitize_callback' => 'sanitize_key',
     222    ) );
    278223}
    279224
    280225// Display the fields added before
    281 add_action('admin_init', 'wcbloat_performance_settings_init');
    282 
     226add_action( 'admin_init', 'wcbloat_performance_settings_init' );
    283227// Fields callbacks
    284 
    285228// Section's icon
    286229function wcbloat_performance_icon_callback()
    287230{
    288     _e('<span class="dashicons dashicons-admin-site-alt"></span>');
     231    _e( '<span class="dashicons dashicons-admin-site-alt"></span>' );
    289232}
    290233
     
    292235function wcbloat_site_performance_desc_callback()
    293236{
    294     _e('Page load time is very important for your visitors. To improve page load time, try to disable scripts, features, and unnecessary queries:<hr />', 'disable-dashboard-for-woocommerce');
     237    _e( 'Page load time is very important for your visitors. To improve page load time, try to disable scripts, features, and unnecessary queries:<hr />', 'disable-dashboard-for-woocommerce' );
    295238}
    296239
     
    298241function wcbloat_performance_speed_section_callback()
    299242{
    300     _e('Use the settings from this section to reduce page load time on the front-end of your WordPress site. Before disabling them, please make sure that you will not use any of these features - so they can be safely turned off.', 'disable-dashboard-for-woocommerce');
    301     _e ( wcbloat_buy_pro_bar() );
     243    _e( 'Use the settings from this section to reduce page load time on the front-end of your WordPress site. Before disabling them, please make sure that you will not use any of these features - so they can be safely turned off.', 'disable-dashboard-for-woocommerce' );
     244    _e( wcbloat_buy_pro_bar() );
    302245}
    303246
     
    305248function wcbloat_password_meter_disable_callback()
    306249{
    307     $value = get_option('wcbloat_password_meter_disable');
    308 ?>
     250    $value = get_option( 'wcbloat_password_meter_disable' );
     251    ?>
    309252    <input type='hidden' name='wcbloat_password_meter_disable' value='no'>
    310     <label><input type='checkbox' name='wcbloat_password_meter_disable' <?php checked(esc_attr($value), 'yes'); ?> value='yes'> <?php esc_attr_e('Disable Password Strength Meter', 'disable-dashboard-for-woocommerce'); ?></label>
    311     <p><?php _e('Removes the WordPress and WooCommerce password strength meter scripts (over 400 KB) from non-essential pages.', 'disable-dashboard-for-woocommerce'); ?></p>
    312 <?php
     253    <label><input type='checkbox' name='wcbloat_password_meter_disable' <?php
     254    checked( esc_attr( $value ), 'yes' );
     255    ?> value='yes'> <?php
     256    esc_attr_e( 'Disable Password Strength Meter', 'disable-dashboard-for-woocommerce' );
     257    ?></label>
     258    <p><?php
     259    _e( 'Removes the WordPress and WooCommerce password strength meter scripts (over 400 KB) from non-essential pages.', 'disable-dashboard-for-woocommerce' );
     260    ?></p>
     261<?php
    313262}
    314263
     
    316265function wcbloat_load_comment_scripts_when_needed_callback()
    317266{
    318     $value = get_option('wcbloat_load_comment_scripts_when_needed');
    319 ?>
     267    $value = get_option( 'wcbloat_load_comment_scripts_when_needed' );
     268    ?>
    320269    <input type='hidden' name='wcbloat_load_comment_scripts_when_needed' value='no'>
    321     <label><input type='checkbox' name='wcbloat_load_comment_scripts_when_needed' <?php checked(esc_attr($value), 'yes'); ?> value='yes'> <?php esc_attr_e('Load Comments script only when needed', 'disable-dashboard-for-woocommerce'); ?></label>
    322     <p><?php _e('By default, WordPress Comments javascript files are loaded everywhere on your site. This option will load the Comments script only when needed (on single posts and pages with existing comments).', 'disable-dashboard-for-woocommerce'); ?></p>
    323 <?php
     270    <label><input type='checkbox' name='wcbloat_load_comment_scripts_when_needed' <?php
     271    checked( esc_attr( $value ), 'yes' );
     272    ?> value='yes'> <?php
     273    esc_attr_e( 'Load Comments script only when needed', 'disable-dashboard-for-woocommerce' );
     274    ?></label>
     275    <p><?php
     276    _e( 'By default, WordPress Comments javascript files are loaded everywhere on your site. This option will load the Comments script only when needed (on single posts and pages with existing comments).', 'disable-dashboard-for-woocommerce' );
     277    ?></p>
     278<?php
    324279}
    325280
     
    327282function wcbloat_prevent_linking_url_comments_callback()
    328283{
    329     $value = get_option('wcbloat_prevent_linking_url_comments');
    330 ?>
     284    $value = get_option( 'wcbloat_prevent_linking_url_comments' );
     285    ?>
    331286    <input type='hidden' name='wcbloat_prevent_linking_url_comments' value='no'>
    332     <label><input type='checkbox' name='wcbloat_prevent_linking_url_comments' <?php checked(esc_attr($value), 'yes'); ?> value='yes'> <?php esc_attr_e('Prevent auto-linking URLs in comments', 'disable-dashboard-for-woocommerce'); ?></label>
    333     <p><?php _e('In a standard WordPress installation, adding clickable links to the comments is made on the fly while generating the page which may be time- and resource-consuming. This option will prevent auto-linking URLs in comments.', 'disable-dashboard-for-woocommerce'); ?></p>
    334 <?php
     287    <label><input type='checkbox' name='wcbloat_prevent_linking_url_comments' <?php
     288    checked( esc_attr( $value ), 'yes' );
     289    ?> value='yes'> <?php
     290    esc_attr_e( 'Prevent auto-linking URLs in comments', 'disable-dashboard-for-woocommerce' );
     291    ?></label>
     292    <p><?php
     293    _e( 'In a standard WordPress installation, adding clickable links to the comments is made on the fly while generating the page which may be time- and resource-consuming. This option will prevent auto-linking URLs in comments.', 'disable-dashboard-for-woocommerce' );
     294    ?></p>
     295<?php
    335296}
    336297
     
    338299function wcbloat_disable_dashicons_callback()
    339300{
    340     $value = get_option('wcbloat_disable_dashicons');
    341 ?>
     301    $value = get_option( 'wcbloat_disable_dashicons' );
     302    ?>
    342303    <input type='hidden' name='wcbloat_disable_dashicons' value='no'>
    343     <label><input type='checkbox' name='wcbloat_disable_dashicons' <?php checked(esc_attr($value), 'yes'); ?> value='yes'> <?php esc_attr_e('Disable WordPress Dashicons on the front-end', 'disable-dashboard-for-woocommerce'); ?></label>
    344     <p><?php _e('Dashicons add additional overhead to your site, slowing it down, especially on slower computers or mobile devices. Disabling dashicons can help reduce the total size of your page and improve your site\'s performance.', 'disable-dashboard-for-woocommerce'); ?></p>
    345 <?php
     304    <label><input type='checkbox' name='wcbloat_disable_dashicons' <?php
     305    checked( esc_attr( $value ), 'yes' );
     306    ?> value='yes'> <?php
     307    esc_attr_e( 'Disable WordPress Dashicons on the front-end', 'disable-dashboard-for-woocommerce' );
     308    ?></label>
     309    <p><?php
     310    _e( 'Dashicons add additional overhead to your site, slowing it down, especially on slower computers or mobile devices. Disabling dashicons can help reduce the total size of your page and improve your site\'s performance.', 'disable-dashboard-for-woocommerce' );
     311    ?></p>
     312<?php
    346313}
    347314
     
    349316function wcbloat_disable_jquery_migrate_callback()
    350317{
    351     $value = get_option('wcbloat_disable_jquery_migrate');
    352 ?>
     318    $value = get_option( 'wcbloat_disable_jquery_migrate' );
     319    ?>
    353320    <input type='hidden' name='wcbloat_disable_jquery_migrate' value='no'>
    354     <label><input type='checkbox' name='wcbloat_disable_jquery_migrate' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Disable jQuery Migrate', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    355     <p><?php _e('The jQuery Migrate was introduced in WordPress to provide backward compatibility for older jQuery code. However, in recent versions of WordPress, many of the compatibility issues have been resolved, so it is no longer necessary in most cases. Disabling jQuery Migrate can improve the performance of your WordPress website by reducing the amount of JavaScript code that needs to be loaded, and by reducing the number of warnings and error messages that are output to the browser console. Additionally, by disabling the plugin, you can avoid potential security vulnerabilities that may arise from using outdated and unsupported code.', 'disable-dashboard-for-woocommerce'); ?></p>
    356 <?php
     321    <label><input type='checkbox' name='wcbloat_disable_jquery_migrate' <?php
     322    checked( esc_attr( $value ), 'yes' );
     323    echo  wcbloat_is_pro_readonly() ;
     324    ?> value='yes'> <?php
     325    esc_attr_e( 'Disable jQuery Migrate', 'disable-dashboard-for-woocommerce' );
     326    echo  wcbloat_is_pro_badge() ;
     327    ?></label>
     328    <p><?php
     329    _e( 'The jQuery Migrate was introduced in WordPress to provide backward compatibility for older jQuery code. However, in recent versions of WordPress, many of the compatibility issues have been resolved, so it is no longer necessary in most cases. Disabling jQuery Migrate can improve the performance of your WordPress website by reducing the amount of JavaScript code that needs to be loaded, and by reducing the number of warnings and error messages that are output to the browser console. Additionally, by disabling the plugin, you can avoid potential security vulnerabilities that may arise from using outdated and unsupported code.', 'disable-dashboard-for-woocommerce' );
     330    ?></p>
     331<?php
    357332}
    358333
     
    360335function wcbloat_remove_dns_prefetch_callback()
    361336{
    362     $value = get_option('wcbloat_remove_dns_prefetch');
    363 ?>
     337    $value = get_option( 'wcbloat_remove_dns_prefetch' );
     338    ?>
    364339    <input type='hidden' name='wcbloat_remove_dns_prefetch' value='no'>
    365     <label><input type='checkbox' name='wcbloat_remove_dns_prefetch' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Remove DNS prefetch to s.w.org', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    366     <p><?php _e('DNS prefetching is an attempt to resolve domain names before a user tries to follow a link. Activating this option will remove DNS prefetch to s.w.org and may result in page load optimization.', 'disable-dashboard-for-woocommerce'); ?></p>
    367 <?php
     340    <label><input type='checkbox' name='wcbloat_remove_dns_prefetch' <?php
     341    checked( esc_attr( $value ), 'yes' );
     342    echo  wcbloat_is_pro_readonly() ;
     343    ?> value='yes'> <?php
     344    esc_attr_e( 'Remove DNS prefetch to s.w.org', 'disable-dashboard-for-woocommerce' );
     345    echo  wcbloat_is_pro_badge() ;
     346    ?></label>
     347    <p><?php
     348    _e( 'DNS prefetching is an attempt to resolve domain names before a user tries to follow a link. Activating this option will remove DNS prefetch to s.w.org and may result in page load optimization.', 'disable-dashboard-for-woocommerce' );
     349    ?></p>
     350<?php
    368351}
    369352
     
    371354function wcbloat_wp_sidebar_widgets_disable_callback()
    372355{
    373     $options = get_option('wcbloat_wp_sidebar_widgets_disable');   
    374     ?>
     356    $options = get_option( 'wcbloat_wp_sidebar_widgets_disable' );
     357    ?>
    375358<div class="wcbloat-select-unselect-buttons">
    376     <a <?php if ( wcbloat_fs()->is__premium_only() ) { if ( wcbloat_fs()->is_plan( 'pro' ) ) { _e('id="select-all"'); }} ?> class="button button-secondary"<?php echo wcbloat_is_pro_readonly();?>><?php esc_attr_e('Select / Deselect All', 'disable-dashboard-for-woocommerce'); ?></a>
     359    <a <?php
     360    ?> class="button button-secondary"<?php
     361    echo  wcbloat_is_pro_readonly() ;
     362    ?>><?php
     363    esc_attr_e( 'Select / Deselect All', 'disable-dashboard-for-woocommerce' );
     364    ?></a>
    377365</div>
    378366<table id="wcbloat-multi-checkbox-table">
    379367<tbody>
    380368  <tr>
    381     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('archives', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='archives'><?php esc_attr_e('Archives', 'disable-dashboard-for-woocommerce'); ?></td>
    382     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('audio', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='audio'><?php esc_attr_e('Audio', 'disable-dashboard-for-woocommerce'); ?></td>
    383     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('block', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='block'><?php esc_attr_e('Block', 'disable-dashboard-for-woocommerce'); ?></td>
     369    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     370    if ( !empty($options) ) {
     371        if ( in_array( 'archives', $options ) ) {
     372            esc_attr_e( 'checked' );
     373        }
     374    }
     375    echo  wcbloat_is_pro_readonly() ;
     376    ?> value='archives'><?php
     377    esc_attr_e( 'Archives', 'disable-dashboard-for-woocommerce' );
     378    ?></td>
     379    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     380    if ( !empty($options) ) {
     381        if ( in_array( 'audio', $options ) ) {
     382            esc_attr_e( 'checked' );
     383        }
     384    }
     385    echo  wcbloat_is_pro_readonly() ;
     386    ?> value='audio'><?php
     387    esc_attr_e( 'Audio', 'disable-dashboard-for-woocommerce' );
     388    ?></td>
     389    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     390    if ( !empty($options) ) {
     391        if ( in_array( 'block', $options ) ) {
     392            esc_attr_e( 'checked' );
     393        }
     394    }
     395    echo  wcbloat_is_pro_readonly() ;
     396    ?> value='block'><?php
     397    esc_attr_e( 'Block', 'disable-dashboard-for-woocommerce' );
     398    ?></td>
    384399</tr>
    385400<tr>
    386     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('calendar', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='calendar'><?php esc_attr_e('Calendar', 'disable-dashboard-for-woocommerce'); ?></td>
    387     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('categories', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='categories'><?php esc_attr_e('Categories', 'disable-dashboard-for-woocommerce'); ?></td>
    388     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('html', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='html'><?php esc_attr_e('Custom HTML', 'disable-dashboard-for-woocommerce'); ?></td>
     401    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     402    if ( !empty($options) ) {
     403        if ( in_array( 'calendar', $options ) ) {
     404            esc_attr_e( 'checked' );
     405        }
     406    }
     407    echo  wcbloat_is_pro_readonly() ;
     408    ?> value='calendar'><?php
     409    esc_attr_e( 'Calendar', 'disable-dashboard-for-woocommerce' );
     410    ?></td>
     411    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     412    if ( !empty($options) ) {
     413        if ( in_array( 'categories', $options ) ) {
     414            esc_attr_e( 'checked' );
     415        }
     416    }
     417    echo  wcbloat_is_pro_readonly() ;
     418    ?> value='categories'><?php
     419    esc_attr_e( 'Categories', 'disable-dashboard-for-woocommerce' );
     420    ?></td>
     421    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     422    if ( !empty($options) ) {
     423        if ( in_array( 'html', $options ) ) {
     424            esc_attr_e( 'checked' );
     425        }
     426    }
     427    echo  wcbloat_is_pro_readonly() ;
     428    ?> value='html'><?php
     429    esc_attr_e( 'Custom HTML', 'disable-dashboard-for-woocommerce' );
     430    ?></td>
    389431</tr>
    390432<tr>
    391     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('gallery', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='gallery'><?php esc_attr_e('Gallery', 'disable-dashboard-for-woocommerce'); ?></td>
    392     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('image', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='image'><?php esc_attr_e('Image', 'disable-dashboard-for-woocommerce'); ?></td>
    393     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('meta', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='meta'><?php esc_attr_e('Meta', 'disable-dashboard-for-woocommerce'); ?></td>
     433    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     434    if ( !empty($options) ) {
     435        if ( in_array( 'gallery', $options ) ) {
     436            esc_attr_e( 'checked' );
     437        }
     438    }
     439    echo  wcbloat_is_pro_readonly() ;
     440    ?> value='gallery'><?php
     441    esc_attr_e( 'Gallery', 'disable-dashboard-for-woocommerce' );
     442    ?></td>
     443    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     444    if ( !empty($options) ) {
     445        if ( in_array( 'image', $options ) ) {
     446            esc_attr_e( 'checked' );
     447        }
     448    }
     449    echo  wcbloat_is_pro_readonly() ;
     450    ?> value='image'><?php
     451    esc_attr_e( 'Image', 'disable-dashboard-for-woocommerce' );
     452    ?></td>
     453    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     454    if ( !empty($options) ) {
     455        if ( in_array( 'meta', $options ) ) {
     456            esc_attr_e( 'checked' );
     457        }
     458    }
     459    echo  wcbloat_is_pro_readonly() ;
     460    ?> value='meta'><?php
     461    esc_attr_e( 'Meta', 'disable-dashboard-for-woocommerce' );
     462    ?></td>
    394463</tr>
    395464<tr>
    396     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('navigation', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='navigation'><?php esc_attr_e('Navigation Menu', 'disable-dashboard-for-woocommerce'); ?></td>
    397     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('pages', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='pages'><?php esc_attr_e('Pages', 'disable-dashboard-for-woocommerce'); ?></td>
    398     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('rss', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='rss'><?php esc_attr_e('RSS', 'disable-dashboard-for-woocommerce'); ?></td>
     465    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     466    if ( !empty($options) ) {
     467        if ( in_array( 'navigation', $options ) ) {
     468            esc_attr_e( 'checked' );
     469        }
     470    }
     471    echo  wcbloat_is_pro_readonly() ;
     472    ?> value='navigation'><?php
     473    esc_attr_e( 'Navigation Menu', 'disable-dashboard-for-woocommerce' );
     474    ?></td>
     475    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     476    if ( !empty($options) ) {
     477        if ( in_array( 'pages', $options ) ) {
     478            esc_attr_e( 'checked' );
     479        }
     480    }
     481    echo  wcbloat_is_pro_readonly() ;
     482    ?> value='pages'><?php
     483    esc_attr_e( 'Pages', 'disable-dashboard-for-woocommerce' );
     484    ?></td>
     485    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     486    if ( !empty($options) ) {
     487        if ( in_array( 'rss', $options ) ) {
     488            esc_attr_e( 'checked' );
     489        }
     490    }
     491    echo  wcbloat_is_pro_readonly() ;
     492    ?> value='rss'><?php
     493    esc_attr_e( 'RSS', 'disable-dashboard-for-woocommerce' );
     494    ?></td>
    399495</tr>
    400496<tr>
    401     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('comments', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='comments'><?php esc_attr_e('Recent Comments', 'disable-dashboard-for-woocommerce'); ?></td>
    402     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('posts', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='posts'><?php esc_attr_e('Recent Posts', 'disable-dashboard-for-woocommerce'); ?></td>
    403     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('search', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='search'><?php esc_attr_e('Search', 'disable-dashboard-for-woocommerce'); ?></td>
     497    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     498    if ( !empty($options) ) {
     499        if ( in_array( 'comments', $options ) ) {
     500            esc_attr_e( 'checked' );
     501        }
     502    }
     503    echo  wcbloat_is_pro_readonly() ;
     504    ?> value='comments'><?php
     505    esc_attr_e( 'Recent Comments', 'disable-dashboard-for-woocommerce' );
     506    ?></td>
     507    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     508    if ( !empty($options) ) {
     509        if ( in_array( 'posts', $options ) ) {
     510            esc_attr_e( 'checked' );
     511        }
     512    }
     513    echo  wcbloat_is_pro_readonly() ;
     514    ?> value='posts'><?php
     515    esc_attr_e( 'Recent Posts', 'disable-dashboard-for-woocommerce' );
     516    ?></td>
     517    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     518    if ( !empty($options) ) {
     519        if ( in_array( 'search', $options ) ) {
     520            esc_attr_e( 'checked' );
     521        }
     522    }
     523    echo  wcbloat_is_pro_readonly() ;
     524    ?> value='search'><?php
     525    esc_attr_e( 'Search', 'disable-dashboard-for-woocommerce' );
     526    ?></td>
    404527</tr>
    405528<tr>
    406     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('tag', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='tag'><?php esc_attr_e('Tag Cloud', 'disable-dashboard-for-woocommerce'); ?></td>
    407     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('text', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='text'><?php esc_attr_e('Text', 'disable-dashboard-for-woocommerce'); ?></td>
    408     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('video', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='video'><?php esc_attr_e('Video', 'disable-dashboard-for-woocommerce'); ?></td>
     529    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     530    if ( !empty($options) ) {
     531        if ( in_array( 'tag', $options ) ) {
     532            esc_attr_e( 'checked' );
     533        }
     534    }
     535    echo  wcbloat_is_pro_readonly() ;
     536    ?> value='tag'><?php
     537    esc_attr_e( 'Tag Cloud', 'disable-dashboard-for-woocommerce' );
     538    ?></td>
     539    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     540    if ( !empty($options) ) {
     541        if ( in_array( 'text', $options ) ) {
     542            esc_attr_e( 'checked' );
     543        }
     544    }
     545    echo  wcbloat_is_pro_readonly() ;
     546    ?> value='text'><?php
     547    esc_attr_e( 'Text', 'disable-dashboard-for-woocommerce' );
     548    ?></td>
     549    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     550    if ( !empty($options) ) {
     551        if ( in_array( 'video', $options ) ) {
     552            esc_attr_e( 'checked' );
     553        }
     554    }
     555    echo  wcbloat_is_pro_readonly() ;
     556    ?> value='video'><?php
     557    esc_attr_e( 'Video', 'disable-dashboard-for-woocommerce' );
     558    ?></td>
    409559</tr>
    410560</tbody>
    411561</table>
    412     <p><?php echo wcbloat_is_pro_badge(); _e('WordPress by default comes with a lot of Dashboard widgets installed. They often are not used at all, but can add backend load and front-end load. Choose Dashboard Widgets you would like to disable for this site. The <strong>ones you choose will be disabled</strong>, and the <strong>ones that had not been selected will stay active</strong>.
    413 
    414 ', 'disable-dashboard-for-woocommerce'); ?></p>
    415 
    416     <?php
     562    <p><?php
     563    echo  wcbloat_is_pro_badge() ;
     564    _e( 'WordPress by default comes with a lot of Dashboard widgets installed. They often are not used at all, but can add backend load and front-end load. Choose Dashboard Widgets you would like to disable for this site. The <strong>ones you choose will be disabled</strong>, and the <strong>ones that had not been selected will stay active</strong>.
     565
     566', 'disable-dashboard-for-woocommerce' );
     567    ?></p>
     568
     569    <?php
    417570}
    418571
     
    420573function wcbloat_wp_meta_generator_disable_callback()
    421574{
    422     $value = get_option('wcbloat_wp_meta_generator_disable');
    423 ?>
     575    $value = get_option( 'wcbloat_wp_meta_generator_disable' );
     576    ?>
    424577    <input type='hidden' name='wcbloat_wp_meta_generator_disable' value='no'>
    425     <label><input type='checkbox' name='wcbloat_wp_meta_generator_disable' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Remove WordPress & WooCommerce Meta Generator Tag', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    426     <p><?php _e('Meta Generator Tag displays the WordPress & WooCommerce version number. Removing the meta generator tag protects you against attacks and may reduce your web page\'s size. Use this option to disable the Meta Tag generated by WordPress, WooCommerce, and many other plugins that hook up with the wp_generator action.', 'disable-dashboard-for-woocommerce'); ?></p>
    427 <?php
     578    <label><input type='checkbox' name='wcbloat_wp_meta_generator_disable' <?php
     579    checked( esc_attr( $value ), 'yes' );
     580    echo  wcbloat_is_pro_readonly() ;
     581    ?> value='yes'> <?php
     582    esc_attr_e( 'Remove WordPress & WooCommerce Meta Generator Tag', 'disable-dashboard-for-woocommerce' );
     583    echo  wcbloat_is_pro_badge() ;
     584    ?></label>
     585    <p><?php
     586    _e( 'Meta Generator Tag displays the WordPress & WooCommerce version number. Removing the meta generator tag protects you against attacks and may reduce your web page\'s size. Use this option to disable the Meta Tag generated by WordPress, WooCommerce, and many other plugins that hook up with the wp_generator action.', 'disable-dashboard-for-woocommerce' );
     587    ?></p>
     588<?php
    428589}
    429590
     
    431592function wcbloat_remove_emoji_scripts_callback()
    432593{
    433     $value = get_option('wcbloat_remove_emoji_scripts');
    434 ?>
     594    $value = get_option( 'wcbloat_remove_emoji_scripts' );
     595    ?>
    435596    <input type='hidden' name='wcbloat_remove_emoji_scripts' value='no'>
    436     <label><input type='checkbox' name='wcbloat_remove_emoji_scripts' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Remove emoji styles and scripts', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    437     <p><?php _e('Remove the code bloat used to add support for emojis in older browsers. Emoticons and emojis will still work in browsers that have built-in support for them.', 'disable-dashboard-for-woocommerce'); ?></p>
    438 <?php
     597    <label><input type='checkbox' name='wcbloat_remove_emoji_scripts' <?php
     598    checked( esc_attr( $value ), 'yes' );
     599    echo  wcbloat_is_pro_readonly() ;
     600    ?> value='yes'> <?php
     601    esc_attr_e( 'Remove emoji styles and scripts', 'disable-dashboard-for-woocommerce' );
     602    echo  wcbloat_is_pro_badge() ;
     603    ?></label>
     604    <p><?php
     605    _e( 'Remove the code bloat used to add support for emojis in older browsers. Emoticons and emojis will still work in browsers that have built-in support for them.', 'disable-dashboard-for-woocommerce' );
     606    ?></p>
     607<?php
    439608}
    440609
     
    442611function wcbloat_disable_wp_embed_callback()
    443612{
    444     $value = get_option('wcbloat_disable_wp_embed');
    445 ?>
     613    $value = get_option( 'wcbloat_disable_wp_embed' );
     614    ?>
    446615    <input type='hidden' name='wcbloat_disable_wp_embed' value='no'>
    447     <label><input type='checkbox' name='wcbloat_disable_wp_embed' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Disable wp-embed', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    448     <p><?php _e('Prevents the WordPress core feature known as wp-embed from loading on your website. The wp-embed feature allows you to embed videos, images, tweets, and other types of content from various platforms by pasting a URL into the WordPress editor. While this feature can be useful, it can also slow down your site\'s loading times, increase your server resources usage, and pose potential security risks.', 'disable-dashboard-for-woocommerce'); ?></p>
    449 <?php
     616    <label><input type='checkbox' name='wcbloat_disable_wp_embed' <?php
     617    checked( esc_attr( $value ), 'yes' );
     618    echo  wcbloat_is_pro_readonly() ;
     619    ?> value='yes'> <?php
     620    esc_attr_e( 'Disable wp-embed', 'disable-dashboard-for-woocommerce' );
     621    echo  wcbloat_is_pro_badge() ;
     622    ?></label>
     623    <p><?php
     624    _e( 'Prevents the WordPress core feature known as wp-embed from loading on your website. The wp-embed feature allows you to embed videos, images, tweets, and other types of content from various platforms by pasting a URL into the WordPress editor. While this feature can be useful, it can also slow down your site\'s loading times, increase your server resources usage, and pose potential security risks.', 'disable-dashboard-for-woocommerce' );
     625    ?></p>
     626<?php
    450627}
    451628
     
    453630function wcbloat_site_performance_header_section_callback()
    454631{
    455     _e('Remove unwanted scripts from the Header section of your site. The header section is used on all of your subpages and in most cases you do not need to load all the default scripts. Use the option below to turn them off.', 'disable-dashboard-for-woocommerce');
     632    _e( 'Remove unwanted scripts from the Header section of your site. The header section is used on all of your subpages and in most cases you do not need to load all the default scripts. Use the option below to turn them off.', 'disable-dashboard-for-woocommerce' );
    456633}
    457634
     
    459636function wcbloat_remove_rss_links_callback()
    460637{
    461     $value = get_option('wcbloat_remove_rss_links');
    462 ?>
     638    $value = get_option( 'wcbloat_remove_rss_links' );
     639    ?>
    463640    <input type='hidden' name='wcbloat_remove_rss_links' value='no'>
    464     <label><input type='checkbox' name='wcbloat_remove_rss_links' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Remove RSS Feed Links', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    465     <p><?php _e('If you do not use RSS feeds, you can safely turn them off without losing any functionality. Links to RSS Feeds will be removed from the plugin header, but the process of generating RSS feeds will still be active.', 'disable-dashboard-for-woocommerce'); ?></p>
    466 <?php
     641    <label><input type='checkbox' name='wcbloat_remove_rss_links' <?php
     642    checked( esc_attr( $value ), 'yes' );
     643    echo  wcbloat_is_pro_readonly() ;
     644    ?> value='yes'> <?php
     645    esc_attr_e( 'Remove RSS Feed Links', 'disable-dashboard-for-woocommerce' );
     646    echo  wcbloat_is_pro_badge() ;
     647    ?></label>
     648    <p><?php
     649    _e( 'If you do not use RSS feeds, you can safely turn them off without losing any functionality. Links to RSS Feeds will be removed from the plugin header, but the process of generating RSS feeds will still be active.', 'disable-dashboard-for-woocommerce' );
     650    ?></p>
     651<?php
    467652}
    468653
     
    470655function wcbloat_disable_all_feeds_callback()
    471656{
    472     $value = get_option('wcbloat_disable_all_feeds');
    473 ?>
     657    $value = get_option( 'wcbloat_disable_all_feeds' );
     658    ?>
    474659    <input type='hidden' name='wcbloat_disable_all_feeds' value='no'>
    475     <label><input type='checkbox' name='wcbloat_disable_all_feeds' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Disable all RSS feeds', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    476     <p><?php _e('You can also completely disable the RSS generation process by activating this option. If it is a feature that you do not plan to use, you can disable RSS Feeds.', 'disable-dashboard-for-woocommerce', 'disable-dashboard-for-woocommerce'); ?></p>
    477 <?php
     660    <label><input type='checkbox' name='wcbloat_disable_all_feeds' <?php
     661    checked( esc_attr( $value ), 'yes' );
     662    echo  wcbloat_is_pro_readonly() ;
     663    ?> value='yes'> <?php
     664    esc_attr_e( 'Disable all RSS feeds', 'disable-dashboard-for-woocommerce' );
     665    echo  wcbloat_is_pro_badge() ;
     666    ?></label>
     667    <p><?php
     668    _e( 'You can also completely disable the RSS generation process by activating this option. If it is a feature that you do not plan to use, you can disable RSS Feeds.', 'disable-dashboard-for-woocommerce', 'disable-dashboard-for-woocommerce' );
     669    ?></p>
     670<?php
    478671}
    479672
     
    481674function wcbloat_remove_feed_generator_tag_callback()
    482675{
    483     $value = get_option('wcbloat_remove_feed_generator_tag');
    484 ?>
     676    $value = get_option( 'wcbloat_remove_feed_generator_tag' );
     677    ?>
    485678    <input type='hidden' name='wcbloat_remove_feed_generator_tag' value='no'>
    486     <label><input type='checkbox' name='wcbloat_remove_feed_generator_tag' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Remove the Generator Tag From RSS Feeds', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    487     <p><?php _e('This option will Remove the Generator Tag From RSS Feeds', 'disable-dashboard-for-woocommerce', 'disable-dashboard-for-woocommerce'); ?></p>
    488 <?php
     679    <label><input type='checkbox' name='wcbloat_remove_feed_generator_tag' <?php
     680    checked( esc_attr( $value ), 'yes' );
     681    echo  wcbloat_is_pro_readonly() ;
     682    ?> value='yes'> <?php
     683    esc_attr_e( 'Remove the Generator Tag From RSS Feeds', 'disable-dashboard-for-woocommerce' );
     684    echo  wcbloat_is_pro_badge() ;
     685    ?></label>
     686    <p><?php
     687    _e( 'This option will Remove the Generator Tag From RSS Feeds', 'disable-dashboard-for-woocommerce', 'disable-dashboard-for-woocommerce' );
     688    ?></p>
     689<?php
    489690}
    490691
     
    492693function wcbloat_disable_wlw_link_callback()
    493694{
    494     $value = get_option('wcbloat_disable_wlw_link');
    495 ?>
     695    $value = get_option( 'wcbloat_disable_wlw_link' );
     696    ?>
    496697    <input type='hidden' name='wcbloat_disable_wlw_link' value='no'>
    497     <label><input type='checkbox' name='wcbloat_disable_wlw_link' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Remove Link to the Windows Live Writer Manifest File', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    498     <p><?php _e('If are not using software called Windows Live Writer, you can safely turn off this feature that is added to your header by default.', 'disable-dashboard-for-woocommerce', 'disable-dashboard-for-woocommerce'); ?></p>
    499 <?php
     698    <label><input type='checkbox' name='wcbloat_disable_wlw_link' <?php
     699    checked( esc_attr( $value ), 'yes' );
     700    echo  wcbloat_is_pro_readonly() ;
     701    ?> value='yes'> <?php
     702    esc_attr_e( 'Remove Link to the Windows Live Writer Manifest File', 'disable-dashboard-for-woocommerce' );
     703    echo  wcbloat_is_pro_badge() ;
     704    ?></label>
     705    <p><?php
     706    _e( 'If are not using software called Windows Live Writer, you can safely turn off this feature that is added to your header by default.', 'disable-dashboard-for-woocommerce', 'disable-dashboard-for-woocommerce' );
     707    ?></p>
     708<?php
    500709}
    501710
     
    503712function wcbloat_disable_rsd_link_callback()
    504713{
    505     $value = get_option('wcbloat_disable_rsd_link');
    506 ?>
     714    $value = get_option( 'wcbloat_disable_rsd_link' );
     715    ?>
    507716    <input type='hidden' name='wcbloat_disable_rsd_link' value='no'>
    508     <label><input type='checkbox' name='wcbloat_disable_rsd_link' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Remove RSD link', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    509     <p><?php _e('RSD link is a tag that is added to your Header by default. The RSD link is used by software blog clients. If you access your site admin panel from the browser then it is safe for you to remove the RSD Link.', 'disable-dashboard-for-woocommerce', 'disable-dashboard-for-woocommerce'); ?></p>
    510 <?php
     717    <label><input type='checkbox' name='wcbloat_disable_rsd_link' <?php
     718    checked( esc_attr( $value ), 'yes' );
     719    echo  wcbloat_is_pro_readonly() ;
     720    ?> value='yes'> <?php
     721    esc_attr_e( 'Remove RSD link', 'disable-dashboard-for-woocommerce' );
     722    echo  wcbloat_is_pro_badge() ;
     723    ?></label>
     724    <p><?php
     725    _e( 'RSD link is a tag that is added to your Header by default. The RSD link is used by software blog clients. If you access your site admin panel from the browser then it is safe for you to remove the RSD Link.', 'disable-dashboard-for-woocommerce', 'disable-dashboard-for-woocommerce' );
     726    ?></p>
     727<?php
    511728}
    512729
     
    514731function wcbloat_remove_shortlink_callback()
    515732{
    516     $value = get_option('wcbloat_remove_shortlink');
    517 ?>
     733    $value = get_option( 'wcbloat_remove_shortlink' );
     734    ?>
    518735    <input type='hidden' name='wcbloat_remove_shortlink' value='no'>
    519     <label><input type='checkbox' name='wcbloat_remove_shortlink' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Remove Shortlink From HTTP Header', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    520     <p><?php _e('Shortlink is the shorter version of the post or page URL. Shortlink (enabled in WordPress by default) creates a separate request on every page.', 'disable-dashboard-for-woocommerce', 'disable-dashboard-for-woocommerce'); ?></p>
    521 <?php
    522 }
     736    <label><input type='checkbox' name='wcbloat_remove_shortlink' <?php
     737    checked( esc_attr( $value ), 'yes' );
     738    echo  wcbloat_is_pro_readonly() ;
     739    ?> value='yes'> <?php
     740    esc_attr_e( 'Remove Shortlink From HTTP Header', 'disable-dashboard-for-woocommerce' );
     741    echo  wcbloat_is_pro_badge() ;
     742    ?></label>
     743    <p><?php
     744    _e( 'Shortlink is the shorter version of the post or page URL. Shortlink (enabled in WordPress by default) creates a separate request on every page.', 'disable-dashboard-for-woocommerce', 'disable-dashboard-for-woocommerce' );
     745    ?></p>
     746<?php
     747}
  • disable-dashboard-for-woocommerce/tags/3.2.11/readme.txt

    r2943912 r2943924  
    22Contributors: disablebloat
    33Tags: WooCommerce, disable WooCommerce admin, remove bloat, debloat, unbloat, Yoast SEO, white label, speed up WordPress
    4 Stable tag: 3.2.10
     4Stable tag: 3.2.11
    55Requires at least: 5.0
    66Tested up to: 6.3
     
    259259
    260260== Changelog ==
     261
     262= [3.2.11] - 2023-07-27 =
     263
     264- Fixed: i18n phrases for translation
    261265
    262266= [3.2.10] - 2023-07-26 =
  • disable-dashboard-for-woocommerce/trunk/disable-dashboard-for-woocommerce.php

    r2943912 r2943924  
    55 * Plugin URI: https://disablebloat.com/
    66 * Description: All-in-One solution to speed up your WordPress & WooCommerce. Remove unnecessary features and make your site faster and cleaner.
    7  * Version: 3.2.10
     7 * Version: 3.2.11
    88 * Author: Disable Bloat
    99 * Developer: Disable Bloat
     
    1919 * License URI: http://www.gnu.org/licenses/gpl-3.0.html
    2020 */
    21 
    22 if (!defined('ABSPATH')) {
     21if ( !defined( 'ABSPATH' ) ) {
    2322    exit;
    2423}
    2524
    26 if (function_exists('wcbloat_fs')) {
    27     wcbloat_fs()->set_basename(false, __FILE__);
     25if ( function_exists( 'wcbloat_fs' ) ) {
     26    wcbloat_fs()->set_basename( false, __FILE__ );
    2827} else {
    2928    // DO NOT REMOVE THIS IF, IT IS ESSENTIAL FOR THE `function_exists` CALL ABOVE TO PROPERLY WORK.
    30 
    31     if (!function_exists('wcbloat_fs')) {
     29   
     30    if ( !function_exists( 'wcbloat_fs' ) ) {
    3231        // Actual Freemius integration snippet
    33 
    34         if (!function_exists('wcbloat_fs')) {
     32       
     33        if ( !function_exists( 'wcbloat_fs' ) ) {
    3534            // Create a helper function for easy SDK access.
    3635            function wcbloat_fs()
    3736            {
    38                 global  $wcbloat_fs;
    39 
    40                 if (!isset($wcbloat_fs)) {
     37                global  $wcbloat_fs ;
     38               
     39                if ( !isset( $wcbloat_fs ) ) {
    4140                    // Activate multisite network integration.
    42                     if (!defined('WP_FS__PRODUCT_10157_MULTISITE')) {
    43                         define('WP_FS__PRODUCT_10157_MULTISITE', true);
     41                    if ( !defined( 'WP_FS__PRODUCT_10157_MULTISITE' ) ) {
     42                        define( 'WP_FS__PRODUCT_10157_MULTISITE', true );
    4443                    }
    4544                    // Include Freemius SDK.
    46                     require_once dirname(__FILE__) . '/includes/freemius/start.php';
    47                     $wcbloat_fs = fs_dynamic_init(array(
     45                    require_once dirname( __FILE__ ) . '/includes/freemius/start.php';
     46                    $wcbloat_fs = fs_dynamic_init( array(
    4847                        'id'             => '10157',
    4948                        'slug'           => 'disable-dashboard-for-woocommerce',
     
    5150                        'type'           => 'plugin',
    5251                        'public_key'     => 'pk_16f665643a809fd13e01f8a3d1381',
    53                         'is_premium'     => true,
     52                        'is_premium'     => false,
    5453                        'premium_suffix' => 'PRO',
    5554                        'has_addons'     => false,
    5655                        'has_paid_plans' => true,
    5756                        'menu'           => array(
    58                             'contact' => false,
    59                             'support' => false,
    60                             'account' => false,
    61                             'pricing' => false,
    62                         ),
     57                        'contact' => false,
     58                        'support' => false,
     59                        'account' => false,
     60                        'pricing' => false,
     61                    ),
    6362                        'pricing'        => false,
    64                         'anonymous_mode' => !function_exists('is_anonymous_mode_disabled__premium_only') || !is_anonymous_mode_disabled__premium_only(),
    65                         'secret_key'          => 'sk_29&*CUAZ^AKR8gvgAAPAB*p]o8;il',
    66 
    67                     ));
     63                        'anonymous_mode' => !function_exists( 'is_anonymous_mode_disabled__premium_only' ) || !is_anonymous_mode_disabled__premium_only(),
     64                        'is_live'        => true,
     65                    ) );
    6866                }
    69 
     67               
    7068                return $wcbloat_fs;
    7169            }
    72 
     70           
    7371            // Init Freemius.
    7472            wcbloat_fs();
    7573            // Signal that SDK was initiated.
    76             do_action('wcbloat_fs_loaded');
     74            do_action( 'wcbloat_fs_loaded' );
    7775        }
    78 
    79         if (function_exists('fs_override_i18n')) {
    80             fs_override_i18n(array(
    81                 'opt-in' => __('', 'disable-dashboard-for-woocommerce'),
    82             ), 'disable-dashboard-for-woocommerce');
     76       
     77        if ( function_exists( 'fs_override_i18n' ) ) {
     78            fs_override_i18n( array(
     79                'opt-in' => __( '', 'disable-dashboard-for-woocommerce' ),
     80            ), 'disable-dashboard-for-woocommerce' );
    8381        }
    84         wcbloat_fs()->add_filter('default_to_anonymous_feedback', '__return_true');
    85         wcbloat_fs()->add_filter('hide_freemius_powered_by', '__return_true');
    86         wcbloat_fs()->add_filter('hide_billing_and_payments_info', '__return_true');
     82        wcbloat_fs()->add_filter( 'default_to_anonymous_feedback', '__return_true' );
     83        wcbloat_fs()->add_filter( 'hide_freemius_powered_by', '__return_true' );
     84        wcbloat_fs()->add_filter( 'hide_billing_and_payments_info', '__return_true' );
    8785        // Opt-In Icon Customization
    8886        function wcbloat_custom_plugin_icon()
    8987        {
    90             return dirname(__FILE__) . '/assets/img/disable-dashboard-for-woocommerce.png';
     88            return dirname( __FILE__ ) . '/assets/img/disable-dashboard-for-woocommerce.png';
    9189        }
    92 
    93         wcbloat_fs()->add_filter('plugin_icon', 'wcbloat_custom_plugin_icon');
     90       
     91        wcbloat_fs()->add_filter( 'plugin_icon', 'wcbloat_custom_plugin_icon' );
    9492        // Freemius END
    9593        // load plugin text domain
    9694        function wcbloat_init()
    9795        {
    98             load_plugin_textdomain('disable-dashboard-for-woocommerce', false, dirname(plugin_basename(__FILE__)) . '/languages');
     96            load_plugin_textdomain( 'disable-dashboard-for-woocommerce', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
    9997        }
    100 
    101         add_action('plugins_loaded', 'wcbloat_init');
     98       
     99        add_action( 'plugins_loaded', 'wcbloat_init' );
    102100        // Links on Plugins screen
    103         function wcbloat_action_links($links)
     101        function wcbloat_action_links( $links )
    104102        {
    105             $custom_links = ['<a href="' . admin_url('options-general.php?page=disable-bloat') . '">' . __('Settings') . '</a>'];
    106 
    107             if (!wcbloat_fs()->is_premium()) {
    108                 $custom_links[] = '<a href="https://disablebloat.com/?utm_source=plugins_list&utm_medium=referral&utm_campaign=Plugin+links" target="_blank"><b>' . __('Upgrade', 'disable-dashboard-for-woocommerce') . '</b></a>';
     103            $custom_links = [ '<a href="' . admin_url( 'options-general.php?page=disable-bloat' ) . '">' . __( 'Settings' ) . '</a>' ];
     104            if ( !wcbloat_fs()->is_premium() ) {
     105                $custom_links[] = '<a href="https://disablebloat.com/?utm_source=plugins_list&utm_medium=referral&utm_campaign=Plugin+links" target="_blank"><b>' . __( 'Upgrade', 'disable-dashboard-for-woocommerce' ) . '</b></a>';
    109106            }
    110 
    111             if (wcbloat_fs()->is_plan('pro')) {
    112                 $custom_links[] = sprintf(
    113                     '<a href="%1$s">%2$s</a>',
    114                     esc_url(wcbloat_fs()->get_account_url()),
    115                     __('My Account', 'disable-dashboard-for-woocommerce')
    116                 );
     107            if ( wcbloat_fs()->is_plan( 'pro' ) ) {
     108                $custom_links[] = sprintf( '<a href="%1$s">%2$s</a>', esc_url( wcbloat_fs()->get_account_url() ), __( 'My Account', 'disable-dashboard-for-woocommerce' ) );
    117109            }
    118 
    119             return array_merge($custom_links, $links);
     110            return array_merge( $custom_links, $links );
    120111        }
    121 
    122         add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'wcbloat_action_links');
     112       
     113        add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'wcbloat_action_links' );
    123114    }
    124 
     115   
    125116    // Add CSS and JS to the plugin settings screens
    126117    function wcbloat_custom_wp_admin_assets()
    127118    {
    128         $page = isset($_GET['page']) ? $_GET['page'] : '';
    129 
    130         if ($page === 'disable-bloat') {
    131             wp_enqueue_style('wcbloat_wp_admin_css', plugin_dir_url(__FILE__) . 'assets/css/disable-bloat-admin-style.css');
    132             wp_enqueue_script('wcbloat_wp_admin_js', plugin_dir_url(__FILE__) . 'assets/js/disable-bloat-admin.js');
     119        $page = ( isset( $_GET['page'] ) ? $_GET['page'] : '' );
     120       
     121        if ( $page === 'disable-bloat' ) {
     122            wp_enqueue_style( 'wcbloat_wp_admin_css', plugin_dir_url( __FILE__ ) . 'assets/css/disable-bloat-admin-style.css' );
     123            wp_enqueue_script( 'wcbloat_wp_admin_js', plugin_dir_url( __FILE__ ) . 'assets/js/disable-bloat-admin.js' );
    133124        }
     125   
    134126    }
    135 
    136     add_action('admin_enqueue_scripts', 'wcbloat_custom_wp_admin_assets');
    137 
     127   
     128    add_action( 'admin_enqueue_scripts', 'wcbloat_custom_wp_admin_assets' );
    138129    // Include WooCommerce integration
    139130    require_once 'includes/functions/disable-bloat-woocommerce.php';
    140 
    141131    // Include functions files
    142132    require_once 'includes/functions/disable-bloat-functions_free.php';
    143 
    144     if (wcbloat_fs()->is__premium_only()) {
    145         if (wcbloat_fs()->is_plan('pro')) {
    146             require_once 'includes/functions/disable-bloat-functions_pro__premium_only.php';
    147         }
    148     }
    149 
    150133    // Include Options pages
    151134    require_once 'includes/settings/class-disable-bloat-settings.php';
    152 
    153135    // Include Uninstall Cleanup code
    154136    require_once 'includes/functions/disable-bloat-uninstall-cleanup.php';
    155 
    156137    // Compatibility with WooCommerce HPOS (Custom order tables) - only if WooCommmerce is active
    157     if (wcbloat_is_woo_active()) {
    158         add_action('before_woocommerce_init', function () {
    159             if (class_exists(\Automattic\WooCommerce\Utilities\FeaturesUtil::class)) {
    160                 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility('custom_order_tables', __FILE__, true);
     138    if ( wcbloat_is_woo_active() ) {
     139        add_action( 'before_woocommerce_init', function () {
     140            if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
     141                \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
    161142            }
    162         });
     143        } );
    163144    }
    164 
    165145    // MAIN PLUGIN FILE END
    166146    // DO NOT REMOVE THE BRACKET BELOW, AS IT IS NEEDED FOR THE MECHANISM OF AUTO DEACTIVATING THE FREE VERSION DURING PRO ACTIVATION:
  • disable-dashboard-for-woocommerce/trunk/includes/settings/class-disable-bloat-settings-admin.php

    r2943912 r2943924  
    11<?php
    22
    3 if (!defined('ABSPATH')) exit; // Exit if accessed directly
    4 
     3if ( !defined( 'ABSPATH' ) ) {
     4    exit;
     5}
     6// Exit if accessed directly
    57// Add sections and fields on Main settings screen
    68function wcbloat_admin_settings_init()
    79{
    8 
    9     // Section's icon
    10     add_settings_section(
    11         'wcbloat-admin-desc-icon-section',
    12         '',
    13         'wcbloat_admin_desc_icon_callback',
    14         'wcbloat-admin'
    15     );
    16 
    17     // Section's title and description
    18     add_settings_section(
    19         'wcbloat-admin-desc-section',
    20         esc_attr__('Admin panel optimization', 'disable-dashboard-for-woocommerce'),
    21         'wcbloat_admin_desc_callback',
    22         'wcbloat-admin'
    23     );
    24 
    25     // Clean admin interface section
    26     add_settings_section(
    27         'wcbloat_clean_admin_section',
    28         esc_attr__('Clean admin interface', 'disable-dashboard-for-woocommerce'),
    29         'wcbloat_clean_admin_desc_section_callback',
    30         'wcbloat-admin'
    31     );
    32 
    33     // Hide update notice for non-admin users
    34     add_settings_field(
    35         'wcbloat_wp_update_nag_disable',
    36         'Hide update notice for non-admin users',
    37         'wcbloat_wp_update_nag_disable_callback',
    38         'wcbloat-admin',
    39         'wcbloat_clean_admin_section'
    40     );
    41     register_setting(
    42         'wcbloat-admin-options',
    43         'wcbloat_wp_update_nag_disable',
    44         array('sanitize_callback' => 'sanitize_key')
    45     );
    46 
    47     // Disable Dashboard widgets PRO
    48     add_settings_field(
    49         'wcbloat_wp_dashboard_widgets_disable',
    50         esc_attr__( 'Disable WordPress Dashboard widgets', 'disable-dashboard-for-woocommerce' ),
    51         'wcbloat_wp_dashboard_widgets_disable_callback',
    52         'wcbloat-admin',
    53         'wcbloat_clean_admin_section' );
    54     register_setting(
    55         'wcbloat-admin-options',
    56         'wcbloat_wp_dashboard_widgets_disable',
    57         'validate_setting'
    58     );
    59 
    60     // Remove the WordPress logo ("W") from the admin bar PRO
    61     add_settings_field(
    62         'wcbloat_w_logo_disable',
    63         'WordPress logo in the admin bar',
    64         'wcbloat_w_logo_disable_callback',
    65         'wcbloat-admin',
    66         'wcbloat_clean_admin_section'
    67     );
    68     register_setting(
    69         'wcbloat-admin-options',
    70         'wcbloat_w_logo_disable',
    71         array('sanitize_callback' => 'sanitize_key')
    72     );
    73 
    74     // Remove admin footer text PRO
    75     add_settings_field(
    76         'wcbloat_wp_footer_disable',
    77         'Admin footer text',
    78         'wcbloat_wp_footer_disable_callback',
    79         'wcbloat-admin',
    80         'wcbloat_clean_admin_section'
    81     );
    82     register_setting(
    83         'wcbloat-admin-options',
    84         'wcbloat_wp_footer_disable',
    85         array('sanitize_callback' => 'sanitize_key')
    86     );
    87 
    88     // WordPress login page section
    89     add_settings_section(
    90         'wcbloat-admin-wp-login-page-section',
    91         esc_attr__('WordPress login page', 'disable-dashboard-for-woocommerce'),
    92         'wcbloat_admin_wp_login_page_section_callback',
    93         'wcbloat-admin'
    94     );
    95 
    96     // Hide WordPress logo on the WordPress Login Page PRO
    97     add_settings_field(
    98         'wcbloat_hide_wp_logo_on_login_page',
    99         'Hide WordPress logo on the Login Page',
    100         'wcbloat_hide_wp_logo_on_login_page_callback',
    101         'wcbloat-admin',
    102         'wcbloat-admin-wp-login-page-section'
    103     );
    104     register_setting(
    105         'wcbloat-admin-options',
    106         'wcbloat_hide_wp_logo_on_login_page',
    107         array('sanitize_callback' => 'sanitize_key')
    108     );
    109 
    110     // Change the Logo URL on the WordPress Login Page PRO
    111     add_settings_field(
    112         'wcbloat_wp_logo_url_disable',
    113         'Change the Logo Link',
    114         'wcbloat_wp_logo_url_disable_callback',
    115         'wcbloat-admin',
    116         'wcbloat-admin-wp-login-page-section'
    117     );
    118     register_setting(
    119         'wcbloat-admin-options',
    120         'wcbloat_wp_logo_url_disable',
    121         array('sanitize_callback' => 'sanitize_key')
    122     );
    123 
    124     // Change the Logo title the WordPress Login Page PRO
    125     add_settings_field(
    126         'wcbloat_wp_logo_title',
    127         'Change the Logo title parameter',
    128         'wcbloat_wp_logo_title_callback',
    129         'wcbloat-admin',
    130         'wcbloat-admin-wp-login-page-section'
    131     );
    132     register_setting(
    133         'wcbloat-admin-options',
    134         'wcbloat_wp_logo_title',
    135         array('sanitize_callback' => 'sanitize_key')
    136     );
    137 
    138     // Disable WordPress Login Language Switcher PRO
    139     add_settings_field(
    140         'wcbloat_wp_language_select_disable',
    141         'Disable WordPress Login Language Switcher',
    142         'wcbloat_wp_language_select_disable_callback',
    143         'wcbloat-admin',
    144         'wcbloat-admin-wp-login-page-section'
    145     );
    146     register_setting(
    147         'wcbloat-admin-options',
    148         'wcbloat_wp_language_select_disable',
    149         array('sanitize_callback' => 'sanitize_key')
    150     );
     10    // Section's icon
     11    add_settings_section(
     12        'wcbloat-admin-desc-icon-section',
     13        '',
     14        'wcbloat_admin_desc_icon_callback',
     15        'wcbloat-admin'
     16    );
     17    // Section's title and description
     18    add_settings_section(
     19        'wcbloat-admin-desc-section',
     20        esc_attr__( 'Admin panel optimization', 'disable-dashboard-for-woocommerce' ),
     21        'wcbloat_admin_desc_callback',
     22        'wcbloat-admin'
     23    );
     24    // Clean admin interface section
     25    add_settings_section(
     26        'wcbloat_clean_admin_section',
     27        esc_attr__( 'Clean admin interface', 'disable-dashboard-for-woocommerce' ),
     28        'wcbloat_clean_admin_desc_section_callback',
     29        'wcbloat-admin'
     30    );
     31    // Hide update notice for non-admin users
     32    add_settings_field(
     33        'wcbloat_wp_update_nag_disable',
     34        'Hide update notice for non-admin users',
     35        'wcbloat_wp_update_nag_disable_callback',
     36        'wcbloat-admin',
     37        'wcbloat_clean_admin_section'
     38    );
     39    register_setting( 'wcbloat-admin-options', 'wcbloat_wp_update_nag_disable', array(
     40        'sanitize_callback' => 'sanitize_key',
     41    ) );
     42    // Disable Dashboard widgets PRO
     43    add_settings_field(
     44        'wcbloat_wp_dashboard_widgets_disable',
     45        esc_attr__( 'Disable WordPress Dashboard widgets', 'disable-dashboard-for-woocommerce' ),
     46        'wcbloat_wp_dashboard_widgets_disable_callback',
     47        'wcbloat-admin',
     48        'wcbloat_clean_admin_section'
     49    );
     50    register_setting( 'wcbloat-admin-options', 'wcbloat_wp_dashboard_widgets_disable', 'validate_setting' );
     51    // Remove the WordPress logo ("W") from the admin bar PRO
     52    add_settings_field(
     53        'wcbloat_w_logo_disable',
     54        'WordPress logo in the admin bar',
     55        'wcbloat_w_logo_disable_callback',
     56        'wcbloat-admin',
     57        'wcbloat_clean_admin_section'
     58    );
     59    register_setting( 'wcbloat-admin-options', 'wcbloat_w_logo_disable', array(
     60        'sanitize_callback' => 'sanitize_key',
     61    ) );
     62    // Remove admin footer text PRO
     63    add_settings_field(
     64        'wcbloat_wp_footer_disable',
     65        'Admin footer text',
     66        'wcbloat_wp_footer_disable_callback',
     67        'wcbloat-admin',
     68        'wcbloat_clean_admin_section'
     69    );
     70    register_setting( 'wcbloat-admin-options', 'wcbloat_wp_footer_disable', array(
     71        'sanitize_callback' => 'sanitize_key',
     72    ) );
     73    // WordPress login page section
     74    add_settings_section(
     75        'wcbloat-admin-wp-login-page-section',
     76        esc_attr__( 'WordPress login page', 'disable-dashboard-for-woocommerce' ),
     77        'wcbloat_admin_wp_login_page_section_callback',
     78        'wcbloat-admin'
     79    );
     80    // Hide WordPress logo on the WordPress Login Page PRO
     81    add_settings_field(
     82        'wcbloat_hide_wp_logo_on_login_page',
     83        'Hide WordPress logo on the Login Page',
     84        'wcbloat_hide_wp_logo_on_login_page_callback',
     85        'wcbloat-admin',
     86        'wcbloat-admin-wp-login-page-section'
     87    );
     88    register_setting( 'wcbloat-admin-options', 'wcbloat_hide_wp_logo_on_login_page', array(
     89        'sanitize_callback' => 'sanitize_key',
     90    ) );
     91    // Change the Logo URL on the WordPress Login Page PRO
     92    add_settings_field(
     93        'wcbloat_wp_logo_url_disable',
     94        'Change the Logo Link',
     95        'wcbloat_wp_logo_url_disable_callback',
     96        'wcbloat-admin',
     97        'wcbloat-admin-wp-login-page-section'
     98    );
     99    register_setting( 'wcbloat-admin-options', 'wcbloat_wp_logo_url_disable', array(
     100        'sanitize_callback' => 'sanitize_key',
     101    ) );
     102    // Change the Logo title the WordPress Login Page PRO
     103    add_settings_field(
     104        'wcbloat_wp_logo_title',
     105        'Change the Logo title parameter',
     106        'wcbloat_wp_logo_title_callback',
     107        'wcbloat-admin',
     108        'wcbloat-admin-wp-login-page-section'
     109    );
     110    register_setting( 'wcbloat-admin-options', 'wcbloat_wp_logo_title', array(
     111        'sanitize_callback' => 'sanitize_key',
     112    ) );
     113    // Disable WordPress Login Language Switcher PRO
     114    add_settings_field(
     115        'wcbloat_wp_language_select_disable',
     116        'Disable WordPress Login Language Switcher',
     117        'wcbloat_wp_language_select_disable_callback',
     118        'wcbloat-admin',
     119        'wcbloat-admin-wp-login-page-section'
     120    );
     121    register_setting( 'wcbloat-admin-options', 'wcbloat_wp_language_select_disable', array(
     122        'sanitize_callback' => 'sanitize_key',
     123    ) );
    151124}
    152125
    153126// Display the fields added before
    154 add_action('admin_init', 'wcbloat_admin_settings_init');
    155 
     127add_action( 'admin_init', 'wcbloat_admin_settings_init' );
    156128// Fields callbacks
    157 
    158129// Section's icon
    159130function wcbloat_admin_desc_icon_callback()
    160131{
    161     _e('<span class="dashicons dashicons-hammer"></span>');
     132    _e( '<span class="dashicons dashicons-hammer"></span>' );
    162133}
    163134
     
    165136function wcbloat_admin_desc_callback()
    166137{
    167     _e('By default, the WordPress admin panel is cluttered with preinstalled elements that may distract you from your work. You can simplify your WordPress admin panel by hiding or turning them off.<hr />', 'disable-dashboard-for-woocommerce');
    168     _e ( wcbloat_buy_pro_bar() );
     138    _e( 'By default, the WordPress admin panel is cluttered with preinstalled elements that may distract you from your work. You can simplify your WordPress admin panel by hiding or turning them off.<hr />', 'disable-dashboard-for-woocommerce' );
     139    _e( wcbloat_buy_pro_bar() );
    169140}
    170141
     
    172143function wcbloat_clean_admin_desc_section_callback()
    173144{
    174     _e('If you love a simple and flexible interface, use the options below to maximize your performance while browsing through the WordPress admin panel. By removing unnecessary elements, you will be 100% focused on your tasks.', 'disable-dashboard-for-woocommerce');
     145    _e( 'If you love a simple and flexible interface, use the options below to maximize your performance while browsing through the WordPress admin panel. By removing unnecessary elements, you will be 100% focused on your tasks.', 'disable-dashboard-for-woocommerce' );
    175146}
    176147
     
    178149function wcbloat_wp_update_nag_disable_callback()
    179150{
    180     $value = get_option('wcbloat_wp_update_nag_disable');
    181 ?>
     151    $value = get_option( 'wcbloat_wp_update_nag_disable' );
     152    ?>
    182153    <input type='hidden' name='wcbloat_wp_update_nag_disable' value='no'>
    183     <label><input type='checkbox' name='wcbloat_wp_update_nag_disable' <?php checked(esc_attr($value), 'yes'); ?> value='yes'> <?php esc_attr_e('Hide update notice for non-admin users', 'disable-dashboard-for-woocommerce'); ?></label>
    184     <p><?php _e('The next time any user with the Role set as Subscriber, Contributor, Author, or Editor access the WordPress back-end, they will not be prompted to update the WordPress core. The notification will continue to display for admin users.', 'disable-dashboard-for-woocommerce'); ?></p>
    185 <?php
     154    <label><input type='checkbox' name='wcbloat_wp_update_nag_disable' <?php
     155    checked( esc_attr( $value ), 'yes' );
     156    ?> value='yes'> <?php
     157    esc_attr_e( 'Hide update notice for non-admin users', 'disable-dashboard-for-woocommerce' );
     158    ?></label>
     159    <p><?php
     160    _e( 'The next time any user with the Role set as Subscriber, Contributor, Author, or Editor access the WordPress back-end, they will not be prompted to update the WordPress core. The notification will continue to display for admin users.', 'disable-dashboard-for-woocommerce' );
     161    ?></p>
     162<?php
    186163}
    187164
     
    189166function wcbloat_wp_dashboard_widgets_disable_callback()
    190167{
    191     $options = get_option('wcbloat_wp_dashboard_widgets_disable'); 
    192     ?>
     168    $options = get_option( 'wcbloat_wp_dashboard_widgets_disable' );
     169    ?>
    193170<div class="wcbloat-select-unselect-buttons">
    194     <a <?php if ( wcbloat_fs()->is__premium_only() ) { if ( wcbloat_fs()->is_plan( 'pro' ) ) { _e('id="select-all"'); }} ?> class="button button-secondary"<?php echo wcbloat_is_pro_readonly();?>><?php esc_attr_e('Select / Deselect All', 'disable-dashboard-for-woocommerce'); ?></a>
     171    <a <?php
     172    ?> class="button button-secondary"<?php
     173    echo  wcbloat_is_pro_readonly() ;
     174    ?>><?php
     175    esc_attr_e( 'Select / Deselect All', 'disable-dashboard-for-woocommerce' );
     176    ?></a>
    195177</div>
    196178<table id="wcbloat-multi-checkbox-table">
    197179<tbody>
    198180  <tr>
    199     <td class="wcbloat-wp-widgets-disable-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_dashboard_widgets_disable[]' <?php if (!empty($options)) { if (in_array('site_health', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='site_health'><?php esc_attr_e('Site Health Status', 'disable-dashboard-for-woocommerce'); ?></td>
    200     <td class="wcbloat-wp-widgets-disable-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_dashboard_widgets_disable[]' <?php if (!empty($options)) { if (in_array('at_a_glance', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='at_a_glance'><?php esc_attr_e('At a Glance', 'disable-dashboard-for-woocommerce'); ?></td>
     181    <td class="wcbloat-wp-widgets-disable-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_dashboard_widgets_disable[]' <?php
     182    if ( !empty($options) ) {
     183        if ( in_array( 'site_health', $options ) ) {
     184            esc_attr_e( 'checked' );
     185        }
     186    }
     187    echo  wcbloat_is_pro_readonly() ;
     188    ?> value='site_health'><?php
     189    esc_attr_e( 'Site Health Status', 'disable-dashboard-for-woocommerce' );
     190    ?></td>
     191    <td class="wcbloat-wp-widgets-disable-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_dashboard_widgets_disable[]' <?php
     192    if ( !empty($options) ) {
     193        if ( in_array( 'at_a_glance', $options ) ) {
     194            esc_attr_e( 'checked' );
     195        }
     196    }
     197    echo  wcbloat_is_pro_readonly() ;
     198    ?> value='at_a_glance'><?php
     199    esc_attr_e( 'At a Glance', 'disable-dashboard-for-woocommerce' );
     200    ?></td>
    201201</tr>
    202202  <tr>
    203   <td class="wcbloat-wp-widgets-disable-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_dashboard_widgets_disable[]' <?php if (!empty($options)) { if (in_array('activity', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='activity'><?php esc_attr_e('Activity', 'disable-dashboard-for-woocommerce'); ?></td>
    204   <td class="wcbloat-wp-widgets-disable-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_dashboard_widgets_disable[]' <?php if (!empty($options)) { if (in_array('draft', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='draft'><?php esc_attr_e('Quick Draft', 'disable-dashboard-for-woocommerce'); ?></td>
     203  <td class="wcbloat-wp-widgets-disable-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_dashboard_widgets_disable[]' <?php
     204    if ( !empty($options) ) {
     205        if ( in_array( 'activity', $options ) ) {
     206            esc_attr_e( 'checked' );
     207        }
     208    }
     209    echo  wcbloat_is_pro_readonly() ;
     210    ?> value='activity'><?php
     211    esc_attr_e( 'Activity', 'disable-dashboard-for-woocommerce' );
     212    ?></td>
     213  <td class="wcbloat-wp-widgets-disable-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_dashboard_widgets_disable[]' <?php
     214    if ( !empty($options) ) {
     215        if ( in_array( 'draft', $options ) ) {
     216            esc_attr_e( 'checked' );
     217        }
     218    }
     219    echo  wcbloat_is_pro_readonly() ;
     220    ?> value='draft'><?php
     221    esc_attr_e( 'Quick Draft', 'disable-dashboard-for-woocommerce' );
     222    ?></td>
    205223  </tr>
    206224  <tr>
    207   <td class="wcbloat-wp-widgets-disable-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_dashboard_widgets_disable[]' <?php if (!empty($options)) { if (in_array('news', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='news'><?php esc_attr_e('WordPress Events and News', 'disable-dashboard-for-woocommerce'); ?></td>
    208   <td class="wcbloat-wp-widgets-disable-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_dashboard_widgets_disable[]' <?php if (!empty($options)) { if (in_array('welcome', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='welcome'><?php esc_attr_e('Welcome panel', 'disable-dashboard-for-woocommerce'); ?></td>
     225  <td class="wcbloat-wp-widgets-disable-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_dashboard_widgets_disable[]' <?php
     226    if ( !empty($options) ) {
     227        if ( in_array( 'news', $options ) ) {
     228            esc_attr_e( 'checked' );
     229        }
     230    }
     231    echo  wcbloat_is_pro_readonly() ;
     232    ?> value='news'><?php
     233    esc_attr_e( 'WordPress Events and News', 'disable-dashboard-for-woocommerce' );
     234    ?></td>
     235  <td class="wcbloat-wp-widgets-disable-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_dashboard_widgets_disable[]' <?php
     236    if ( !empty($options) ) {
     237        if ( in_array( 'welcome', $options ) ) {
     238            esc_attr_e( 'checked' );
     239        }
     240    }
     241    echo  wcbloat_is_pro_readonly() ;
     242    ?> value='welcome'><?php
     243    esc_attr_e( 'Welcome panel', 'disable-dashboard-for-woocommerce' );
     244    ?></td>
    209245  </tr>
    210246</tbody>
    211247</table>
    212     <p><?php echo wcbloat_is_pro_badge(); _e('WordPress by default comes with a lot of Dashboard widgets installed. They often are not used at all, but can add backend load and front-end load. Choose which of the WordPress Dashboard Widgets should be disabled. The <strong>ones you choose will be disabled</strong>, and the <strong>ones that had not been selected</strong> will stay <strong>active</strong>.', 'disable-dashboard-for-woocommerce'); ?></p>
    213 
    214     <?php
     248    <p><?php
     249    echo  wcbloat_is_pro_badge() ;
     250    _e( 'WordPress by default comes with a lot of Dashboard widgets installed. They often are not used at all, but can add backend load and front-end load. Choose which of the WordPress Dashboard Widgets should be disabled. The <strong>ones you choose will be disabled</strong>, and the <strong>ones that had not been selected</strong> will stay <strong>active</strong>.', 'disable-dashboard-for-woocommerce' );
     251    ?></p>
     252
     253    <?php
    215254}
    216255
     
    218257function wcbloat_w_logo_disable_callback()
    219258{
    220     $value = get_option('wcbloat_w_logo_disable');
    221 ?>
     259    $value = get_option( 'wcbloat_w_logo_disable' );
     260    ?>
    222261    <input type='hidden' name='wcbloat_w_logo_disable' value='no'>
    223     <label><input type='checkbox' name='wcbloat_w_logo_disable' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Remove the WordPress logo (“W”) from the admin bar', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    224     <p><?php _e('This option will hide the WordPress logo in the upper left corner. The logo won\'t be visible in your admin panel and in your site (on the admin bar visible on the front-end after logging in.', 'disable-dashboard-for-woocommerce'); ?></p>
    225 <?php
     262    <label><input type='checkbox' name='wcbloat_w_logo_disable' <?php
     263    checked( esc_attr( $value ), 'yes' );
     264    echo  wcbloat_is_pro_readonly() ;
     265    ?> value='yes'> <?php
     266    esc_attr_e( 'Remove the WordPress logo (“W”) from the admin bar', 'disable-dashboard-for-woocommerce' );
     267    echo  wcbloat_is_pro_badge() ;
     268    ?></label>
     269    <p><?php
     270    _e( 'This option will hide the WordPress logo in the upper left corner. The logo won\'t be visible in your admin panel and in your site (on the admin bar visible on the front-end after logging in.', 'disable-dashboard-for-woocommerce' );
     271    ?></p>
     272<?php
    226273}
    227274
     
    229276function wcbloat_wp_footer_disable_callback()
    230277{
    231     $value = get_option('wcbloat_wp_footer_disable');
    232 ?>
     278    $value = get_option( 'wcbloat_wp_footer_disable' );
     279    ?>
    233280    <input type='hidden' name='wcbloat_wp_footer_disable' value='no'>
    234     <label><input type='checkbox' name='wcbloat_wp_footer_disable' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Remove admin footer text', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    235     <p><?php _e('This option hides the text at the bottom of the WordPress admin: <code>Thank you for creating with WordPress</code> on the bottom left, and the WordPress version on the bottom right.', 'disable-dashboard-for-woocommerce'); ?></p>
    236 <?php
     281    <label><input type='checkbox' name='wcbloat_wp_footer_disable' <?php
     282    checked( esc_attr( $value ), 'yes' );
     283    echo  wcbloat_is_pro_readonly() ;
     284    ?> value='yes'> <?php
     285    esc_attr_e( 'Remove admin footer text', 'disable-dashboard-for-woocommerce' );
     286    echo  wcbloat_is_pro_badge() ;
     287    ?></label>
     288    <p><?php
     289    _e( 'This option hides the text at the bottom of the WordPress admin: <code>Thank you for creating with WordPress</code> on the bottom left, and the WordPress version on the bottom right.', 'disable-dashboard-for-woocommerce' );
     290    ?></p>
     291<?php
    237292}
    238293
     
    240295function wcbloat_admin_wp_login_page_section_callback()
    241296{
    242     _e('There are situations when you may prefer to hide or change the standard WordPress branding on the Login Page.', 'disable-dashboard-for-woocommerce');
     297    _e( 'There are situations when you may prefer to hide or change the standard WordPress branding on the Login Page.', 'disable-dashboard-for-woocommerce' );
    243298}
    244299
     
    246301function wcbloat_hide_wp_logo_on_login_page_callback()
    247302{
    248     $value = get_option('wcbloat_hide_wp_logo_on_login_page');
    249 ?>
     303    $value = get_option( 'wcbloat_hide_wp_logo_on_login_page' );
     304    ?>
    250305    <input type='hidden' name='wcbloat_hide_wp_logo_on_login_page' value='no'>
    251     <label><input type='checkbox' name='wcbloat_hide_wp_logo_on_login_page' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Hide WordPress logo on the WordPress Login Page', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    252     <p><?php _e('Hide standard WordPress Logo from Login Page', 'disable-dashboard-for-woocommerce'); ?></p>
    253 <?php
     306    <label><input type='checkbox' name='wcbloat_hide_wp_logo_on_login_page' <?php
     307    checked( esc_attr( $value ), 'yes' );
     308    echo  wcbloat_is_pro_readonly() ;
     309    ?> value='yes'> <?php
     310    esc_attr_e( 'Hide WordPress logo on the WordPress Login Page', 'disable-dashboard-for-woocommerce' );
     311    echo  wcbloat_is_pro_badge() ;
     312    ?></label>
     313    <p><?php
     314    _e( 'Hide standard WordPress Logo from Login Page', 'disable-dashboard-for-woocommerce' );
     315    ?></p>
     316<?php
    254317}
    255318
     
    257320function wcbloat_wp_logo_url_disable_callback()
    258321{
    259     $value = get_option('wcbloat_wp_logo_url_disable');
    260 ?>
     322    $value = get_option( 'wcbloat_wp_logo_url_disable' );
     323    ?>
    261324    <input type='hidden' name='wcbloat_wp_logo_url_disable' value='no'>
    262     <label><input type='checkbox' name='wcbloat_wp_logo_url_disable' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Change the Logo Link on the WordPress Login Page', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    263     <p><?php _e('By default, the WordPress login page displays the WordPress logo which is linking to WordPress.org site. After activating this option, the logo on the login page will be linking to your site\'s homepage.', 'disable-dashboard-for-woocommerce'); ?></p>
    264 <?php
     325    <label><input type='checkbox' name='wcbloat_wp_logo_url_disable' <?php
     326    checked( esc_attr( $value ), 'yes' );
     327    echo  wcbloat_is_pro_readonly() ;
     328    ?> value='yes'> <?php
     329    esc_attr_e( 'Change the Logo Link on the WordPress Login Page', 'disable-dashboard-for-woocommerce' );
     330    echo  wcbloat_is_pro_badge() ;
     331    ?></label>
     332    <p><?php
     333    _e( 'By default, the WordPress login page displays the WordPress logo which is linking to WordPress.org site. After activating this option, the logo on the login page will be linking to your site\'s homepage.', 'disable-dashboard-for-woocommerce' );
     334    ?></p>
     335<?php
    265336}
    266337
     
    268339function wcbloat_wp_logo_title_callback()
    269340{
    270     $value = get_option('wcbloat_wp_logo_title');
    271 ?>
     341    $value = get_option( 'wcbloat_wp_logo_title' );
     342    ?>
    272343    <input type='hidden' name='wcbloat_wp_logo_title' value='no'>
    273     <label><input type='checkbox' name='wcbloat_wp_logo_title' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Change the Logo title parameter on the WordPress Login Page', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    274     <p><?php _e('By default, the WordPress Logo displayed on the WordPress Login Page has a title parameter that says <code>Powered by WordPress</code>. After activating this option, it will match your Site Name.', 'disable-dashboard-for-woocommerce'); ?></p>
    275 <?php
     344    <label><input type='checkbox' name='wcbloat_wp_logo_title' <?php
     345    checked( esc_attr( $value ), 'yes' );
     346    echo  wcbloat_is_pro_readonly() ;
     347    ?> value='yes'> <?php
     348    esc_attr_e( 'Change the Logo title parameter on the WordPress Login Page', 'disable-dashboard-for-woocommerce' );
     349    echo  wcbloat_is_pro_badge() ;
     350    ?></label>
     351    <p><?php
     352    _e( 'By default, the WordPress Logo displayed on the WordPress Login Page has a title parameter that says <code>Powered by WordPress</code>. After activating this option, it will match your Site Name.', 'disable-dashboard-for-woocommerce' );
     353    ?></p>
     354<?php
    276355}
    277356
     
    279358function wcbloat_wp_language_select_disable_callback()
    280359{
    281     $value = get_option('wcbloat_wp_language_select_disable');
    282 ?>
     360    $value = get_option( 'wcbloat_wp_language_select_disable' );
     361    ?>
    283362    <input type='hidden' name='wcbloat_wp_language_select_disable' value='no'>
    284     <label><input type='checkbox' name='wcbloat_wp_language_select_disable' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Disable WordPress Login Language Switcher', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    285     <p><?php _e('This option will disable the language selector which allows users to switch languages from a dropdown on the login screen if more than one language is enabled on your WordPress installation.', 'disable-dashboard-for-woocommerce'); ?></p>
    286 <?php
    287 }
     363    <label><input type='checkbox' name='wcbloat_wp_language_select_disable' <?php
     364    checked( esc_attr( $value ), 'yes' );
     365    echo  wcbloat_is_pro_readonly() ;
     366    ?> value='yes'> <?php
     367    esc_attr_e( 'Disable WordPress Login Language Switcher', 'disable-dashboard-for-woocommerce' );
     368    echo  wcbloat_is_pro_badge() ;
     369    ?></label>
     370    <p><?php
     371    _e( 'This option will disable the language selector which allows users to switch languages from a dropdown on the login screen if more than one language is enabled on your WordPress installation.', 'disable-dashboard-for-woocommerce' );
     372    ?></p>
     373<?php
     374}
  • disable-dashboard-for-woocommerce/trunk/includes/settings/class-disable-bloat-settings-performance.php

    r2943912 r2943924  
    11<?php
    22
    3 if (!defined('ABSPATH')) exit; // Exit if accessed directly
    4 
     3if ( !defined( 'ABSPATH' ) ) {
     4    exit;
     5}
     6// Exit if accessed directly
    57// Add sections and fields on Main settings screen
    68function wcbloat_performance_settings_init()
    79{
    8 
    9     // Section's icon
    10     add_settings_section(
    11         'wcbloat-performance-icon-section',
    12         '',
    13         'wcbloat_performance_icon_callback',
    14         'wcbloat-performance'
    15     );
    16 
    17     // Section's title and description
    18     add_settings_section(
    19         'wcbloat-site-performance-desc-section',
    20         esc_attr__('Site performance', 'disable-dashboard-for-woocommerce'),
    21         'wcbloat_site_performance_desc_callback',
    22         'wcbloat-performance'
    23     );
    24 
    25     // Speed up your site section
    26     add_settings_section(
    27         'wcbloat-performance-speed-section',
    28         esc_attr__('Speed up your site', 'disable-dashboard-for-woocommerce'),
    29         'wcbloat_performance_speed_section_callback',
    30         'wcbloat-performance'
    31     );
    32 
    33     // Disable Password Strength Meter
    34     add_settings_field(
    35         'wcbloat_password_meter_disable',
    36         'Password Strength Meter',
    37         'wcbloat_password_meter_disable_callback',
    38         'wcbloat-performance',
    39         'wcbloat-performance-speed-section'
    40     );
    41     register_setting(
    42         'wcbloat-performance-options',
    43         'wcbloat_password_meter_disable',
    44         array('sanitize_callback' => 'sanitize_key')
    45     );
    46 
    47     // Load comment script only when needed
    48     add_settings_field(
    49         'wcbloat_load_comment_scripts_when_needed',
    50         'Comments scripts',
    51         'wcbloat_load_comment_scripts_when_needed_callback',
    52         'wcbloat-performance',
    53         'wcbloat-performance-speed-section'
    54     );
    55     register_setting(
    56         'wcbloat-performance-options',
    57         'wcbloat_load_comment_scripts_when_needed',
    58         array('sanitize_callback' => 'sanitize_key')
    59     );
    60 
    61     // Prevent auto-linking URLs in comments
    62     add_settings_field(
    63         'wcbloat_prevent_linking_url_comments',
    64         'Auto-linking URLs in comments',
    65         'wcbloat_prevent_linking_url_comments_callback',
    66         'wcbloat-performance',
    67         'wcbloat-performance-speed-section'
    68     );
    69     register_setting(
    70         'wcbloat-performance-options',
    71         'wcbloat_prevent_linking_url_comments',
    72         array('sanitize_callback' => 'sanitize_key')
    73     );
    74 
    75     // Disable Dashicons
    76     add_settings_field(
    77         'wcbloat_disable_dashicons',
    78         'Disable Dashicons',
    79         'wcbloat_disable_dashicons_callback',
    80         'wcbloat-performance',
    81         'wcbloat-performance-speed-section'
    82     );
    83     register_setting(
    84         'wcbloat-performance-options',
    85         'wcbloat_disable_dashicons',
    86         array('sanitize_callback' => 'sanitize_key')
    87     );
    88 
    89     // Remove DNS prefetch to s.w.org PRO
    90     add_settings_field(
    91         'wcbloat_remove_dns_prefetch',
    92         'DNS prefetch to s.w.org',
    93         'wcbloat_remove_dns_prefetch_callback',
    94         'wcbloat-performance',
    95         'wcbloat-performance-speed-section'
    96     );
    97     register_setting(
    98         'wcbloat-performance-options',
    99         'wcbloat_remove_dns_prefetch',
    100         array('sanitize_callback' => 'sanitize_key')
    101     );
    102 
    103     // Disable jQuery Migrate PRO
    104     add_settings_field(
    105         'wcbloat_disable_jquery_migrate',
    106         'Disable jQuery Migrate',
    107         'wcbloat_disable_jquery_migrate_callback',
    108         'wcbloat-performance',
    109         'wcbloat-performance-speed-section'
    110     );
    111     register_setting(
    112         'wcbloat-performance-options',
    113         'wcbloat_disable_jquery_migrate',
    114         array('sanitize_callback' => 'sanitize_key')
    115     );
    116 
    117     // Disable Sidebar WordPress Widgets PRO
    118     add_settings_field(
    119         'wcbloat_wp_sidebar_widgets_disable',
    120         esc_attr__( 'Disable Sidebar WordPress Widgets', 'disable-dashboard-for-woocommerce' ),
    121         'wcbloat_wp_sidebar_widgets_disable_callback',
    122         'wcbloat-performance',
    123         'wcbloat-performance-speed-section' );
    124     register_setting(
    125         'wcbloat-performance-options',
    126         'wcbloat_wp_sidebar_widgets_disable',
    127         'validate_setting'
    128     );
    129 
    130     // Remove WordPress Meta Generator Tag PRO
    131     add_settings_field(
    132         'wcbloat_wp_meta_generator_disable',
    133         'WordPress & WooCommerce Meta Generator Tag',
    134         'wcbloat_wp_meta_generator_disable_callback',
    135         'wcbloat-performance',
    136         'wcbloat-performance-speed-section'
    137     );
    138     register_setting(
    139         'wcbloat-performance-options',
    140         'wcbloat_wp_meta_generator_disable',
    141         array('sanitize_callback' => 'sanitize_key')
    142     );
    143 
    144     // Remove emoji styles and scripts PRO
    145     add_settings_field(
    146         'wcbloat_remove_emoji_scripts',
    147         'Emoji styles and scripts',
    148         'wcbloat_remove_emoji_scripts_callback',
    149         'wcbloat-performance',
    150         'wcbloat-performance-speed-section'
    151     );
    152     register_setting(
    153         'wcbloat-performance-options',
    154         'wcbloat_remove_emoji_scripts',
    155         array('sanitize_callback' => 'sanitize_key')
    156     );
    157 
    158     // Disable wp-embed PRO
    159     add_settings_field(
    160         'wcbloat_disable_wp_embed',
    161         'Disable wp-embed',
    162         'wcbloat_disable_wp_embed_callback',
    163         'wcbloat-performance',
    164         'wcbloat-performance-speed-section'
    165     );
    166     register_setting(
    167         'wcbloat-performance-options',
    168         'wcbloat_disable_wp_embed',
    169         array('sanitize_callback' => 'sanitize_key')
    170     );
    171 
    172     // Remove unwanted scripts from header section
    173     add_settings_section(
    174         'wcbloat-site-performance-header-section',
    175         esc_attr__('Remove scripts from Header', 'disable-dashboard-for-woocommerce'),
    176         'wcbloat_site_performance_header_section_callback',
    177         'wcbloat-performance'
    178     );
    179 
    180     // Remove RSS Feed Links PRO
    181     add_settings_field(
    182         'wcbloat_remove_rss_links',
    183         'RSS Feed Links',
    184         'wcbloat_remove_rss_links_callback',
    185         'wcbloat-performance',
    186         'wcbloat-site-performance-header-section'
    187     );
    188     register_setting(
    189         'wcbloat-performance-options',
    190         'wcbloat_remove_rss_links',
    191         array('sanitize_callback' => 'sanitize_key')
    192     );
    193 
    194     // Disable the RSS feeds PRO
    195     add_settings_field(
    196         'wcbloat_disable_all_feeds',
    197         'RSS feeds',
    198         'wcbloat_disable_all_feeds_callback',
    199         'wcbloat-performance',
    200         'wcbloat-site-performance-header-section'
    201     );
    202     register_setting(
    203         'wcbloat-performance-options',
    204         'wcbloat_disable_all_feeds',
    205         array('sanitize_callback' => 'sanitize_key')
    206     );
    207 
    208     // Remove Feed Generator Tag PRO
    209     add_settings_field(
    210         'wcbloat_remove_feed_generator_tag',
    211         'Feed Generator Tag',
    212         'wcbloat_remove_feed_generator_tag_callback',
    213         'wcbloat-performance',
    214         'wcbloat-site-performance-header-section'
    215     );
    216     register_setting(
    217         'wcbloat-performance-options',
    218         'wcbloat_remove_feed_generator_tag',
    219         array('sanitize_callback' => 'sanitize_key')
    220     );
    221 
    222     // Remove Link to the WLW Manifest File PRO
    223     add_settings_field(
    224         'wcbloat_disable_wlw_link',
    225         'Windows Live Writer',
    226         'wcbloat_disable_wlw_link_callback',
    227         'wcbloat-performance',
    228         'wcbloat-site-performance-header-section'
    229     );
    230     register_setting(
    231         'wcbloat-performance-options',
    232         'wcbloat_disable_wlw_link',
    233         array('sanitize_callback' => 'sanitize_key')
    234     );
    235 
    236     // Remove RSD link PRO
    237     add_settings_field(
    238         'wcbloat_disable_rsd_link',
    239         'RSD Link',
    240         'wcbloat_disable_rsd_link_callback',
    241         'wcbloat-performance',
    242         'wcbloat-site-performance-header-section'
    243     );
    244     register_setting(
    245         'wcbloat-performance-options',
    246         'wcbloat_disable_rsd_link',
    247         array('sanitize_callback' => 'sanitize_key')
    248     );
    249 
    250     // Remove RSD link PRO
    251     add_settings_field(
    252         'wcbloat_disable_rsd_link',
    253         'RSD Link',
    254         'wcbloat_disable_rsd_link_callback',
    255         'wcbloat-performance',
    256         'wcbloat-site-performance-header-section'
    257     );
    258     register_setting(
    259         'wcbloat-performance-options',
    260         'wcbloat_disable_rsd_link',
    261         array('sanitize_callback' => 'sanitize_key')
    262     );
    263 
    264     // Remove Shortlink From HTTP Header PRO
    265     add_settings_field(
    266         'wcbloat_remove_shortlink',
    267         'Shortlink',
    268         'wcbloat_remove_shortlink_callback',
    269         'wcbloat-performance',
    270         'wcbloat-site-performance-header-section'
    271     );
    272     register_setting(
    273         'wcbloat-performance-options',
    274         'wcbloat_remove_shortlink',
    275         array('sanitize_callback' => 'sanitize_key')
    276     );
    277 
     10    // Section's icon
     11    add_settings_section(
     12        'wcbloat-performance-icon-section',
     13        '',
     14        'wcbloat_performance_icon_callback',
     15        'wcbloat-performance'
     16    );
     17    // Section's title and description
     18    add_settings_section(
     19        'wcbloat-site-performance-desc-section',
     20        esc_attr__( 'Site performance', 'disable-dashboard-for-woocommerce' ),
     21        'wcbloat_site_performance_desc_callback',
     22        'wcbloat-performance'
     23    );
     24    // Speed up your site section
     25    add_settings_section(
     26        'wcbloat-performance-speed-section',
     27        esc_attr__( 'Speed up your site', 'disable-dashboard-for-woocommerce' ),
     28        'wcbloat_performance_speed_section_callback',
     29        'wcbloat-performance'
     30    );
     31    // Disable Password Strength Meter
     32    add_settings_field(
     33        'wcbloat_password_meter_disable',
     34        'Password Strength Meter',
     35        'wcbloat_password_meter_disable_callback',
     36        'wcbloat-performance',
     37        'wcbloat-performance-speed-section'
     38    );
     39    register_setting( 'wcbloat-performance-options', 'wcbloat_password_meter_disable', array(
     40        'sanitize_callback' => 'sanitize_key',
     41    ) );
     42    // Load comment script only when needed
     43    add_settings_field(
     44        'wcbloat_load_comment_scripts_when_needed',
     45        'Comments scripts',
     46        'wcbloat_load_comment_scripts_when_needed_callback',
     47        'wcbloat-performance',
     48        'wcbloat-performance-speed-section'
     49    );
     50    register_setting( 'wcbloat-performance-options', 'wcbloat_load_comment_scripts_when_needed', array(
     51        'sanitize_callback' => 'sanitize_key',
     52    ) );
     53    // Prevent auto-linking URLs in comments
     54    add_settings_field(
     55        'wcbloat_prevent_linking_url_comments',
     56        'Auto-linking URLs in comments',
     57        'wcbloat_prevent_linking_url_comments_callback',
     58        'wcbloat-performance',
     59        'wcbloat-performance-speed-section'
     60    );
     61    register_setting( 'wcbloat-performance-options', 'wcbloat_prevent_linking_url_comments', array(
     62        'sanitize_callback' => 'sanitize_key',
     63    ) );
     64    // Disable Dashicons
     65    add_settings_field(
     66        'wcbloat_disable_dashicons',
     67        'Disable Dashicons',
     68        'wcbloat_disable_dashicons_callback',
     69        'wcbloat-performance',
     70        'wcbloat-performance-speed-section'
     71    );
     72    register_setting( 'wcbloat-performance-options', 'wcbloat_disable_dashicons', array(
     73        'sanitize_callback' => 'sanitize_key',
     74    ) );
     75    // Remove DNS prefetch to s.w.org PRO
     76    add_settings_field(
     77        'wcbloat_remove_dns_prefetch',
     78        'DNS prefetch to s.w.org',
     79        'wcbloat_remove_dns_prefetch_callback',
     80        'wcbloat-performance',
     81        'wcbloat-performance-speed-section'
     82    );
     83    register_setting( 'wcbloat-performance-options', 'wcbloat_remove_dns_prefetch', array(
     84        'sanitize_callback' => 'sanitize_key',
     85    ) );
     86    // Disable jQuery Migrate PRO
     87    add_settings_field(
     88        'wcbloat_disable_jquery_migrate',
     89        'Disable jQuery Migrate',
     90        'wcbloat_disable_jquery_migrate_callback',
     91        'wcbloat-performance',
     92        'wcbloat-performance-speed-section'
     93    );
     94    register_setting( 'wcbloat-performance-options', 'wcbloat_disable_jquery_migrate', array(
     95        'sanitize_callback' => 'sanitize_key',
     96    ) );
     97    // Disable Sidebar WordPress Widgets PRO
     98    add_settings_field(
     99        'wcbloat_wp_sidebar_widgets_disable',
     100        esc_attr__( 'Disable Sidebar WordPress Widgets', 'disable-dashboard-for-woocommerce' ),
     101        'wcbloat_wp_sidebar_widgets_disable_callback',
     102        'wcbloat-performance',
     103        'wcbloat-performance-speed-section'
     104    );
     105    register_setting( 'wcbloat-performance-options', 'wcbloat_wp_sidebar_widgets_disable', 'validate_setting' );
     106    // Remove WordPress Meta Generator Tag PRO
     107    add_settings_field(
     108        'wcbloat_wp_meta_generator_disable',
     109        'WordPress & WooCommerce Meta Generator Tag',
     110        'wcbloat_wp_meta_generator_disable_callback',
     111        'wcbloat-performance',
     112        'wcbloat-performance-speed-section'
     113    );
     114    register_setting( 'wcbloat-performance-options', 'wcbloat_wp_meta_generator_disable', array(
     115        'sanitize_callback' => 'sanitize_key',
     116    ) );
     117    // Remove emoji styles and scripts PRO
     118    add_settings_field(
     119        'wcbloat_remove_emoji_scripts',
     120        'Emoji styles and scripts',
     121        'wcbloat_remove_emoji_scripts_callback',
     122        'wcbloat-performance',
     123        'wcbloat-performance-speed-section'
     124    );
     125    register_setting( 'wcbloat-performance-options', 'wcbloat_remove_emoji_scripts', array(
     126        'sanitize_callback' => 'sanitize_key',
     127    ) );
     128    // Disable wp-embed PRO
     129    add_settings_field(
     130        'wcbloat_disable_wp_embed',
     131        'Disable wp-embed',
     132        'wcbloat_disable_wp_embed_callback',
     133        'wcbloat-performance',
     134        'wcbloat-performance-speed-section'
     135    );
     136    register_setting( 'wcbloat-performance-options', 'wcbloat_disable_wp_embed', array(
     137        'sanitize_callback' => 'sanitize_key',
     138    ) );
     139    // Remove unwanted scripts from header section
     140    add_settings_section(
     141        'wcbloat-site-performance-header-section',
     142        esc_attr__( 'Remove scripts from Header', 'disable-dashboard-for-woocommerce' ),
     143        'wcbloat_site_performance_header_section_callback',
     144        'wcbloat-performance'
     145    );
     146    // Remove RSS Feed Links PRO
     147    add_settings_field(
     148        'wcbloat_remove_rss_links',
     149        'RSS Feed Links',
     150        'wcbloat_remove_rss_links_callback',
     151        'wcbloat-performance',
     152        'wcbloat-site-performance-header-section'
     153    );
     154    register_setting( 'wcbloat-performance-options', 'wcbloat_remove_rss_links', array(
     155        'sanitize_callback' => 'sanitize_key',
     156    ) );
     157    // Disable the RSS feeds PRO
     158    add_settings_field(
     159        'wcbloat_disable_all_feeds',
     160        'RSS feeds',
     161        'wcbloat_disable_all_feeds_callback',
     162        'wcbloat-performance',
     163        'wcbloat-site-performance-header-section'
     164    );
     165    register_setting( 'wcbloat-performance-options', 'wcbloat_disable_all_feeds', array(
     166        'sanitize_callback' => 'sanitize_key',
     167    ) );
     168    // Remove Feed Generator Tag PRO
     169    add_settings_field(
     170        'wcbloat_remove_feed_generator_tag',
     171        'Feed Generator Tag',
     172        'wcbloat_remove_feed_generator_tag_callback',
     173        'wcbloat-performance',
     174        'wcbloat-site-performance-header-section'
     175    );
     176    register_setting( 'wcbloat-performance-options', 'wcbloat_remove_feed_generator_tag', array(
     177        'sanitize_callback' => 'sanitize_key',
     178    ) );
     179    // Remove Link to the WLW Manifest File PRO
     180    add_settings_field(
     181        'wcbloat_disable_wlw_link',
     182        'Windows Live Writer',
     183        'wcbloat_disable_wlw_link_callback',
     184        'wcbloat-performance',
     185        'wcbloat-site-performance-header-section'
     186    );
     187    register_setting( 'wcbloat-performance-options', 'wcbloat_disable_wlw_link', array(
     188        'sanitize_callback' => 'sanitize_key',
     189    ) );
     190    // Remove RSD link PRO
     191    add_settings_field(
     192        'wcbloat_disable_rsd_link',
     193        'RSD Link',
     194        'wcbloat_disable_rsd_link_callback',
     195        'wcbloat-performance',
     196        'wcbloat-site-performance-header-section'
     197    );
     198    register_setting( 'wcbloat-performance-options', 'wcbloat_disable_rsd_link', array(
     199        'sanitize_callback' => 'sanitize_key',
     200    ) );
     201    // Remove RSD link PRO
     202    add_settings_field(
     203        'wcbloat_disable_rsd_link',
     204        'RSD Link',
     205        'wcbloat_disable_rsd_link_callback',
     206        'wcbloat-performance',
     207        'wcbloat-site-performance-header-section'
     208    );
     209    register_setting( 'wcbloat-performance-options', 'wcbloat_disable_rsd_link', array(
     210        'sanitize_callback' => 'sanitize_key',
     211    ) );
     212    // Remove Shortlink From HTTP Header PRO
     213    add_settings_field(
     214        'wcbloat_remove_shortlink',
     215        'Shortlink',
     216        'wcbloat_remove_shortlink_callback',
     217        'wcbloat-performance',
     218        'wcbloat-site-performance-header-section'
     219    );
     220    register_setting( 'wcbloat-performance-options', 'wcbloat_remove_shortlink', array(
     221        'sanitize_callback' => 'sanitize_key',
     222    ) );
    278223}
    279224
    280225// Display the fields added before
    281 add_action('admin_init', 'wcbloat_performance_settings_init');
    282 
     226add_action( 'admin_init', 'wcbloat_performance_settings_init' );
    283227// Fields callbacks
    284 
    285228// Section's icon
    286229function wcbloat_performance_icon_callback()
    287230{
    288     _e('<span class="dashicons dashicons-admin-site-alt"></span>');
     231    _e( '<span class="dashicons dashicons-admin-site-alt"></span>' );
    289232}
    290233
     
    292235function wcbloat_site_performance_desc_callback()
    293236{
    294     _e('Page load time is very important for your visitors. To improve page load time, try to disable scripts, features, and unnecessary queries:<hr />', 'disable-dashboard-for-woocommerce');
     237    _e( 'Page load time is very important for your visitors. To improve page load time, try to disable scripts, features, and unnecessary queries:<hr />', 'disable-dashboard-for-woocommerce' );
    295238}
    296239
     
    298241function wcbloat_performance_speed_section_callback()
    299242{
    300     _e('Use the settings from this section to reduce page load time on the front-end of your WordPress site. Before disabling them, please make sure that you will not use any of these features - so they can be safely turned off.', 'disable-dashboard-for-woocommerce');
    301     _e ( wcbloat_buy_pro_bar() );
     243    _e( 'Use the settings from this section to reduce page load time on the front-end of your WordPress site. Before disabling them, please make sure that you will not use any of these features - so they can be safely turned off.', 'disable-dashboard-for-woocommerce' );
     244    _e( wcbloat_buy_pro_bar() );
    302245}
    303246
     
    305248function wcbloat_password_meter_disable_callback()
    306249{
    307     $value = get_option('wcbloat_password_meter_disable');
    308 ?>
     250    $value = get_option( 'wcbloat_password_meter_disable' );
     251    ?>
    309252    <input type='hidden' name='wcbloat_password_meter_disable' value='no'>
    310     <label><input type='checkbox' name='wcbloat_password_meter_disable' <?php checked(esc_attr($value), 'yes'); ?> value='yes'> <?php esc_attr_e('Disable Password Strength Meter', 'disable-dashboard-for-woocommerce'); ?></label>
    311     <p><?php _e('Removes the WordPress and WooCommerce password strength meter scripts (over 400 KB) from non-essential pages.', 'disable-dashboard-for-woocommerce'); ?></p>
    312 <?php
     253    <label><input type='checkbox' name='wcbloat_password_meter_disable' <?php
     254    checked( esc_attr( $value ), 'yes' );
     255    ?> value='yes'> <?php
     256    esc_attr_e( 'Disable Password Strength Meter', 'disable-dashboard-for-woocommerce' );
     257    ?></label>
     258    <p><?php
     259    _e( 'Removes the WordPress and WooCommerce password strength meter scripts (over 400 KB) from non-essential pages.', 'disable-dashboard-for-woocommerce' );
     260    ?></p>
     261<?php
    313262}
    314263
     
    316265function wcbloat_load_comment_scripts_when_needed_callback()
    317266{
    318     $value = get_option('wcbloat_load_comment_scripts_when_needed');
    319 ?>
     267    $value = get_option( 'wcbloat_load_comment_scripts_when_needed' );
     268    ?>
    320269    <input type='hidden' name='wcbloat_load_comment_scripts_when_needed' value='no'>
    321     <label><input type='checkbox' name='wcbloat_load_comment_scripts_when_needed' <?php checked(esc_attr($value), 'yes'); ?> value='yes'> <?php esc_attr_e('Load Comments script only when needed', 'disable-dashboard-for-woocommerce'); ?></label>
    322     <p><?php _e('By default, WordPress Comments javascript files are loaded everywhere on your site. This option will load the Comments script only when needed (on single posts and pages with existing comments).', 'disable-dashboard-for-woocommerce'); ?></p>
    323 <?php
     270    <label><input type='checkbox' name='wcbloat_load_comment_scripts_when_needed' <?php
     271    checked( esc_attr( $value ), 'yes' );
     272    ?> value='yes'> <?php
     273    esc_attr_e( 'Load Comments script only when needed', 'disable-dashboard-for-woocommerce' );
     274    ?></label>
     275    <p><?php
     276    _e( 'By default, WordPress Comments javascript files are loaded everywhere on your site. This option will load the Comments script only when needed (on single posts and pages with existing comments).', 'disable-dashboard-for-woocommerce' );
     277    ?></p>
     278<?php
    324279}
    325280
     
    327282function wcbloat_prevent_linking_url_comments_callback()
    328283{
    329     $value = get_option('wcbloat_prevent_linking_url_comments');
    330 ?>
     284    $value = get_option( 'wcbloat_prevent_linking_url_comments' );
     285    ?>
    331286    <input type='hidden' name='wcbloat_prevent_linking_url_comments' value='no'>
    332     <label><input type='checkbox' name='wcbloat_prevent_linking_url_comments' <?php checked(esc_attr($value), 'yes'); ?> value='yes'> <?php esc_attr_e('Prevent auto-linking URLs in comments', 'disable-dashboard-for-woocommerce'); ?></label>
    333     <p><?php _e('In a standard WordPress installation, adding clickable links to the comments is made on the fly while generating the page which may be time- and resource-consuming. This option will prevent auto-linking URLs in comments.', 'disable-dashboard-for-woocommerce'); ?></p>
    334 <?php
     287    <label><input type='checkbox' name='wcbloat_prevent_linking_url_comments' <?php
     288    checked( esc_attr( $value ), 'yes' );
     289    ?> value='yes'> <?php
     290    esc_attr_e( 'Prevent auto-linking URLs in comments', 'disable-dashboard-for-woocommerce' );
     291    ?></label>
     292    <p><?php
     293    _e( 'In a standard WordPress installation, adding clickable links to the comments is made on the fly while generating the page which may be time- and resource-consuming. This option will prevent auto-linking URLs in comments.', 'disable-dashboard-for-woocommerce' );
     294    ?></p>
     295<?php
    335296}
    336297
     
    338299function wcbloat_disable_dashicons_callback()
    339300{
    340     $value = get_option('wcbloat_disable_dashicons');
    341 ?>
     301    $value = get_option( 'wcbloat_disable_dashicons' );
     302    ?>
    342303    <input type='hidden' name='wcbloat_disable_dashicons' value='no'>
    343     <label><input type='checkbox' name='wcbloat_disable_dashicons' <?php checked(esc_attr($value), 'yes'); ?> value='yes'> <?php esc_attr_e('Disable WordPress Dashicons on the front-end', 'disable-dashboard-for-woocommerce'); ?></label>
    344     <p><?php _e('Dashicons add additional overhead to your site, slowing it down, especially on slower computers or mobile devices. Disabling dashicons can help reduce the total size of your page and improve your site\'s performance.', 'disable-dashboard-for-woocommerce'); ?></p>
    345 <?php
     304    <label><input type='checkbox' name='wcbloat_disable_dashicons' <?php
     305    checked( esc_attr( $value ), 'yes' );
     306    ?> value='yes'> <?php
     307    esc_attr_e( 'Disable WordPress Dashicons on the front-end', 'disable-dashboard-for-woocommerce' );
     308    ?></label>
     309    <p><?php
     310    _e( 'Dashicons add additional overhead to your site, slowing it down, especially on slower computers or mobile devices. Disabling dashicons can help reduce the total size of your page and improve your site\'s performance.', 'disable-dashboard-for-woocommerce' );
     311    ?></p>
     312<?php
    346313}
    347314
     
    349316function wcbloat_disable_jquery_migrate_callback()
    350317{
    351     $value = get_option('wcbloat_disable_jquery_migrate');
    352 ?>
     318    $value = get_option( 'wcbloat_disable_jquery_migrate' );
     319    ?>
    353320    <input type='hidden' name='wcbloat_disable_jquery_migrate' value='no'>
    354     <label><input type='checkbox' name='wcbloat_disable_jquery_migrate' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Disable jQuery Migrate', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    355     <p><?php _e('The jQuery Migrate was introduced in WordPress to provide backward compatibility for older jQuery code. However, in recent versions of WordPress, many of the compatibility issues have been resolved, so it is no longer necessary in most cases. Disabling jQuery Migrate can improve the performance of your WordPress website by reducing the amount of JavaScript code that needs to be loaded, and by reducing the number of warnings and error messages that are output to the browser console. Additionally, by disabling the plugin, you can avoid potential security vulnerabilities that may arise from using outdated and unsupported code.', 'disable-dashboard-for-woocommerce'); ?></p>
    356 <?php
     321    <label><input type='checkbox' name='wcbloat_disable_jquery_migrate' <?php
     322    checked( esc_attr( $value ), 'yes' );
     323    echo  wcbloat_is_pro_readonly() ;
     324    ?> value='yes'> <?php
     325    esc_attr_e( 'Disable jQuery Migrate', 'disable-dashboard-for-woocommerce' );
     326    echo  wcbloat_is_pro_badge() ;
     327    ?></label>
     328    <p><?php
     329    _e( 'The jQuery Migrate was introduced in WordPress to provide backward compatibility for older jQuery code. However, in recent versions of WordPress, many of the compatibility issues have been resolved, so it is no longer necessary in most cases. Disabling jQuery Migrate can improve the performance of your WordPress website by reducing the amount of JavaScript code that needs to be loaded, and by reducing the number of warnings and error messages that are output to the browser console. Additionally, by disabling the plugin, you can avoid potential security vulnerabilities that may arise from using outdated and unsupported code.', 'disable-dashboard-for-woocommerce' );
     330    ?></p>
     331<?php
    357332}
    358333
     
    360335function wcbloat_remove_dns_prefetch_callback()
    361336{
    362     $value = get_option('wcbloat_remove_dns_prefetch');
    363 ?>
     337    $value = get_option( 'wcbloat_remove_dns_prefetch' );
     338    ?>
    364339    <input type='hidden' name='wcbloat_remove_dns_prefetch' value='no'>
    365     <label><input type='checkbox' name='wcbloat_remove_dns_prefetch' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Remove DNS prefetch to s.w.org', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    366     <p><?php _e('DNS prefetching is an attempt to resolve domain names before a user tries to follow a link. Activating this option will remove DNS prefetch to s.w.org and may result in page load optimization.', 'disable-dashboard-for-woocommerce'); ?></p>
    367 <?php
     340    <label><input type='checkbox' name='wcbloat_remove_dns_prefetch' <?php
     341    checked( esc_attr( $value ), 'yes' );
     342    echo  wcbloat_is_pro_readonly() ;
     343    ?> value='yes'> <?php
     344    esc_attr_e( 'Remove DNS prefetch to s.w.org', 'disable-dashboard-for-woocommerce' );
     345    echo  wcbloat_is_pro_badge() ;
     346    ?></label>
     347    <p><?php
     348    _e( 'DNS prefetching is an attempt to resolve domain names before a user tries to follow a link. Activating this option will remove DNS prefetch to s.w.org and may result in page load optimization.', 'disable-dashboard-for-woocommerce' );
     349    ?></p>
     350<?php
    368351}
    369352
     
    371354function wcbloat_wp_sidebar_widgets_disable_callback()
    372355{
    373     $options = get_option('wcbloat_wp_sidebar_widgets_disable');   
    374     ?>
     356    $options = get_option( 'wcbloat_wp_sidebar_widgets_disable' );
     357    ?>
    375358<div class="wcbloat-select-unselect-buttons">
    376     <a <?php if ( wcbloat_fs()->is__premium_only() ) { if ( wcbloat_fs()->is_plan( 'pro' ) ) { _e('id="select-all"'); }} ?> class="button button-secondary"<?php echo wcbloat_is_pro_readonly();?>><?php esc_attr_e('Select / Deselect All', 'disable-dashboard-for-woocommerce'); ?></a>
     359    <a <?php
     360    ?> class="button button-secondary"<?php
     361    echo  wcbloat_is_pro_readonly() ;
     362    ?>><?php
     363    esc_attr_e( 'Select / Deselect All', 'disable-dashboard-for-woocommerce' );
     364    ?></a>
    377365</div>
    378366<table id="wcbloat-multi-checkbox-table">
    379367<tbody>
    380368  <tr>
    381     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('archives', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='archives'><?php esc_attr_e('Archives', 'disable-dashboard-for-woocommerce'); ?></td>
    382     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('audio', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='audio'><?php esc_attr_e('Audio', 'disable-dashboard-for-woocommerce'); ?></td>
    383     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('block', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='block'><?php esc_attr_e('Block', 'disable-dashboard-for-woocommerce'); ?></td>
     369    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     370    if ( !empty($options) ) {
     371        if ( in_array( 'archives', $options ) ) {
     372            esc_attr_e( 'checked' );
     373        }
     374    }
     375    echo  wcbloat_is_pro_readonly() ;
     376    ?> value='archives'><?php
     377    esc_attr_e( 'Archives', 'disable-dashboard-for-woocommerce' );
     378    ?></td>
     379    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     380    if ( !empty($options) ) {
     381        if ( in_array( 'audio', $options ) ) {
     382            esc_attr_e( 'checked' );
     383        }
     384    }
     385    echo  wcbloat_is_pro_readonly() ;
     386    ?> value='audio'><?php
     387    esc_attr_e( 'Audio', 'disable-dashboard-for-woocommerce' );
     388    ?></td>
     389    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     390    if ( !empty($options) ) {
     391        if ( in_array( 'block', $options ) ) {
     392            esc_attr_e( 'checked' );
     393        }
     394    }
     395    echo  wcbloat_is_pro_readonly() ;
     396    ?> value='block'><?php
     397    esc_attr_e( 'Block', 'disable-dashboard-for-woocommerce' );
     398    ?></td>
    384399</tr>
    385400<tr>
    386     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('calendar', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='calendar'><?php esc_attr_e('Calendar', 'disable-dashboard-for-woocommerce'); ?></td>
    387     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('categories', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='categories'><?php esc_attr_e('Categories', 'disable-dashboard-for-woocommerce'); ?></td>
    388     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('html', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='html'><?php esc_attr_e('Custom HTML', 'disable-dashboard-for-woocommerce'); ?></td>
     401    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     402    if ( !empty($options) ) {
     403        if ( in_array( 'calendar', $options ) ) {
     404            esc_attr_e( 'checked' );
     405        }
     406    }
     407    echo  wcbloat_is_pro_readonly() ;
     408    ?> value='calendar'><?php
     409    esc_attr_e( 'Calendar', 'disable-dashboard-for-woocommerce' );
     410    ?></td>
     411    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     412    if ( !empty($options) ) {
     413        if ( in_array( 'categories', $options ) ) {
     414            esc_attr_e( 'checked' );
     415        }
     416    }
     417    echo  wcbloat_is_pro_readonly() ;
     418    ?> value='categories'><?php
     419    esc_attr_e( 'Categories', 'disable-dashboard-for-woocommerce' );
     420    ?></td>
     421    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     422    if ( !empty($options) ) {
     423        if ( in_array( 'html', $options ) ) {
     424            esc_attr_e( 'checked' );
     425        }
     426    }
     427    echo  wcbloat_is_pro_readonly() ;
     428    ?> value='html'><?php
     429    esc_attr_e( 'Custom HTML', 'disable-dashboard-for-woocommerce' );
     430    ?></td>
    389431</tr>
    390432<tr>
    391     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('gallery', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='gallery'><?php esc_attr_e('Gallery', 'disable-dashboard-for-woocommerce'); ?></td>
    392     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('image', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='image'><?php esc_attr_e('Image', 'disable-dashboard-for-woocommerce'); ?></td>
    393     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('meta', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='meta'><?php esc_attr_e('Meta', 'disable-dashboard-for-woocommerce'); ?></td>
     433    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     434    if ( !empty($options) ) {
     435        if ( in_array( 'gallery', $options ) ) {
     436            esc_attr_e( 'checked' );
     437        }
     438    }
     439    echo  wcbloat_is_pro_readonly() ;
     440    ?> value='gallery'><?php
     441    esc_attr_e( 'Gallery', 'disable-dashboard-for-woocommerce' );
     442    ?></td>
     443    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     444    if ( !empty($options) ) {
     445        if ( in_array( 'image', $options ) ) {
     446            esc_attr_e( 'checked' );
     447        }
     448    }
     449    echo  wcbloat_is_pro_readonly() ;
     450    ?> value='image'><?php
     451    esc_attr_e( 'Image', 'disable-dashboard-for-woocommerce' );
     452    ?></td>
     453    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     454    if ( !empty($options) ) {
     455        if ( in_array( 'meta', $options ) ) {
     456            esc_attr_e( 'checked' );
     457        }
     458    }
     459    echo  wcbloat_is_pro_readonly() ;
     460    ?> value='meta'><?php
     461    esc_attr_e( 'Meta', 'disable-dashboard-for-woocommerce' );
     462    ?></td>
    394463</tr>
    395464<tr>
    396     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('navigation', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='navigation'><?php esc_attr_e('Navigation Menu', 'disable-dashboard-for-woocommerce'); ?></td>
    397     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('pages', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='pages'><?php esc_attr_e('Pages', 'disable-dashboard-for-woocommerce'); ?></td>
    398     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('rss', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='rss'><?php esc_attr_e('RSS', 'disable-dashboard-for-woocommerce'); ?></td>
     465    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     466    if ( !empty($options) ) {
     467        if ( in_array( 'navigation', $options ) ) {
     468            esc_attr_e( 'checked' );
     469        }
     470    }
     471    echo  wcbloat_is_pro_readonly() ;
     472    ?> value='navigation'><?php
     473    esc_attr_e( 'Navigation Menu', 'disable-dashboard-for-woocommerce' );
     474    ?></td>
     475    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     476    if ( !empty($options) ) {
     477        if ( in_array( 'pages', $options ) ) {
     478            esc_attr_e( 'checked' );
     479        }
     480    }
     481    echo  wcbloat_is_pro_readonly() ;
     482    ?> value='pages'><?php
     483    esc_attr_e( 'Pages', 'disable-dashboard-for-woocommerce' );
     484    ?></td>
     485    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     486    if ( !empty($options) ) {
     487        if ( in_array( 'rss', $options ) ) {
     488            esc_attr_e( 'checked' );
     489        }
     490    }
     491    echo  wcbloat_is_pro_readonly() ;
     492    ?> value='rss'><?php
     493    esc_attr_e( 'RSS', 'disable-dashboard-for-woocommerce' );
     494    ?></td>
    399495</tr>
    400496<tr>
    401     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('comments', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='comments'><?php esc_attr_e('Recent Comments', 'disable-dashboard-for-woocommerce'); ?></td>
    402     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('posts', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='posts'><?php esc_attr_e('Recent Posts', 'disable-dashboard-for-woocommerce'); ?></td>
    403     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('search', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='search'><?php esc_attr_e('Search', 'disable-dashboard-for-woocommerce'); ?></td>
     497    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     498    if ( !empty($options) ) {
     499        if ( in_array( 'comments', $options ) ) {
     500            esc_attr_e( 'checked' );
     501        }
     502    }
     503    echo  wcbloat_is_pro_readonly() ;
     504    ?> value='comments'><?php
     505    esc_attr_e( 'Recent Comments', 'disable-dashboard-for-woocommerce' );
     506    ?></td>
     507    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     508    if ( !empty($options) ) {
     509        if ( in_array( 'posts', $options ) ) {
     510            esc_attr_e( 'checked' );
     511        }
     512    }
     513    echo  wcbloat_is_pro_readonly() ;
     514    ?> value='posts'><?php
     515    esc_attr_e( 'Recent Posts', 'disable-dashboard-for-woocommerce' );
     516    ?></td>
     517    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     518    if ( !empty($options) ) {
     519        if ( in_array( 'search', $options ) ) {
     520            esc_attr_e( 'checked' );
     521        }
     522    }
     523    echo  wcbloat_is_pro_readonly() ;
     524    ?> value='search'><?php
     525    esc_attr_e( 'Search', 'disable-dashboard-for-woocommerce' );
     526    ?></td>
    404527</tr>
    405528<tr>
    406     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('tag', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='tag'><?php esc_attr_e('Tag Cloud', 'disable-dashboard-for-woocommerce'); ?></td>
    407     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('text', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='text'><?php esc_attr_e('Text', 'disable-dashboard-for-woocommerce'); ?></td>
    408     <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php if (!empty($options)) { if (in_array('video', $options)) { esc_attr_e('checked'); }} echo wcbloat_is_pro_readonly();?> value='video'><?php esc_attr_e('Video', 'disable-dashboard-for-woocommerce'); ?></td>
     529    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     530    if ( !empty($options) ) {
     531        if ( in_array( 'tag', $options ) ) {
     532            esc_attr_e( 'checked' );
     533        }
     534    }
     535    echo  wcbloat_is_pro_readonly() ;
     536    ?> value='tag'><?php
     537    esc_attr_e( 'Tag Cloud', 'disable-dashboard-for-woocommerce' );
     538    ?></td>
     539    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     540    if ( !empty($options) ) {
     541        if ( in_array( 'text', $options ) ) {
     542            esc_attr_e( 'checked' );
     543        }
     544    }
     545    echo  wcbloat_is_pro_readonly() ;
     546    ?> value='text'><?php
     547    esc_attr_e( 'Text', 'disable-dashboard-for-woocommerce' );
     548    ?></td>
     549    <td class="wcbloat-disable-sidebar-widgets-multi-checkbox"><label><input type='checkbox' name='wcbloat_wp_sidebar_widgets_disable[]' <?php
     550    if ( !empty($options) ) {
     551        if ( in_array( 'video', $options ) ) {
     552            esc_attr_e( 'checked' );
     553        }
     554    }
     555    echo  wcbloat_is_pro_readonly() ;
     556    ?> value='video'><?php
     557    esc_attr_e( 'Video', 'disable-dashboard-for-woocommerce' );
     558    ?></td>
    409559</tr>
    410560</tbody>
    411561</table>
    412     <p><?php echo wcbloat_is_pro_badge(); _e('WordPress by default comes with a lot of Dashboard widgets installed. They often are not used at all, but can add backend load and front-end load. Choose Dashboard Widgets you would like to disable for this site. The <strong>ones you choose will be disabled</strong>, and the <strong>ones that had not been selected will stay active</strong>.
    413 
    414 ', 'disable-dashboard-for-woocommerce'); ?></p>
    415 
    416     <?php
     562    <p><?php
     563    echo  wcbloat_is_pro_badge() ;
     564    _e( 'WordPress by default comes with a lot of Dashboard widgets installed. They often are not used at all, but can add backend load and front-end load. Choose Dashboard Widgets you would like to disable for this site. The <strong>ones you choose will be disabled</strong>, and the <strong>ones that had not been selected will stay active</strong>.
     565
     566', 'disable-dashboard-for-woocommerce' );
     567    ?></p>
     568
     569    <?php
    417570}
    418571
     
    420573function wcbloat_wp_meta_generator_disable_callback()
    421574{
    422     $value = get_option('wcbloat_wp_meta_generator_disable');
    423 ?>
     575    $value = get_option( 'wcbloat_wp_meta_generator_disable' );
     576    ?>
    424577    <input type='hidden' name='wcbloat_wp_meta_generator_disable' value='no'>
    425     <label><input type='checkbox' name='wcbloat_wp_meta_generator_disable' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Remove WordPress & WooCommerce Meta Generator Tag', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    426     <p><?php _e('Meta Generator Tag displays the WordPress & WooCommerce version number. Removing the meta generator tag protects you against attacks and may reduce your web page\'s size. Use this option to disable the Meta Tag generated by WordPress, WooCommerce, and many other plugins that hook up with the wp_generator action.', 'disable-dashboard-for-woocommerce'); ?></p>
    427 <?php
     578    <label><input type='checkbox' name='wcbloat_wp_meta_generator_disable' <?php
     579    checked( esc_attr( $value ), 'yes' );
     580    echo  wcbloat_is_pro_readonly() ;
     581    ?> value='yes'> <?php
     582    esc_attr_e( 'Remove WordPress & WooCommerce Meta Generator Tag', 'disable-dashboard-for-woocommerce' );
     583    echo  wcbloat_is_pro_badge() ;
     584    ?></label>
     585    <p><?php
     586    _e( 'Meta Generator Tag displays the WordPress & WooCommerce version number. Removing the meta generator tag protects you against attacks and may reduce your web page\'s size. Use this option to disable the Meta Tag generated by WordPress, WooCommerce, and many other plugins that hook up with the wp_generator action.', 'disable-dashboard-for-woocommerce' );
     587    ?></p>
     588<?php
    428589}
    429590
     
    431592function wcbloat_remove_emoji_scripts_callback()
    432593{
    433     $value = get_option('wcbloat_remove_emoji_scripts');
    434 ?>
     594    $value = get_option( 'wcbloat_remove_emoji_scripts' );
     595    ?>
    435596    <input type='hidden' name='wcbloat_remove_emoji_scripts' value='no'>
    436     <label><input type='checkbox' name='wcbloat_remove_emoji_scripts' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Remove emoji styles and scripts', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    437     <p><?php _e('Remove the code bloat used to add support for emojis in older browsers. Emoticons and emojis will still work in browsers that have built-in support for them.', 'disable-dashboard-for-woocommerce'); ?></p>
    438 <?php
     597    <label><input type='checkbox' name='wcbloat_remove_emoji_scripts' <?php
     598    checked( esc_attr( $value ), 'yes' );
     599    echo  wcbloat_is_pro_readonly() ;
     600    ?> value='yes'> <?php
     601    esc_attr_e( 'Remove emoji styles and scripts', 'disable-dashboard-for-woocommerce' );
     602    echo  wcbloat_is_pro_badge() ;
     603    ?></label>
     604    <p><?php
     605    _e( 'Remove the code bloat used to add support for emojis in older browsers. Emoticons and emojis will still work in browsers that have built-in support for them.', 'disable-dashboard-for-woocommerce' );
     606    ?></p>
     607<?php
    439608}
    440609
     
    442611function wcbloat_disable_wp_embed_callback()
    443612{
    444     $value = get_option('wcbloat_disable_wp_embed');
    445 ?>
     613    $value = get_option( 'wcbloat_disable_wp_embed' );
     614    ?>
    446615    <input type='hidden' name='wcbloat_disable_wp_embed' value='no'>
    447     <label><input type='checkbox' name='wcbloat_disable_wp_embed' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Disable wp-embed', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    448     <p><?php _e('Prevents the WordPress core feature known as wp-embed from loading on your website. The wp-embed feature allows you to embed videos, images, tweets, and other types of content from various platforms by pasting a URL into the WordPress editor. While this feature can be useful, it can also slow down your site\'s loading times, increase your server resources usage, and pose potential security risks.', 'disable-dashboard-for-woocommerce'); ?></p>
    449 <?php
     616    <label><input type='checkbox' name='wcbloat_disable_wp_embed' <?php
     617    checked( esc_attr( $value ), 'yes' );
     618    echo  wcbloat_is_pro_readonly() ;
     619    ?> value='yes'> <?php
     620    esc_attr_e( 'Disable wp-embed', 'disable-dashboard-for-woocommerce' );
     621    echo  wcbloat_is_pro_badge() ;
     622    ?></label>
     623    <p><?php
     624    _e( 'Prevents the WordPress core feature known as wp-embed from loading on your website. The wp-embed feature allows you to embed videos, images, tweets, and other types of content from various platforms by pasting a URL into the WordPress editor. While this feature can be useful, it can also slow down your site\'s loading times, increase your server resources usage, and pose potential security risks.', 'disable-dashboard-for-woocommerce' );
     625    ?></p>
     626<?php
    450627}
    451628
     
    453630function wcbloat_site_performance_header_section_callback()
    454631{
    455     _e('Remove unwanted scripts from the Header section of your site. The header section is used on all of your subpages and in most cases you do not need to load all the default scripts. Use the option below to turn them off.', 'disable-dashboard-for-woocommerce');
     632    _e( 'Remove unwanted scripts from the Header section of your site. The header section is used on all of your subpages and in most cases you do not need to load all the default scripts. Use the option below to turn them off.', 'disable-dashboard-for-woocommerce' );
    456633}
    457634
     
    459636function wcbloat_remove_rss_links_callback()
    460637{
    461     $value = get_option('wcbloat_remove_rss_links');
    462 ?>
     638    $value = get_option( 'wcbloat_remove_rss_links' );
     639    ?>
    463640    <input type='hidden' name='wcbloat_remove_rss_links' value='no'>
    464     <label><input type='checkbox' name='wcbloat_remove_rss_links' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Remove RSS Feed Links', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    465     <p><?php _e('If you do not use RSS feeds, you can safely turn them off without losing any functionality. Links to RSS Feeds will be removed from the plugin header, but the process of generating RSS feeds will still be active.', 'disable-dashboard-for-woocommerce'); ?></p>
    466 <?php
     641    <label><input type='checkbox' name='wcbloat_remove_rss_links' <?php
     642    checked( esc_attr( $value ), 'yes' );
     643    echo  wcbloat_is_pro_readonly() ;
     644    ?> value='yes'> <?php
     645    esc_attr_e( 'Remove RSS Feed Links', 'disable-dashboard-for-woocommerce' );
     646    echo  wcbloat_is_pro_badge() ;
     647    ?></label>
     648    <p><?php
     649    _e( 'If you do not use RSS feeds, you can safely turn them off without losing any functionality. Links to RSS Feeds will be removed from the plugin header, but the process of generating RSS feeds will still be active.', 'disable-dashboard-for-woocommerce' );
     650    ?></p>
     651<?php
    467652}
    468653
     
    470655function wcbloat_disable_all_feeds_callback()
    471656{
    472     $value = get_option('wcbloat_disable_all_feeds');
    473 ?>
     657    $value = get_option( 'wcbloat_disable_all_feeds' );
     658    ?>
    474659    <input type='hidden' name='wcbloat_disable_all_feeds' value='no'>
    475     <label><input type='checkbox' name='wcbloat_disable_all_feeds' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Disable all RSS feeds', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    476     <p><?php _e('You can also completely disable the RSS generation process by activating this option. If it is a feature that you do not plan to use, you can disable RSS Feeds.', 'disable-dashboard-for-woocommerce', 'disable-dashboard-for-woocommerce'); ?></p>
    477 <?php
     660    <label><input type='checkbox' name='wcbloat_disable_all_feeds' <?php
     661    checked( esc_attr( $value ), 'yes' );
     662    echo  wcbloat_is_pro_readonly() ;
     663    ?> value='yes'> <?php
     664    esc_attr_e( 'Disable all RSS feeds', 'disable-dashboard-for-woocommerce' );
     665    echo  wcbloat_is_pro_badge() ;
     666    ?></label>
     667    <p><?php
     668    _e( 'You can also completely disable the RSS generation process by activating this option. If it is a feature that you do not plan to use, you can disable RSS Feeds.', 'disable-dashboard-for-woocommerce', 'disable-dashboard-for-woocommerce' );
     669    ?></p>
     670<?php
    478671}
    479672
     
    481674function wcbloat_remove_feed_generator_tag_callback()
    482675{
    483     $value = get_option('wcbloat_remove_feed_generator_tag');
    484 ?>
     676    $value = get_option( 'wcbloat_remove_feed_generator_tag' );
     677    ?>
    485678    <input type='hidden' name='wcbloat_remove_feed_generator_tag' value='no'>
    486     <label><input type='checkbox' name='wcbloat_remove_feed_generator_tag' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Remove the Generator Tag From RSS Feeds', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    487     <p><?php _e('This option will Remove the Generator Tag From RSS Feeds', 'disable-dashboard-for-woocommerce', 'disable-dashboard-for-woocommerce'); ?></p>
    488 <?php
     679    <label><input type='checkbox' name='wcbloat_remove_feed_generator_tag' <?php
     680    checked( esc_attr( $value ), 'yes' );
     681    echo  wcbloat_is_pro_readonly() ;
     682    ?> value='yes'> <?php
     683    esc_attr_e( 'Remove the Generator Tag From RSS Feeds', 'disable-dashboard-for-woocommerce' );
     684    echo  wcbloat_is_pro_badge() ;
     685    ?></label>
     686    <p><?php
     687    _e( 'This option will Remove the Generator Tag From RSS Feeds', 'disable-dashboard-for-woocommerce', 'disable-dashboard-for-woocommerce' );
     688    ?></p>
     689<?php
    489690}
    490691
     
    492693function wcbloat_disable_wlw_link_callback()
    493694{
    494     $value = get_option('wcbloat_disable_wlw_link');
    495 ?>
     695    $value = get_option( 'wcbloat_disable_wlw_link' );
     696    ?>
    496697    <input type='hidden' name='wcbloat_disable_wlw_link' value='no'>
    497     <label><input type='checkbox' name='wcbloat_disable_wlw_link' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Remove Link to the Windows Live Writer Manifest File', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    498     <p><?php _e('If are not using software called Windows Live Writer, you can safely turn off this feature that is added to your header by default.', 'disable-dashboard-for-woocommerce', 'disable-dashboard-for-woocommerce'); ?></p>
    499 <?php
     698    <label><input type='checkbox' name='wcbloat_disable_wlw_link' <?php
     699    checked( esc_attr( $value ), 'yes' );
     700    echo  wcbloat_is_pro_readonly() ;
     701    ?> value='yes'> <?php
     702    esc_attr_e( 'Remove Link to the Windows Live Writer Manifest File', 'disable-dashboard-for-woocommerce' );
     703    echo  wcbloat_is_pro_badge() ;
     704    ?></label>
     705    <p><?php
     706    _e( 'If are not using software called Windows Live Writer, you can safely turn off this feature that is added to your header by default.', 'disable-dashboard-for-woocommerce', 'disable-dashboard-for-woocommerce' );
     707    ?></p>
     708<?php
    500709}
    501710
     
    503712function wcbloat_disable_rsd_link_callback()
    504713{
    505     $value = get_option('wcbloat_disable_rsd_link');
    506 ?>
     714    $value = get_option( 'wcbloat_disable_rsd_link' );
     715    ?>
    507716    <input type='hidden' name='wcbloat_disable_rsd_link' value='no'>
    508     <label><input type='checkbox' name='wcbloat_disable_rsd_link' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Remove RSD link', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    509     <p><?php _e('RSD link is a tag that is added to your Header by default. The RSD link is used by software blog clients. If you access your site admin panel from the browser then it is safe for you to remove the RSD Link.', 'disable-dashboard-for-woocommerce', 'disable-dashboard-for-woocommerce'); ?></p>
    510 <?php
     717    <label><input type='checkbox' name='wcbloat_disable_rsd_link' <?php
     718    checked( esc_attr( $value ), 'yes' );
     719    echo  wcbloat_is_pro_readonly() ;
     720    ?> value='yes'> <?php
     721    esc_attr_e( 'Remove RSD link', 'disable-dashboard-for-woocommerce' );
     722    echo  wcbloat_is_pro_badge() ;
     723    ?></label>
     724    <p><?php
     725    _e( 'RSD link is a tag that is added to your Header by default. The RSD link is used by software blog clients. If you access your site admin panel from the browser then it is safe for you to remove the RSD Link.', 'disable-dashboard-for-woocommerce', 'disable-dashboard-for-woocommerce' );
     726    ?></p>
     727<?php
    511728}
    512729
     
    514731function wcbloat_remove_shortlink_callback()
    515732{
    516     $value = get_option('wcbloat_remove_shortlink');
    517 ?>
     733    $value = get_option( 'wcbloat_remove_shortlink' );
     734    ?>
    518735    <input type='hidden' name='wcbloat_remove_shortlink' value='no'>
    519     <label><input type='checkbox' name='wcbloat_remove_shortlink' <?php checked(esc_attr($value), 'yes'); echo wcbloat_is_pro_readonly(); ?> value='yes'> <?php esc_attr_e('Remove Shortlink From HTTP Header', 'disable-dashboard-for-woocommerce'); echo wcbloat_is_pro_badge(); ?></label>
    520     <p><?php _e('Shortlink is the shorter version of the post or page URL. Shortlink (enabled in WordPress by default) creates a separate request on every page.', 'disable-dashboard-for-woocommerce', 'disable-dashboard-for-woocommerce'); ?></p>
    521 <?php
    522 }
     736    <label><input type='checkbox' name='wcbloat_remove_shortlink' <?php
     737    checked( esc_attr( $value ), 'yes' );
     738    echo  wcbloat_is_pro_readonly() ;
     739    ?> value='yes'> <?php
     740    esc_attr_e( 'Remove Shortlink From HTTP Header', 'disable-dashboard-for-woocommerce' );
     741    echo  wcbloat_is_pro_badge() ;
     742    ?></label>
     743    <p><?php
     744    _e( 'Shortlink is the shorter version of the post or page URL. Shortlink (enabled in WordPress by default) creates a separate request on every page.', 'disable-dashboard-for-woocommerce', 'disable-dashboard-for-woocommerce' );
     745    ?></p>
     746<?php
     747}
  • disable-dashboard-for-woocommerce/trunk/readme.txt

    r2943912 r2943924  
    22Contributors: disablebloat
    33Tags: WooCommerce, disable WooCommerce admin, remove bloat, debloat, unbloat, Yoast SEO, white label, speed up WordPress
    4 Stable tag: 3.2.10
     4Stable tag: 3.2.11
    55Requires at least: 5.0
    66Tested up to: 6.3
     
    259259
    260260== Changelog ==
     261
     262= [3.2.11] - 2023-07-27 =
     263
     264- Fixed: i18n phrases for translation
    261265
    262266= [3.2.10] - 2023-07-26 =
Note: See TracChangeset for help on using the changeset viewer.