Created
May 15, 2013 10:53
-
-
Save kimpepper/5583144 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foreach (drupal_container()->get('plugin.manager.system.plugin_ui')->getDefinitions() as $plugin_id => $plugin) { | |
list($plugin_base, $key) = explode(':', $plugin_id); | |
if ($plugin_base == 'block_plugin_ui') { | |
$theme = $themes[$key]; | |
$items['admin/structure/block/list/' . $plugin_id] = array( | |
'title' => check_plain($theme->info['name']), | |
'page arguments' => array($key), | |
'type' => $key == $default_theme ? MENU_DEFAULT_LOCAL_TASK : MENU_LOCAL_TASK, | |
'access callback' => '_block_themes_access', | |
'access arguments' => array($key), | |
'file' => 'block.admin.inc', | |
); | |
$items['admin/structure/block/demo/' . $key] = array( | |
'title' => check_plain($theme->info['name']), | |
'page callback' => 'block_admin_demo', | |
'page arguments' => array($key), | |
'type' => MENU_CALLBACK, | |
'access callback' => '_block_themes_access', | |
'access arguments' => array($key), | |
'theme callback' => '_block_custom_theme', | |
'theme arguments' => array($key), | |
'file' => 'block.admin.inc', | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment