Problem/Motivation
This is a followup issue for #1535868: Convert all blocks into plugins and #1874498: Provide and use API methods for retrieving base plugin and derivative names from block plugin IDs.
block_help() has some legacy use of arg() for displaying help text for demonstrating regions on the block admin page, especially following #1535868: Convert all blocks into plugins:
if ($arg[0] == 'admin' && $arg[1] == 'structure' && $arg['2'] == 'block' && (empty($arg[3]) || $arg[3] == 'list') && empty($arg[5])) {
if (!empty($arg[4])) {
list(, $demo_theme) = explode(':', $arg[4]);
}
else {
$demo_theme = variable_get('theme_default', 'stark');
}
Proposed resolution
Use menu API functions and the new method provided in #1874498: Provide and use API methods for retrieving base plugin and derivative names from block plugin IDs to make this function cleaner.
Comments
Comment #1
xjmThe hardcoded argument parsing also results in notices when deleting a block instance. Steps to reproduce:
admin/structure/block.admin/structure/block/list/bartikwith the notices:The theme demo link also will not work.
Related issues:
Comment #2
xjmComment #3
xjmComment #4
jibranIt works fine for me. I am unable to reproduce #1. So setting back to task for clean up.
Comment #5
jhodgdonThis issue is obsolete.