Support » Plugin: iThemes Security (formerly Better WP Security) » wp_no_robots() deprecated in wp 5.7

Viewing 2 replies - 1 through 2 (of 2 total)
  • Very true but as can be read on the plugin page:

    Version: 7.9.0
    Last updated: 3 months ago
    Active installations: 1+ million
    WordPress Version: 5.4 or higher
    Tested up to: 5.6.2

    iThemes will probably show some signs of live shortly … 😉

    As a temporary solution replace the line below (line 14) in the better-wp-security\core\templates\lockout\lockout.php file:

    <?php wp_no_robots(); ?>

    with:

    <?php
    	if ( function_exists( 'wp_robots' ) && function_exists( 'wp_robots_no_robots' ) && function_exists( 'add_filter' ) ) {
    	 	add_filter( 'wp_robots', 'wp_robots_no_robots' );
    	 	wp_robots();
    	} else {
    		wp_no_robots(); //Backwards compatibility with WordPress < 5.7.x
    	}
    ?>

    Note the above change may be lost after updating the iTSec plugin once a new plugin update is available (Use at your own risk, solution untested).

    To prevent any confusion, I’m not iThemes.

    • This reply was modified 3 months, 1 week ago by nlpro.
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.