1 system.api.php | hook_system_themes_page_alter(&$theme_groups) |
Alters theme operation links.
Parameters
$theme_groups: An associative array containing groups of themes.
See also
Related topics
File
- core/
modules/ system/ system.api.php, line 3654 - Hooks provided by Backdrop core and the System module.
Code
function hook_system_themes_page_alter(&$theme_groups) {
foreach ($theme_groups as $state => &$group) {
foreach ($theme_groups[$state] as &$theme) {
// Add a foo link to each list of theme operations. 'foo' is also added as
// an additional class to the operation link's <li> HTML tag.
$theme->operations['foo'] = array(
'title' => t('Foo'),
'href' => 'admin/appearance/foo',
'query' => array('theme' => $theme->name),
'attributes' => array('title' => t('Perform operation foo')),
);
}
}
}