cookie_content_blocker_ckeditor.module in Cookie Content Blocker 7
Contains the main module code for Cookie content blocker - CKEditor.
File
modules/cookie_content_blocker_ckeditor/cookie_content_blocker_ckeditor.moduleView source
<?php
/**
* @file
* Contains the main module code for Cookie content blocker - CKEditor.
*/
/**
* Implements hook_help().
*/
function cookie_content_blocker_ckeditor_help($path, array $arg) {
if ($path !== 'admin/help#cookie_content_blocker_ckeditor') {
return '';
}
$output = file_get_contents(drupal_get_path('module', 'cookie_content_blocker_ckeditor') . '/README.md');
return module_exists('markdown') ? filter_xss_admin(module_invoke('markdown', 'filter', 'process', 0, -1, $output)) : '<pre>' . check_plain($output) . '</pre>';
}
/**
* Implements hook_ckeditor_plugin().
*/
function cookie_content_blocker_ckeditor_ckeditor_plugin() {
return array(
'cookieContentBlocker' => array(
'name' => 'cookieContentBlocker',
'desc' => t('Plugin for blocking content/html until consent is given'),
'path' => drupal_get_path('module', 'cookie_content_blocker_ckeditor') . '/plugins/ckeditor/cookie_content_blocker/',
'buttons' => array(
'cookieContentBlocker' => array(
// Don't use t(), the label will automatically be translatable.
'label' => 'Add Cookie content blocked content',
'icon' => 'images/icon.png',
),
),
),
);
}
Functions
Name | Description |
---|---|
cookie_content_blocker_ckeditor_ckeditor_plugin | Implements hook_ckeditor_plugin(). |
cookie_content_blocker_ckeditor_help | Implements hook_help(). |