diff --git a/includes/media.variables.inc b/includes/media.variables.inc index 7c123a73b5723eb1f19de8915950415f964d30cc..16cb50beb20fcb8a6a735b0f2dcc58cc76207cd2 100644 --- a/includes/media.variables.inc +++ b/includes/media.variables.inc @@ -119,7 +119,7 @@ function media_variable_default($name = NULL) { //@todo: We should do this per type actually. For "other" it should be a link. 'wysiwyg_default_view_mode' => 'media_large', // Types which can be selected when embedding media vs wysiwyg. - 'wysiwyg_allowed_types' => array('image', 'video'), + 'wysiwyg_allowed_types' => array('audio', 'image', 'video'), // Attributes which can be modified via the wysiwyg and persist. 'wysiwyg_allowed_attributes' => array('height', 'width', 'hspace', 'vspace', 'border', 'align', 'style', 'alt', 'title', 'class', 'id'), diff --git a/media.install b/media.install index 3933341b1f944837542340299a4f7a5c752728e6..af5bc0d19ed0972834df0eb713c00f27a0cdcc4b 100644 --- a/media.install +++ b/media.install @@ -365,7 +365,7 @@ function media_update_7010() { * Allows video as a type of media in the WYSIWYG */ function media_update_7011() { - media_variable_set('wysiwyg_allowed_types', array('image', 'video')); + // Do nothing - default variables automatically update. } /** @@ -607,3 +607,12 @@ function media_update_7019() { } } } + +/** + * Delete the wysiwyg_allowed_types variable if it is the same as default. + */ +function media_update_7020() { + if (variable_get('media__wysiwyg_allowed_types') == array('image', 'video')) { + variable_del('media__wysiwyg_allowed_types'); + } +}