Skip to content

Commit b2caa48

Browse files
authored
Update force-https.php
1 parent a9d298d commit b2caa48

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

force-https.php

+1-9
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ function force_https_securize_url( $value ) {
7777
add_filter( 'includes_url', 'force_https_securize_url', 10 );
7878
add_filter( 'login_redirect', 'force_https_securize_url', 10 );
7979
add_filter( 'logout_redirect', 'force_https_securize_url', 10 );
80+
add_filter( 'nav_menu_link_attributes', 'force_https_securize_url', 10 );
8081
add_filter( 'network_home_url', 'force_https_securize_url', 10 );
8182
add_filter( 'network_site_url', 'force_https_securize_url', 10 );
8283
add_filter( 'page_link', 'force_https_securize_url', 10 );
@@ -126,15 +127,6 @@ function( $matches ) {
126127
);
127128
}
128129

129-
// enforce https for custom menus
130-
add_filter( 'nav_menu_link_attributes', 'force_https_fix_menu_links', 999 );
131-
function force_https_fix_menu_links( $atts ) {
132-
if ( isset( $atts['href'] ) ) {
133-
$atts['href'] = set_url_scheme( $atts['href'], 'https' );
134-
}
135-
return $atts;
136-
}
137-
138130
// enforce https for wp resource hints
139131
add_filter( 'wp_resource_hints', 'force_https_fix_resource_hints', 999 );
140132
function force_https_fix_resource_hints( $urls ) {

0 commit comments

Comments
 (0)