wp-shortcake / shortcake-bakery

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

"Add embed" Ajax reversal could use more context and a filter, to allow for replicating of protected embeds #154

Closed goldenapples closed 8 years ago

goldenapples commented 8 years ago

It would be nice if the "Add embed" functionality in this plugin could be extended, either here in the plugin, or elsewhere in themes or add-on plugins, to completely replace the "protected embed" functionality on WordPress VIP.

In order for this to happen, I see two things that need to be added there.

  1. The post ID needs to be posted along with the Ajax "embed_reverse" request, so that any solution which involves saving to post meta can save in the correct place.
  2. A filter needs to be added after shortcode reversals, but before the response, so that additional replacements can be performed.

One possible approach, which could work for some edge cases, is saving embed code which doesn't match any known embeds to post meta, then filtering the response to return a shortcode which references that post meta value.

goldenapples commented 8 years ago

:ship: