diff --git modules/filter/filter.api.php modules/filter/filter.api.php index 399d564..d5b5535 100644 --- modules/filter/filter.api.php +++ modules/filter/filter.api.php @@ -185,6 +185,52 @@ function hook_filter_info() { } /** + * Perform alterations on text formats definitions. + * + * @param $formats + * Array of of all existent text formats. + * + * @see filter_formats + */ +function hook_filter_formats_alter(&$formats) { + $filters['custom_format'] = array( + 'title' => t('Custom text format'), + 'description' => t('Allows you to restrict the HTML tags the user can use.'), + 'process callback' => '_custom_callback', + 'settings callback' => '_custom_settings_callback', + 'default settings' => array( + 'allowed_html' => '