Skip to content

Require a listing ID in the shortcodes that show one listing - #3182

Merged
tellyworth merged 1 commit into
trunkfrom
fix/shortcode-listing-id
Nov 13, 2026
Merged

tellyworth merged 1 commit into
trunkfrom
fix/shortcode-listing-id

Conversation

@tellyworth

@tellyworth tellyworth commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Changes Proposed in this Pull Request

  • [job], [job_summary] and [job_apply] now show nothing when the id attribute isn't a listing's ID, such as id="x". Before, the value was cast to 0 after the "was an ID given" check, and a query for ID 0 is not limited to one listing.
  • [job_apply] no longer leaves an output buffer open when it returns early.

Testing Instructions

  • vendor/bin/phpunit --filter Tests_Job_Summary_Browse_Capability
  • Put [job_summary id="x"], [job id="x"] and [job_apply id="x"] on a page. Each shows nothing. With a real listing ID each shows that listing, as before.

Release Notes

  • Fix: Show nothing in the single-listing shortcodes when the ID isn't a listing's ID.

Plugin build for 521b7c1
📦 Download plugin zip
▶️ Open in playground

[job], [job_summary] and [job_apply] show nothing when the id attribute
isn't a listing's ID.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@tellyworth
tellyworth merged commit 3889e8b into trunk Nov 13, 2026
9 checks passed
@tellyworth
tellyworth deleted the fix/shortcode-listing-id branch November 13, 2026 05:02
@tellyworth tellyworth added this to the 2.4.11 milestone Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant