Opened 11 years ago
Closed 11 years ago
#34523 closed defect (bug) (fixed)
Embeds: Make function parameters more clear
| Reported by: | swissspidy | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.4 |
| Component: | Embeds | Version: | 4.4 |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: |
Description
As raised in the comments on the dev post:
The first param ($post) of get_post_embed_html() and get_oembed_response_data() is optional, the others are required. We should change the order of the params.
Patch attached.
Attachments (2)
Change History (7)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
get_oembed_response_data()is called by the API endpoint controller and never in a context where it makes sense to use the global post object.Therefore, 34523.2.diff only changes the param order for
get_post_embed_html()and does correctly so by not forgetting the embed template.