Created
October 19, 2016 20:57
-
-
Save colepacak/0aa2d14d9d7932653222ee8ca9abd520 to your computer and use it in GitHub Desktop.
ckeditor - Remove call to media_browser_js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/includes/ckeditor.lib.inc b/includes/ckeditor.lib.inc | |
index e2395f3..6a93b4b 100644 | |
--- a/includes/ckeditor.lib.inc | |
+++ b/includes/ckeditor.lib.inc | |
@@ -889,14 +889,8 @@ function ckeditor_profile_settings_compile($global_profile, $profile) { | |
$settings['loadPlugins'] = ckeditor_plugins_render($conf['loadPlugins']); | |
if (array_key_exists('media', $settings['loadPlugins']) && module_exists('media')) { | |
- module_load_include('inc', 'media', 'includes/media.browser'); | |
- $javascript = media_browser_js(); | |
- foreach ($javascript as $key => $definitions) { | |
- foreach ($definitions as $definition) { | |
- $function = 'drupal_add_' . $key; | |
- call_user_func_array($function, $definition); | |
- } | |
- } | |
+ drupal_add_library('media', 'media_browser'); | |
+ drupal_add_library('media', 'media_browser_settings'); | |
drupal_add_js(drupal_get_path('module', 'ckeditor') . '/plugins/media/library.js', array('scope' => 'footer', 'weight' => -20)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment