Category: Disable
Require a comments with rating (copy)
add_filter( ‘tasty_recipes_min_rating_without_comment’, function() { return 6; // Require comments for 4 and 5 star ratings too. } );Continue reading
Remove users from WP-JSON
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
Hotfix: Remove Stripe Statement Descriptor
/** * Ensures that a Statement Descriptor is not sent to the Stripe PaymentIntent creation process. * * This is a HOTFIX and is not intended for long-term use. We recommend updating to Easy Digital Downloads 3.2.8+ * * This…Continue reading
Remove Zoom on WC product gallery
add_action( ‘wp’, function () { remove_theme_support( ‘wc-product-gallery-zoom’ ); }, 100 );Continue reading
Remove thumbnails from cart
add_filter( ‘woocommerce_cart_item_thumbnail’, ‘__return_false’ );Continue reading
Disable admin icons for logged out users
add_action(‘wp_enqueue_scripts’, function () { if ( is_user_logged_in() ) { return; } wp_deregister_style( ‘dashicons’ ); } );Continue reading
Disable OEmbed
remove_action( ‘wp_head’, ‘wp_oembed_add_discovery_links’, 10 ); // Remove the REST API endpoint. remove_action( ‘rest_api_init’, ‘wp_oembed_register_route’ ); // Turn off oEmbed auto discovery. add_filter( ’embed_oembed_discover’, ‘__return_false’ ); // Don’t filter oEmbed results. remove_filter( ‘oembed_dataparse’, ‘wp_filter_oembed_result’, 10 ); // Remove oEmbed discovery links.…Continue reading
Disable built-in WordPress JavaScript for rendering emojis
remove_action( ‘wp_head’, ‘print_emoji_detection_script’, 7 ); remove_action( ‘admin_print_scripts’, ‘print_emoji_detection_script’ ); remove_action( ‘wp_print_styles’, ‘print_emoji_styles’ ); remove_action( ‘admin_print_styles’, ‘print_emoji_styles’ ); remove_filter( ‘the_content_feed’, ‘wp_staticize_emoji’ ); remove_filter( ‘comment_text_rss’, ‘wp_staticize_emoji’ ); remove_filter( ‘wp_mail’, ‘wp_staticize_emoji_for_email’ ); // New Filters add_filter( ‘tiny_mce_plugins’, function ( $plugins ) { if…Continue reading
Remove & Disable Pingbacks
// Disable Pingback method add_filter( ‘xmlrpc_methods’, /** * @param array $methods * @return array */ static function ( $methods ) { unset( $methods[‘pingback.ping’], $methods[‘pingback.extensions.getPingbacks’] ); return $methods; } ); // Remove X-Pingback HTTP header add_filter( ‘wp_headers’, /** * @param array…Continue reading