Make inc/security.php overwritable
See: https://github.com/holger1411/understrap/issues/409 - Thx @ErinPo
This commit is contained in:
parent
bbcec7e92a
commit
10f5e9212e
|
@ -5,6 +5,7 @@
|
||||||
* @package understrap
|
* @package understrap
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if ( ! function_exists( 'no_generator' ) ) {
|
||||||
/**
|
/**
|
||||||
* Removes the generator tag with WP version numbers. Hackers will use this to find weak and old WP installs
|
* Removes the generator tag with WP version numbers. Hackers will use this to find weak and old WP installs
|
||||||
*
|
*
|
||||||
|
@ -13,7 +14,7 @@
|
||||||
function no_generator() {
|
function no_generator() {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
} // endif function_exists( 'no_generator' ).
|
||||||
add_filter( 'the_generator', 'no_generator' );
|
add_filter( 'the_generator', 'no_generator' );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -28,6 +29,7 @@ remove_action( 'wp_head', 'feed_links_extra', 3 );
|
||||||
remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10);
|
remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10);
|
||||||
remove_action( 'wp_head', 'wp_shortlink_wp_head', 10);
|
remove_action( 'wp_head', 'wp_shortlink_wp_head', 10);
|
||||||
|
|
||||||
|
if ( ! function_exists( 'show_less_login_info' ) ) {
|
||||||
/**
|
/**
|
||||||
* Show less info to users on failed login for security.
|
* Show less info to users on failed login for security.
|
||||||
* (Will not let a valid username be known.)
|
* (Will not let a valid username be known.)
|
||||||
|
@ -37,5 +39,6 @@ remove_action( 'wp_head', 'wp_shortlink_wp_head', 10);
|
||||||
function show_less_login_info() {
|
function show_less_login_info() {
|
||||||
return '<strong>ERROR</strong>: Stop guessing!';
|
return '<strong>ERROR</strong>: Stop guessing!';
|
||||||
}
|
}
|
||||||
|
} // endif function_exists( 'show_less_login_info' ).
|
||||||
|
|
||||||
add_filter( 'login_errors', 'show_less_login_info' );
|
add_filter( 'login_errors', 'show_less_login_info' );
|
||||||
|
|
Reference in New Issue