disallow-indexing.php 419 B

1234567891011121314
  1. <?php
  2. /**
  3. * Plugin Name: Disallow Indexing
  4. * Plugin URI: https://github.com/roots/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. if (defined('WP_ENV') && WP_ENV !== 'production' && !is_admin()) {
  12. add_action('pre_option_blog_public', '__return_zero');
  13. }