Opened 9 years ago
Closed 9 years ago
#34523 closed defect (bug) (fixed)
Embeds: Make function parameters more clear
Reported by: | swissspidy | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 4.4 |
Component: | Embeds | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
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.
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.