src/web/app/mu-plugins/disallow-indexing.php
author salimr <riwad.salim@yahoo.fr>
Tue, 14 May 2019 12:09:35 +0200
changeset 11 2c9f9128c49b
parent 1 79bc439970cd
permissions -rw-r--r--
Add links to partners logo

<?php
/*
Plugin Name:  Disallow Indexing
Plugin URI:   https://roots.io/bedrock/
Description:  Disallow indexing of your site on non-production environments.
Version:      1.0.0
Author:       Roots
Author URI:   https://roots.io/
License:      MIT License
*/

if (defined('WP_ENV') && WP_ENV !== 'production' && !is_admin()) {
    add_action('pre_option_blog_public', '__return_zero');
}