Skip to content

Commit

Permalink
Update function.login-header.php to be compatible with WP 5.7
Browse files Browse the repository at this point in the history
wp_no_robots is deprecated since WP 5.7.

Change login_header function to mimic login_header function from wp-login.php
  • Loading branch information
cfaria authored Jul 9, 2021
1 parent f10c289 commit a64a76f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion includes/function.login-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ function login_header( $title = 'Log In', $message = '', $wp_error = null ) {
global $error, $interim_login, $action;

// Don't index any of these forms.
add_action( 'login_head', 'wp_no_robots' );
add_filter( 'wp_robots', 'wp_robots_sensitive_page' );
add_action( 'login_head', 'wp_strict_cross_origin_referrer' );

add_action( 'login_head', 'wp_login_viewport_meta' );

Expand Down

0 comments on commit a64a76f

Please sign in to comment.