summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reid2011-08-15 16:31:25 (GMT)
committer Dave Reid2011-08-15 16:31:25 (GMT)
commitc1146d5c19463235427198d95d894008c9fc6bf6 (patch)
treeec5ae85a680d6be445d57ae58a7e85a29d0e0095
parenta9e80c6ccb7d973779140f96fba25ed1c4074be4 (diff)
Issue #1016376: Allow audio file types in WYSIWYG by default.
-rw-r--r--includes/media.variables.inc2
-rw-r--r--media.install11
2 files changed, 11 insertions, 2 deletions
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');
+ }
+}