function hook_fences_suggestion_info in Fences 7
Same name and namespace in other branches
- 7.2 fences.api.php \hook_fences_suggestion_info()
Provide theme hook suggestions for various theme hooks.
Return value
array A nested array containing information about the theme hook suggestions provided by the implementing module.
2 functions implement hook_fences_suggestion_info()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- fences_fences_suggestion_info in ./
fences.fences.inc - Implements hook_fences_suggestion_info().
- fences_get_fences_suggestion_info in ./
fences.module - Retrieve the hook_fences_suggestion_info data.
1 invocation of hook_fences_suggestion_info()
- _fences_get_fences_suggestion_info in ./
fences.admin.inc - Helper function for fences_get_fences_suggestion_info().
File
- ./
fences.api.php, line 19 - Hooks provided by the Fences module.
Code
function hook_fences_suggestion_info() {
// The suggestions for the "field" theme hook.
$fences['field'] = array(
// This key will be appended to THEMEHOOK__fences_ to make the theme hook
// suggestion, field__fences_p in this case. The corresponding template
// files should be have all underscores changed to dashes and be named
// field--fences-p.tpl.php and field--fences-p-multiple.tpl.php.
'p' => array(
// The label used in the UI when selecting a suggestion. The label must
// only contain English words to enable multilingual translations.
'label' => t('paragraph'),
// The HTML element(s) used by the suggestion. This will be added to the
// label in the UI to provide additional context. If multiple elements are
// used they should be separated by spaces, e.g. 'pre code'.
'element' => 'p',
// A short description used in the UI when selecting a suggestion.
'description' => t('A paragraph; multiple values are each wrapped in a <p>'),
// An array of groups to place the element into.
'groups' => array(
t('Block-level'),
),
),
);
return $fences;
}