function hook_system_themes_page_alter

Same name in other branches
  1. 9 core/modules/system/system.api.php \hook_system_themes_page_alter()
  2. 8.9.x core/modules/system/system.api.php \hook_system_themes_page_alter()
  3. 10 core/modules/system/system.api.php \hook_system_themes_page_alter()
  4. 11.x core/modules/system/system.api.php \hook_system_themes_page_alter()

Alters theme operation links.

Parameters

$theme_groups: An associative array containing groups of themes.

See also

system_themes_page()

Related topics

1 invocation of hook_system_themes_page_alter()
system_themes_page in modules/system/system.admin.inc
Menu callback; displays a listing of all themes.

File

modules/system/system.api.php, line 4300

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.
            $theme->operations[] = array(
                'title' => t('Foo'),
                'href' => 'admin/appearance/foo',
                'query' => array(
                    'theme' => $theme->name,
                ),
            );
        }
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.