Disable URL rewriting logic for HTTPS detection in WordPress 5.7

Disable URL rewriting logic for HTTPS detection in WordPress 5.7 on your child site.

Snippet Type

Execute on Child Sites

Snippet

remove_filter( 'the_content', 'wp_replace_insecure_home_url' );
remove_filter( 'the_excerpt', 'wp_replace_insecure_home_url' );
remove_filter( 'widget_text_content', 'wp_replace_insecure_home_url' );
remove_filter( 'wp_get_custom_css', 'wp_replace_insecure_home_url' );
1 Like