This feature is necessary to be able to integrate http://drupal.org/project/media_crop with the Media Filter. Attached a patch (against 7.x-1.0-rc2) that is needed for the module to work properly.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 1382150-media-token-to-markup-alter.patch | 4.94 KB | dave reid |
| #4 | 1382150-media-token-to-markup-alter.patch | 4.76 KB | dave reid |
| media_filter_alter_hook.patch | 443 bytes | temaruk |
Comments
Comment #1
aaron commentedfor the testbot
Comment #2
dave reidWe'll need to have this applied to 7.x-2.x first, and also documented in media.api.php.
Comment #3
dddave commentedmedia_filter_alter_hook.patch queued for re-testing.
Comment #4
dave reidI had a use for this in a project so I gave this a review and it seems handy to have for now. Here's a revised patch including some documentation and re-rolled for the current code.
Comment #6
dave reidNote that the original patch had:
drupal_alter('media_token_to_markup', $element, $file, $tag_info);And this has:
drupal_alter('media_token_to_markup', $element, $tag_info, $settings);This is because it's important that we pass along $settings to the alter hooks (since we'd want to be able to check $settings['wysiwyg']), and since drupal_alter() is limited to three parameters, we included $file in $tag_info['file'] instead.
Comment #7
dave reid#6 has been committed to both branches:
http://drupalcode.org/project/media.git/commit/0ad4d7a
http://drupalcode.org/project/media.git/commit/cd8db74