function emptyparagraphkiller_filter_tips in Empty paragraph killer 6
Implementation of hook_filter_tips().
File
- ./
emptyparagraphkiller.module, line 95 - Empty paragraph killer: because users are sometimes overzealous with the return key.
Code
function emptyparagraphkiller_filter_tips($delta, $format, $long = FALSE) {
// OPTIONAL: If more than one filter was defined in hook_filter, perform switch on $delta
switch ($delta) {
case 0:
// Empty paragraph killer filter tip
switch ($long) {
case FALSE:
return t('Empty paragraph killer - multiple returns will not break the
site\'s style.');
case TRUE:
return '<p>' . t('Your typing habits may include hitting the return
key twice when completing a paragraph. This site will accomodate your
habit, and ensure the content is in keeping with the the stylistic
formatting of the site\'s theme.') . '</p>';
}
case 1:
// Arbitrary empty html tag filter tip
switch ($long) {
case FALSE:
return t('Specific empty HTML tags have been chosen to be filtered by
your site administrator.');
case TRUE:
return '<p>' . t('Your site administrator has chosen to supress the
display of specific HTML tags if there is no content to be displayed
within them.') . '</p>';
}
case 2:
// Tip for the non-breaking space remover which sometimes sneak into the beginning of paragraphs
switch ($long) {
case FALSE:
return t('The first non-breaking space (<strong>&nbsp;</strong>)
at the beginning of a paragraph will be removed. These are often added
erroneously by WYSIWYG editors.');
case TRUE:
return '<p>' . t('WYSIWYG editors often add a non-breaking space
(<strong>&nbsp;</strong>) at the beginning of newly created
paragraphs. The first such space at the beginning of a paragraph will
be removed.') . '</p>';
}
}
}