mirror of
https://gh.wpcy.net/https://github.com/fairpm/server.git
synced 2026-06-20 03:02:27 +08:00
17 lines
473 B
PHP
17 lines
473 B
PHP
<?php
|
|
/*
|
|
Plugin Name: Disallow Indexing (FAIR)
|
|
Description: Disallow indexing of your site on non-production environments. Based on roots/bedrock-disallow-indexing.
|
|
Version: 1.0
|
|
Author: FAIR
|
|
Author URI: https://fair.pm
|
|
License: MIT
|
|
*/
|
|
|
|
if (!defined('DISALLOW_INDEXING') || DISALLOW_INDEXING !== true) {
|
|
return;
|
|
}
|
|
|
|
add_action('pre_option_blog_public', '__return_zero');
|
|
|
|
// Unlike the Roots Bedrock mu-plugin, this one does not add an admin notice.
|