diff --git a/includes/media.variables.inc b/includes/media.variables.inc index 11cca98..3a89055 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 c3b40e5..405f208 100644 --- a/media.install +++ b/media.install @@ -350,7 +350,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. } /** @@ -592,3 +592,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'); + } +}