custom_font module hooks - Hooks created and utilized by the custom_font
- These are used to generate CSS to override default CSS throughout the front end
hook_custom_font_enabled
Parameters:
none
Returns:
TRUE|NULL
Description:
Return any value (including FALSE) if this module requires the fonts.css file to be loaded on this page
hook_custom_font_selector_functions
Parameters:
none
Returns:
array('module_name' => array('selectors_function_1', 'selectors_function_2'...'selectors_function_n'))
Description:
Return a prioritized list of functions to attempt to find selectors. Each function should return an array as described below.
Each function will be run in succession (passing the module_name as an argument), until a function returns a non-empty array, or no functions remain.
hook_custom_font_selectors
Paramaters:
$section => string - usually this module name or a CSS selector
$settings => array - containing 'font' => 'string font name', 'size' => int, 'color' => '#hexColor'
Returns:
array => Per custom_theme_build_css(). Keys are css selectors. Values are arrays of attributes=>values
Description:
Given a desired section of CSS and a list of user-values, build an array of selectors to generate css using custom_theme_build_css()
Most modules should pick a $selector based on $section and then return custom_font_custom_font_selectors($selector, $settings) to let the main module do the legwork.
selectors_function_n
Parameters:
$section => string - Usually this module name or a CSS selector
Returns:
array => Per custom_theme_build_css(). Keys are css selectors. Values are arrays of attributes=>values
Description:
Given a desired section of CSS, build an array of selectors to generate CSS using custom_theme_build_css()