wp-shortcake / shortcake-bakery

A fine selection of shortcodes for WordPress
42 stars 16 forks source link

Pass post ID into embed reversal endpoint, allow for filtering response #155

Closed goldenapples closed 8 years ago

goldenapples commented 8 years ago

When posting an inserted embed code to the Ajax endpoint, we should also send the current post ID, so that it is available as additional context to the "reversed_embed" action.

This also introduces a filter on "shortcake_bakery_embed_reversal", so that it's possible to filter the result of reversing an embed code. The idea is that this can be used to implement a system of protected embeds, or some other way of handling embed codes which don't match one of the defined post elements.

See #154.

goldenapples commented 8 years ago

@danielbachhuber #reviewmerge for me?

goldenapples commented 8 years ago

Mind if I merge this? I'm trying to set up a notification which needs to have the post ID available to include information about the post in the notification message.

danielbachhuber commented 8 years ago

Huh. Could've sworn I had already merged this.