Closed (fixed)
Project:
D7 Media
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 Dec 2011 at 17:47 UTC
Updated:
21 Mar 2012 at 18:10 UTC
Jump to comment: Most recent file
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