Directory / plugin
Flx Modernize
v1.0.0 · by rickey29
Serve your WordPress pages to visitors through your own Flx Render service, in your theme's look, with automatic fallback to WordPress.
About this plugin
Flx Modernize sends the content of a page to a Flx Render service, which returns the finished HTML page. Visitors see a modern, fast page that keeps your theme’s design. WordPress stays the source of all content, and if the Render service is unavailable, WordPress renders the page itself, so the site never breaks.
This release supports sites using the Twenty Twenty-Five theme. A Twenty Twenty-Five renderer package is available from modernize.flexplat.com; you can run it yourself or have it hosted for you.
What is rendered through Flx
- The blog home page, category and tag archives
- Single posts and pages
- Search results
- The “Page not found” (404) page, still sent with a real 404 status
The theme’s header with its menu, and its footer, appear on every one of these pages.
What always stays normal WordPress
- Anyone who is logged in (administrators and editors always see normal WordPress)
- Previews, drafts, private, scheduled and password-protected content
- Feeds, embeds, robots.txt, trackbacks and any request other than GET or HEAD
Safety
- Only anonymous visitors get Flx pages, and the page data is built as an anonymous visitor.
- No visitor data is sent to the Render service: no cookies, no user account and no query-string values. The one exception is the words a visitor searches for, because the search results page shows them.
- Requests to the Render service can be signed with a key only your site holds; a Render service in enforce mode rejects anything else.
- Flx pages are sent with
Cache-Control: private, no-store, and a page served by WordPress because the Render service failed is sent withno-store. - Deactivating the plugin instantly returns the whole site to normal WordPress.
For developers
The flx_modernize_should_render filter lets you turn Flx off for a request (return false). It can never turn Flx on for a logged-in user.
Documentation and a step-by-step tutorial for building a renderer for a theme are at modernize.flexplat.com.
External Services
Flx Modernize works by sending page data to an external Flx Render service over HTTPS and displaying the HTML it returns.
- Which service: the one whose URL an administrator enters on the Flx Modernize settings screen. It can be your own self-hosted instance (the renderer package is GPL-licensed open source) or one hosted for you. There is no default: until a Render URL is saved, the plugin sends nothing anywhere and WordPress renders every page normally.
- When data is sent: only when an anonymous visitor requests a page that Flx renders (see the lists above).
- What is sent: the content needed to draw that page: title, content, excerpt, slug and permalink; publish and modified dates and author display name; featured image URL, size and alt text; site name and home URL; the header menu’s labels and links; links to the site’s own theme CSS (which the Render service then fetches from your site); for archives and search, the list of posts and paging; for search, the search words.
- What is never sent: visitor cookies, IP addresses, user accounts, email addresses, passwords or other query-string values.
The Render service is operated by whoever hosts it: you, or the provider you choose. When the hosting is provided by Flx (Rickey Gu), the terms are agreed with you directly; see modernize.flexplat.com.