@@ -77,6 +77,7 @@ function force_https_securize_url( $value ) {
7777add_filter ( 'includes_url ' , 'force_https_securize_url ' , 10 );
7878add_filter ( 'login_redirect ' , 'force_https_securize_url ' , 10 );
7979add_filter ( 'logout_redirect ' , 'force_https_securize_url ' , 10 );
80+ add_filter ( 'nav_menu_link_attributes ' , 'force_https_securize_url ' , 10 );
8081add_filter ( 'network_home_url ' , 'force_https_securize_url ' , 10 );
8182add_filter ( 'network_site_url ' , 'force_https_securize_url ' , 10 );
8283add_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
139131add_filter ( 'wp_resource_hints ' , 'force_https_fix_resource_hints ' , 999 );
140132function force_https_fix_resource_hints ( $ urls ) {
0 commit comments