Opened 3 years ago

Closed 2 years ago

#15491 closed defect (bug) (fixed)

embed_oembed_html filter needs post ID

Reported by: filosofo Owned by: filosofo
Priority: normal Milestone: 3.1
Component: Media Version: 3.1
Severity: normal Keywords: has-patch
Cc:

Description

If you want to use the embed_oembed_html filter in the context of a particular post, currently you have to hope that the global request variable stars align in your favor. That is, you have to hope that the shortcode callback---in which the filter is used---is being called in the admin when $_GET['post'] is defined. Because it's a shortcode callback, that's not something you can have great confidence in.

Patch passes the post ID to the filter.

Attachments (1)

pass-post-id-to-embed-filter.15491.diff (731 bytes) - added by filosofo 3 years ago.

Download all attachments as: .zip

Change History (2)

  • Resolution set to fixed
  • Status changed from new to closed

(In [16740]) Pass post ID to embed_oembed_html filter to avoid global variable incantations. props filosofo. fixes #15491

Note: See TracTickets for help on using tickets.