From 9566c1f59ea7533122d07a9d8102b2f46c68c155 Mon Sep 17 00:00:00 2001 From: Erick Hitter <services@ethitter.com> Date: Mon, 15 Feb 2016 22:58:54 -0800 Subject: [PATCH] Only output plugin comments if there's content to display Also, more readme improvements --- eth-escape-headspace.php | 8 +------- readme.txt | 22 +++++++++++++++++++++- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/eth-escape-headspace.php b/eth-escape-headspace.php index 6492ce5..929ac1d 100644 --- a/eth-escape-headspace.php +++ b/eth-escape-headspace.php @@ -152,9 +152,6 @@ class ETH_Escape_HeadSpace2 { return; } - // Build output - echo "\n<!-- Escape HeadSpace2 by Erick Hitter; ethitter.com -->\n"; - // Handle basic, string-containing keys $output = array(); @@ -209,11 +206,8 @@ class ETH_Escape_HeadSpace2 { // Output whatever we've built if ( ! empty( $output ) ) { - echo implode( "\n", $output ); + echo "\n<!-- Escape HeadSpace2 by Erick Hitter; https://eth.pw/escape-hs2 -->\n" . implode( "\n", $output ) . "\n<!-- Escape HeadSpace2 -->\n"; } - - // Mark end of output - echo "\n<!-- Escape HeadSpace2 -->\n"; } /** diff --git a/readme.txt b/readme.txt index 15b7681..cca79bd 100644 --- a/readme.txt +++ b/readme.txt @@ -14,7 +14,11 @@ Output existing HeadSpace2 data without the original plugin. Deactivate HeadSpac Outputs data stored in HeadSpace2 post meta without requiring HeadSpace2. This allows one to remove the now-unmaintained HeadSpace2 plugin without losing the data associated with legacy content. -Note that many current SEO plugins for WordPress also handle migration, but since I don't use any such plugins on my network, I created this alternative. +The HeadSpace2 plugin is no longer maintained and generates many warnings when used with PHP 7. With this in mind, and without judging the original plugin, I created this option to preserve the plugin's output for SEO purposes. The plugin *does not* allow HeadSpace2 data to be edited; it only allows search engines to continue accessing it. + +Note that many current SEO plugins also handle migration from HeadSpace2, but since I don't use any such plugins on my network, I created this alternative. + +For a full list of the HeadSpace2 data that's supported, see the FAQ. == Installation == @@ -27,6 +31,22 @@ Note that many current SEO plugins for WordPress also handle migration, but sinc No. If you need to update entries, reinstall HeadSpace2 or modify the values directly in the database. += What HeadSpace2 data is supported? = + +Currently the plugin will output: + +* custom post/page titles +* meta keywords +* meta descriptions +* custom robots.txt declarations +* JavaScript includes +* Stylesheet includes +* Raw header and footer content + += Why isn't all HeadSpace2 data supported? = + +Mostly, I either didn't have time or didn't have a good example of how a particular feature was used. Contributions are welcome. :) + == Changelog == = 0.2 = -- GitLab