=== GH Blog Optimize ===
Contributors: garryheath
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.4.1
License: GPLv2 or later

Jetpack-style related posts tiles, comment controls, and the WordPress.com site accelerator — without the Jetpack plugin.

== Description ==

Three Jetpack features, rebuilt lean for speed:

* Site accelerator: serves this site's images through the WordPress.com Photon image CDN (i0.wp.com) with server-side resizing and responsive srcset, and serves WordPress core CSS/JS from c0.wp.com. Front-end only; wp-admin and the block editor are never touched.
* Related posts: three tiles after each blog post, scored locally by shared tags and categories in one SQL query and cached. Optional heading and thumbnails.
* Comment controls: turn off comments on posts (pages unaffected) or on the entire site (every post type, plus the Comments menu, admin-bar item, dashboard box, Recent Comments widget, comment feeds and REST comment routes). A separate tool permanently deletes all existing comments.

Settings live under Settings > Blog Optimize. If Jetpack's matching module is active, the overlapping feature pauses automatically.

Optional login protection: Settings > Blog Optimize can hide wp-login.php behind a decoy and serve your real login at a private address. Requires pretty permalinks; single-site only.

Developer filters: ghbo_image_cdn_enabled, ghbo_image_cdn_allowed_hosts, ghbo_image_cdn_eligible, ghbo_static_cdn_enabled, ghbo_related_posts_show, ghbo_related_posts_count, ghbo_related_posts_heading, ghbo_related_posts_fill_recent, ghbo_disable_comments_post_types. Developer action: ghbo_login_gate_decoy_hit.

== Changelog ==

= 1.4.1 =
* Fixed: login page hiding could report "could not verify" and show no test link, because the automatic check used up the one-time test token. The token now stays valid until the address is activated or expires
* Fixed: an address that the automatic check reached is now accepted and enabled instead of being rejected over a missing response header
* Added: when the automatic check fails, the settings card shows the reason (for example the HTTP status the server returned)

= 1.4.0 =
* Added: optional "Hide the login page" feature (off by default). Direct visits to wp-login.php see a look-alike page that never signs anyone in; the real login moves to a private address you choose
* Added: the private address is verified before it is switched on (automatic check, or a one-time test link if your host blocks it) so you cannot lock yourself out
* Added: emergency off switch - define( 'GHBO_DISABLE_LOGIN_GATE', true ); in wp-config.php
* Added: login, logout, lost-password and register links automatically use the private address; logged-out visitors to /wp-admin are sent to the decoy
* Added: developer action ghbo_login_gate_decoy_hit for custom logging or blocking of decoy requests

= 1.3.0 =
* Added: "Check for updates" link on the Plugins screen and a "Check for updates now" button on Settings > Blog Optimize, with a clear up-to-date / update-available / server-unreachable result
* Added: Updates card on the settings page showing the installed version and the latest release
* Changed: update downloads may now be served from garryheath.com or www.garryheath.com

= 1.2.0 =
* Added: "Turn off all comments on the entire site" option (every post type, admin Comments screens, admin-bar item, dashboard box, Recent Comments widget, comment feeds and REST comment routes)
* Added: "Delete all comments" tool - permanently removes every comment (all statuses, pingbacks and trackbacks) after a confirmation box and prompt; large sites are processed in batches and can be run again to continue
* Changed: settings page redesigned with standard checkboxes instead of toggle switches

= 1.1.0 =
* Added: "Center related posts on the page" option (on by default) - tiles share the row evenly and short rows are centered instead of sitting left-justified
* Added: plugin name and version number shown at the top of Settings > Blog Optimize

= 1.0.0 =
* Initial release
* Site accelerator: Photon image CDN via core image filters (attachment src, srcset, content img tags) with resize/fit, ssl=1 and a single preconnect
* Site accelerator: core CSS/JS served from c0.wp.com on public WordPress releases via script_loader_src / style_loader_src
* Related posts: Jetpack-style tiles with optional heading and 350x200 thumbnails, cached with automatic invalidation
* Discussion: comments and pingbacks disabled on posts, existing comments and comment feeds hidden
* GHPDM update checker wired to garryheath.com

== Upgrade Notice ==

= 1.4.1 =
Fixes the hidden login page verification step (missing test link) and shows why a check failed.

= 1.4.0 =
Adds an optional hidden login page feature. It is off by default, so nothing changes until you turn it on.

= 1.3.0 =
Adds a manual Check for updates link and an Updates status card. Automatic updates are unchanged.

= 1.2.0 =
Adds site-wide comment shutoff and a delete-all-comments tool, and replaces the toggle switches with checkboxes. Settings carry over.

= 1.1.0 =
Adds a centered layout option for related posts and shows the plugin version on the settings page.

= 1.0.0 =
Initial release.
