| changeset 1 | 79bc439970cd |
| 0:800e4a6ab128 | 1:79bc439970cd |
|---|---|
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 } |