Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
node.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
3 Jan 2013 at 22:57 UTC
Updated:
29 Jul 2014 at 21:43 UTC
This is a followup issue for #1535868: Convert all blocks into plugins.
node_block_list_alter() could use cleanup and refactoring. if (arg(0) == 'node' && arg(1) == 'add' && arg(2)) {
$node_add_arg = strtr(arg(2), '-', '_');
}
...
elseif (isset($node_add_arg) && isset($node_types[$node_add_arg])) {
// This is a node creation page
if (!isset($block_node_types[$block->module][$block->delta][$node_add_arg])) {
// This block should not be displayed for this node type.
unset($blocks[$key]);
continue;
}
if (!isset($block->theme) || !isset($block->status) || $block->theme != $theme_key || $block->status != 1) {
// This block was added by a contrib module, leave it in the list.
continue;
node_block_list_alter() if it is not replaced with a visibility plugin.
Comments
Comment #1
xjmComment #2
xjmComment #3
xjmOops.
Comment #3.0
xjmUpdated issue summary.