From 6c28192e17cb9e02a5c0c99691a18552b85e1615 Mon Sep 17 00:00:00 2001 From: QWp6t Date: Tue, 19 May 2020 19:25:07 -0600 Subject: [PATCH] Initial commit --- .editorconfig | 14 ++++++++++++++ .gitignore | 3 +++ LICENSE.md | 21 +++++++++++++++++++++ README.md | 31 +++++++++++++++++++++++++++++++ bedrock-disallow-indexing.php | 32 ++++++++++++++++++++++++++++++++ composer.json | 33 +++++++++++++++++++++++++++++++++ 6 files changed, 134 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitignore create mode 100644 LICENSE.md create mode 100644 README.md create mode 100644 bedrock-disallow-indexing.php create mode 100644 composer.json diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..d60f3b2 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +# editorconfig.org + +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.php] +indent_size = 4 \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a29b2ea --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +composer.lock +/vendor + diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..a275cb4 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Roots + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..d6f85a1 --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +

+ + Bedrock + +

+ +

+ + MIT License + + + + Packagist + + + + Follow Roots + +

+ +

+ Bedrock Disallow Indexing +

+ +

+ Roots Website | Bedrock Documentation +

+ +## Overview + +This plugin will prevent indexing of a site when `WP_ENV` is not set to `production`. diff --git a/bedrock-disallow-indexing.php b/bedrock-disallow-indexing.php new file mode 100644 index 0000000..52a0b81 --- /dev/null +++ b/bedrock-disallow-indexing.php @@ -0,0 +1,32 @@ +Bedrock:', + ''.WP_ENV.'' + ); + echo "

{$message}

"; + }); +}); diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..194fdff --- /dev/null +++ b/composer.json @@ -0,0 +1,33 @@ +{ + "name": "roots/bedrock-disallow-indexing", + "type": "wordpress-muplugin", + "license": "MIT", + "description": "Disallow indexing of your site on non-production environments", + "authors": [ + { + "name": "Ben Word", + "email": "ben@benword.com", + "homepage": "https://github.com/retlehs" + }, + { + "name": "Scott Walkinshaw", + "email": "scott.walkinshaw@gmail.com", + "homepage": "https://github.com/swalkinshaw" + }, + { + "name": "QWp6t", + "email": "hi@qwp6t.me", + "homepage": "https://github.com/qwp6t" + } + ], + "keywords": [ + "wordpress" + ], + "support": { + "issues": "https://github.com/roots/bedrock-disallow-indexing/issues", + "forum": "https://discourse.roots.io/" + }, + "require": { + "php": ">=7.1" + } +}