/** * Enables the HTTP Strict Transport Security (HSTS) header in WordPress. * Includes preloading with subdomain support. */ function tg_enable_strict_transport_security_hsts_header_wordpress() { header( ‘Strict-Transport-Security: max-age=31536000; includeSubDomains; preload’ ); } add_action( ‘send_headers’, ‘tg_enable_strict_transport_security_hsts_header_wordpress’ );Continue reading
// Add this code to your theme’s functions.php file or a custom plugin. add_filter(‘unzip_file_use_ziparchive’, ‘__return_false’);Continue reading
add_action( ‘woocommerce_thankyou’, function ( $order_id ) { if ( ! $order_id ) { return; } $order = wc_get_order( $order_id ); if( ‘processing’ == $order->get_status() ) { $order->update_status( ‘completed’ ); } } );Continue reading
add_filter( ‘beehive_google_analytics_ga4_accounts_page_size’, function ( $limit ) { return 100; } );Continue reading
add_filter( ‘gettext’, function ( $translated_text, $text, $domain ) { if ( $text == ‘Birthday (optional)’ ) { $translated_text = __( ‘Birthday’, ‘rug’ ); } return $translated_text; }, 20, 3 );Continue reading
add_action( ‘wp’, function () { remove_theme_support( ‘wc-product-gallery-zoom’ ); }, 100 );Continue reading
add_filter( ‘rank_math_clear_data_on_uninstall’, ‘__return_true’ );Continue reading
add_filter( ‘body_class’, function ( $classes ) { global $post; if ( is_front_page() || is_page( [64, 78, 532, 533, 76] ) || $post->post_parent == 64 || is_singular( ‘product’ ) || is_post_type_archive( ‘product’ ) ) { $classes[] = ‘header-button-blue’; } if (…Continue reading
add_filter( ‘woocommerce_cart_item_thumbnail’, ‘__return_false’ );Continue reading
add_filter( ‘woocommerce_is_sold_individually’, function ( $return, $product ) { return true; }, 10, 2 );Continue reading