@@ -77,6 +77,7 @@ function force_https_securize_url( $value ) {
77
77
add_filter ( 'includes_url ' , 'force_https_securize_url ' , 10 );
78
78
add_filter ( 'login_redirect ' , 'force_https_securize_url ' , 10 );
79
79
add_filter ( 'logout_redirect ' , 'force_https_securize_url ' , 10 );
80
+ add_filter ( 'nav_menu_link_attributes ' , 'force_https_securize_url ' , 10 );
80
81
add_filter ( 'network_home_url ' , 'force_https_securize_url ' , 10 );
81
82
add_filter ( 'network_site_url ' , 'force_https_securize_url ' , 10 );
82
83
add_filter ( 'page_link ' , 'force_https_securize_url ' , 10 );
@@ -126,15 +127,6 @@ function( $matches ) {
126
127
);
127
128
}
128
129
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
-
138
130
// enforce https for wp resource hints
139
131
add_filter ( 'wp_resource_hints ' , 'force_https_fix_resource_hints ' , 999 );
140
132
function force_https_fix_resource_hints ( $ urls ) {
0 commit comments