function wysiwyg_filter_get_filter_options in WYSIWYG Filter 6
Same name and namespace in other branches
- 7 wysiwyg_filter.inc \wysiwyg_filter_get_filter_options()
Get filter options.
Parameters
int $format: Input format identifier.
Return value
array
2 calls to wysiwyg_filter_get_filter_options()
- wysiwyg_filter_filter_tips in ./
wysiwyg_filter.module - Implementation of hook_filter_tips().
- wysiwyg_filter_process in ./
wysiwyg_filter.pages.inc - WYSIWYG Filter. Provides filtering of input into accepted HTML.
File
- ./
wysiwyg_filter.inc, line 512 - Common functions for the WYSIWYG Filter module.
Code
function wysiwyg_filter_get_filter_options($format) {
$filter_options = array(
'valid_elements' => wysiwyg_filter_get_valid_elements($format, TRUE),
'allow_comments' => variable_get('wysiwyg_filter_allow_comments_' . $format, 0),
'style_properties' => wysiwyg_filter_get_style_properties($format),
'nofollow_policy' => variable_get('wysiwyg_filter_nofollow_policy_' . $format, 'whitelist'),
'nofollow_domains' => variable_get('wysiwyg_filter_nofollow_domains_' . $format, array()),
);
foreach (wysiwyg_filter_get_advanced_rules() as $rule_key => $rule_info) {
$filter_options[$rule_key] = array();
foreach (variable_get('wysiwyg_filter_' . $rule_key . '_' . $format, array()) as $rule) {
$filter_options[$rule_key][] = '`^' . str_replace("", $rule_info['asterisk_expansion'], preg_quote(str_replace('*', "", $rule), '`')) . '$`';
}
}
return $filter_options;
}