drupal-media/entity_embed — pull request #15 by davereid (2014-05-22 02:09:48+00:00)
Title: Added alter hooks for embed placeholder context and for the rendered embedded entity

I realized other modules will probably want to add extra data attributes via the embed form, and have them affect entity display. Now that we're using post_render_cache we lose a bit of that context when doing the actual rendering. My proposal is for the following:

- Add all the attributes of the embed element into the post_render_cache token. So data-entity-type becomes `$context['entity-type']`.
- Add an alter hook for the $context array before it is converted into a placeholder.
- Add an alter hook or some kind of property to the entity before calling entity_view() to indicate that it is an embedded entity.