uppdated modules

This commit is contained in:
Bachir Soussi Chiadmi
2017-01-22 16:19:36 +01:00
parent 03be8f82aa
commit 8416e3eea1
748 changed files with 32317 additions and 20900 deletions
+68 -3
View File
@@ -53,6 +53,8 @@ function hook_wysiwyg_plugin($editor, $version) {
// A list of buttons provided by this native plugin. The key has to
// match the corresponding JavaScript implementation. The value is
// is displayed on the editor configuration form only.
// CKEditor-specific note: The internal button name/key is
// capitalized, i.e. Img_assist.
'buttons' => array(
'img_assist' => t('Image Assist'),
),
@@ -75,7 +77,7 @@ function hook_wysiwyg_plugin($editor, $version) {
// Most plugins should define TRUE here.
'load' => TRUE,
// Boolean whether this plugin is a native plugin, i.e. shipped with
// the editor. Definition must be ommitted for plugins provided by
// the editor. Definition must be omitted for plugins provided by
// other modules. TRUE means 'path' and 'filename' above are ignored
// and the plugin is instead loaded from the editor's plugin folder.
'internal' => TRUE,
@@ -204,6 +206,19 @@ function hook_INCLUDE_editor() {
// (optional) A callback to invoke to return additional notes for installing
// the editor library in the administrative list/overview.
'install note callback' => 'wysiwyg_ckeditor_install_note',
// The minimum and maximum versions the implemetation has been tested with.
// Users will be notified if installing a version not within this range.
'verified version range' => array('1.2.3', '3.4.5'),
// (optional) A callback to perform migrations of the settings stored in a
// profile when a library change has been detected. Takes a reference to a
// settings object, the processed editor definition, the profile version and
// the installed library version. Migrations should be performed in the
// order changes were introduced by library versions, and the last version
// migrated to should be returned, or FALSE if no migration was possible.
// The returned version should be less than or equal to the highest version
// ( and >= the lowest version) defined in 'verified version range' and
// be as close as possible to, without passing, the installed version.
'migrate settings callback' => 'wysiwyg_ckeditor_migrate_settings',
// A callback to determine the library's version.
'version callback' => 'wysiwyg_ckeditor_version',
// A callback to return available themes/skins for the editor library.
@@ -224,8 +239,10 @@ function hook_INCLUDE_editor() {
'settings callback' => 'wysiwyg_ckeditor_settings',
// A callback to supply definitions of available editor plugins.
'plugin callback' => 'wysiwyg_ckeditor_plugins',
// A callback to convert administrative plugin settings for a editor profile
// into JavaScript settings.
// A callback to supply global metadata for a single native external plugin.
'plugin meta callback' => 'wysiwyg_ckeditor_plugin_meta',
// A callback to convert administrative plugin settings for an editor
// profile into JavaScript settings per profile.
'plugin settings callback' => 'wysiwyg_ckeditor_plugin_settings',
// (optional) Defines the proxy plugin that handles plugins provided by
// Drupal modules, which work in all editors that support proxy plugins.
@@ -249,6 +266,16 @@ function hook_INCLUDE_editor() {
return $editor;
}
/**
* Alter editor definitions defined by other modules.
*
* @param array $editors
* The Editors to alter.
*/
function hook_wysiwyg_editor_alter(&$editors) {
$editors['editor']['version callback'] = 'my_own_version_callback';
}
/**
* Act on editor profile settings.
*
@@ -279,5 +306,43 @@ function hook_wysiwyg_editor_settings_alter(&$settings, $context) {
if ($context['profile']->editor == 'tinymce') {
// Supported values to JSON data types.
$settings['cleanup_on_startup'] = TRUE;
// Function references (callbacks) need special care.
// @see wysiwyg_wrap_js_callback()
$settings['file_browser_callback'] = wysiwyg_wrap_js_callback('myFileBrowserCallback');
// Regular Expressions need special care.
// @see wysiwyg_wrap_js_regexp()
$settings['stylesheetParser_skipSelectors'] = wysiwyg_wrap_js_regexp('(^body\.|^caption\.|\.high|^\.)', 'i');
}
}
/**
* Act on stylesheets used in WYSIWYG mode.
*
* This hook acts like a pre-render callback to the style element normally
* output in the document header. It is invoked before Core has
* sorted/grouped/aggregated stylehsheets and changes made here will only have
* an effect on the stylesheets used in an editor's WYSIWYG mode.
* Wysiwyg will only keep items if their type is 'file' or 'inline' and only if
* they are in the group CSS_THEME.
*
* This hook may be invoked several times in a row with slightly different or
* altered stylesheets if something like Color module is used by a theme.
* Wysiwyg will cache the final list of stylesheets so this hook will only be
* called while the cache is being rebuilt.
*
* Messages set in this hook will not be displayed because the processing is
* done in an internal HTTP request and the page output is ignored.
*
* @param $elements
* The style element which will be rendered. Added stylesheets are found in
* $element['#items']['path/to/stylesheet.css'].
* @param $context
* An array with the following keys:
* - theme: The name of the theme which was used when the list of stylesheets
* was generated.
*/
function hook_wysiwyg_editor_styles_alter(&$element, $context) {
if ($context['theme'] == 'alpha') {
unset($element['#items']['sites/all/themes/omega/alpha/css/alpha-debug.css']);
}
}