Disable default WordPress image sizes

// Disable default WordPress image sizes add_filter(‘intermediate_image_sizes’, ‘__return_empty_array’); // Disable large scaled image size add_filter(‘big_image_size_threshold’, ‘__return_false’); // Disable WooCommerce image sizes and prevent WooCommerce from regenerating sizes add_action(‘after_setup_theme’, function () { // WooCommerce image sizes remove_image_size(‘woocommerce_thumbnail’); remove_image_size(‘woocommerce_single’); remove_image_size(‘woocommerce_gallery_thumbnail’); // Clear…Continue reading

Disable All UpdraftPlus Email Notifications

/** * Comprehensive UpdraftPlus Email Notification Disabler * Add this code to your theme’s functions.php or WPCode * By: Empathy First Media */ // Master switches and initialization prevention add_filter(‘updraftplus_disable_all_mail_init’, ‘__return_true’); // Master switch to disable email initialization add_filter(‘updraftplus_email’, ‘__return_false’);…Continue reading

Disabilitazione wp v2 users rest api

// Disable /users rest routes add_filter(‘rest_endpoints’, function( $endpoints ) { if ( isset( $endpoints[‘/wp/v2/users’] ) ) { unset( $endpoints[‘/wp/v2/users’] ); } if ( isset( $endpoints[‘/wp/v2/users/(?P[\d]+)’] ) ) { unset( $endpoints[‘/wp/v2/users/(?P[\d]+)’] ); } return $endpoints; });Continue reading