Repository navigation
Releases
Releases · wormeyman/recipe-sellable-pdf
v0.3.1
v0.3.0 - nutrition section and per-site PDF author setting
What's new in 0.3.0
- Nutrition section on the PDF. Calories, carbs, protein, fat, vitamins, and more, pulled from WP Recipe Maker's nutrition data using its own labels, units, and ordering. Empty/zero values are skipped, and it no-ops gracefully if WPRM nutrition is unavailable.
- "PDF author name" setting on the Sellable PDF admin page. This is the reliable way to set one author name for every PDF on a site, since WPRM's "Same name for all recipes" option is not available on all sites/tiers. The setting takes priority over the WPRM author and the WordPress post author.
Also included since v0.2.0
- v0.2.1 - Security: the download handler now enforces object-level authorization (
current_user_can( 'edit_post', ... )), so a user who passes the page capability gate can no longer download recipes (including drafts/private) authored by someone else.
Install
Download recipe-sellable-pdf-0.3.0.zip below and install via Plugins -> Add New -> Upload Plugin. The zip bundles Dompdf (vendor/), so it is install-ready. WP Recipe Maker must also be active.
v0.2.0 — author, summary, and group-name fixes
Fixes the three issues Robin reported on real recipe data:
- Author no longer prints the literal string "same". The renderer now calls
$recipe->author()(which resolves the WPRM author display setting to an actual name) with apost_author_name()fallback. - Summary no longer shows literal
<p>...</p>tags. Summary is now sanitized as rich text viawp_kses_post()and rendered as HTML in the template. - Ingredient group headers and ingredient text no longer show literal
<strong>...</strong>tags. These fields are now pre-stripped viawp_strip_all_tags()inrspdf_build_view()before reaching the template.
Install / upgrade
Download recipe-sellable-pdf.zip below, then in wp-admin: Plugins → Add New → Upload Plugin → choose the zip → Install Now → "Replace current with uploaded".
Per-site author name
For the author fix to display the name you want, set this on each site:
WP Recipe Maker → Settings → Recipe → "Default recipe author display" = "Same name for all recipes", then set "Same name for all recipes" to your desired value (e.g. Robin @ All Ways Delicious).