author | ymh <ymh.work@gmail.com> |
Fri, 06 Dec 2019 00:53:05 +0100 | |
changeset 3 | 5301eb6ce6e2 |
permissions | -rw-r--r-- |
3 | 1 |
<?php |
2 |
/* |
|
3 |
Plugin Name: Disallow Indexing |
|
4 |
Plugin URI: https://roots.io/bedrock/ |
|
5 |
Description: Disallow indexing of your site on non-production environments. |
|
6 |
Version: 1.0.0 |
|
7 |
Author: Roots |
|
8 |
Author URI: https://roots.io/ |
|
9 |
License: MIT License |
|
10 |
*/ |
|
11 |
||
12 |
if (defined('WP_ENV') && WP_ENV !== 'production' && !is_admin()) { |
|
13 |
add_action('pre_option_blog_public', '__return_zero'); |
|
14 |
} |