lh-save-down folder to /wp-content/plugins/.composer install inside the plugin directory (or use the LH MCP run-composer ability) to install mPDF and PHPePub into vendor/.Shown on a single post or page, each link points at a signed download of that page in its format, with rel="nofollow". On archives and other screens with no single post it is left out.
Each format is a WordPress feed on the post’s permalink: lh-save_down.html, lh-save_down.text, lh-save_down.pdf and lh-save_down.epub. A request must also carry a valid lh_save_down-token query argument. The token is an HMAC of the post ID, the format and an expiry time, so it isn’t tied to any user or session and works until it expires. A request without a valid token gets an uncached 404. Build URLs through a menu or navigation link or through the get-export-url ability, rather than by hand.
When the block template displaying a post marks a document region (a block with the class lh-md-content) and LH Content Converter 2.3.0+ is active, the export renders that region, which carries its own title. Otherwise it renders the post title followed by the post content. PDF and EPUB document titles and file names always come from the post title.
Copy a template from the plugin’s templates/ directory to the root of the active theme or child theme and edit it there. The plugin uses the theme’s copy when one exists:
lh_save_down-html-post_template.php: HTML, and EPUB, which wraps the same markup as XHTML.lh_save_down-pdf-post_template.php: PDF.lh_save_down-text-post_template.php: plain text.lh_save_down_token_ttl: how long an export link stays valid, in seconds. Default DAY_IN_SECONDS.lh_save_down_get_template_location: the template file path for a format ($location, $format).lh_save_down_get_site_lang: the language declared in exports. Defaults to get_bloginfo( 'language' ).lh_save_down_auto_script_to_lang: turns on mPDF’s per-character script detection for multilingual content. Off by default because it is expensive; the PDF already picks a font for the site language.lh_save_down_return_plugin_debugging_status: debug logging.