From eba9414f72196fee81c54772985360359a292bd9 Mon Sep 17 00:00:00 2001 From: Patrick Murray-John Date: Tue, 5 Feb 2019 15:29:59 -0500 Subject: [PATCH] move message for developers to separate .dist file --- .gitignore | 1 + devMessage.php.dist | 21 +++++++++++++++++++++ drs-tk.php | 14 ++------------ 3 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 devMessage.php.dist diff --git a/.gitignore b/.gitignore index 3913aecf..2a8d7436 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ */.DS_Store deploy.sh config.php +devMessage.php .idea/ node_modules/ specs/results/ diff --git a/devMessage.php.dist b/devMessage.php.dist new file mode 100644 index 00000000..1d96553b --- /dev/null +++ b/devMessage.php.dist @@ -0,0 +1,21 @@ + + + +
+

This is a dev site.

+

On branch:

+
+ + + + diff --git a/drs-tk.php b/drs-tk.php index e9fabb95..a7c680a0 100755 --- a/drs-tk.php +++ b/drs-tk.php @@ -1278,18 +1278,8 @@ function drstk_facets_get_option($facet_type, $default = false) function drstk_dev_site_status_admin_notice() { - $stringfromfile = file('.git/HEAD', FILE_USE_INCLUDE_PATH); - $firstLine = $stringfromfile[0]; //get the string from the array - $explodedstring = explode("/", $firstLine, 3); //seperate out by the "/" in the string - $branchname = $explodedstring[2]; //get the one that is always the branch name - - $html = " -
-

This is a dev site.

-

On branch: $branchname

-
- "; - echo $html; + + include('devMessage.php'); } if(WP_DEBUG) {