Skip to content
Snippets Groups Projects
Commit 9566c1f5 authored by Erick Hitter's avatar Erick Hitter
Browse files

Only output plugin comments if there's content to display

Also, more readme improvements
parent 1ea862e8
No related branches found
No related tags found
1 merge request!5Improve output processing and readme
......@@ -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";
}
/**
......
......@@ -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 =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment