Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: 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 CreditAttribution: 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