3232function force_https_filter_home ( $ value ) {
3333 return set_url_scheme ( $ value , 'https ' );
3434}
35-
35+ // no priority needed since pre_option filters override values immediately
3636add_filter ( 'pre_option_home ' , 'force_https_filter_home ' );
3737add_filter ( 'pre_option_siteurl ' , 'force_https_filter_home ' );
3838
@@ -90,6 +90,7 @@ function force_https_securize_url( $value ) {
9090add_filter ( 'wc_get_endpoint_url ' , 'force_https_securize_url ' , 10 );
9191add_filter ( 'woocommerce_account_endpoint_url ' , 'force_https_securize_url ' , 10 );
9292add_filter ( 'wp_get_attachment_url ' , 'force_https_securize_url ' , 10 );
93+ add_filter ( 'wp_logout_url ' , 'force_https_securize_url ' , 10 );
9394
9495// enforce https on html content that may contain urls
9596function force_https_filter_output ( $ content ) {
@@ -116,6 +117,7 @@ function force_https_filter_output( $content ) {
116117add_filter ( 'woocommerce_rest_prepare_order ' , 'force_https_filter_output ' , 999 );
117118add_filter ( 'woocommerce_rest_prepare_product ' , 'force_https_filter_output ' , 999 );
118119add_filter ( 'wp_redirect ' , 'force_https_filter_output ' , 999 );
120+ add_filter ( 'wp_safe_redirect ' , 'force_https_filter_output ' , 999 );
119121
120122// force https on all elements and attributes with urls
121123add_filter ( 'the_content ' , 'force_https_process_content ' , 20 );
0 commit comments