Skip to content

Commit d30524f

Browse files
authored
Update force-https.php
1 parent f810cfc commit d30524f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

force-https.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
function 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
3636
add_filter( 'pre_option_home', 'force_https_filter_home' );
3737
add_filter( 'pre_option_siteurl', 'force_https_filter_home' );
3838

@@ -90,6 +90,7 @@ function force_https_securize_url( $value ) {
9090
add_filter( 'wc_get_endpoint_url', 'force_https_securize_url', 10 );
9191
add_filter( 'woocommerce_account_endpoint_url', 'force_https_securize_url', 10 );
9292
add_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
9596
function force_https_filter_output( $content ) {
@@ -116,6 +117,7 @@ function force_https_filter_output( $content ) {
116117
add_filter( 'woocommerce_rest_prepare_order', 'force_https_filter_output', 999 );
117118
add_filter( 'woocommerce_rest_prepare_product', 'force_https_filter_output', 999 );
118119
add_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
121123
add_filter( 'the_content', 'force_https_process_content', 20 );

0 commit comments

Comments
 (0)