function fieldable_panels_panes_entity_info_alter in Fieldable Panels Panes (FPP) 7
Implements hook_entity_info_alter().
File
- ./
fieldable_panels_panes.module, line 139 - Maintains an entity that appears as panel pane content.
Code
function fieldable_panels_panes_entity_info_alter(&$info) {
$old_base_path = 'admin/structure/panels/entity/manage';
$new_base_path = 'admin/structure/fieldable-panels-panes';
if (is_array($info) && !empty($info)) {
foreach ($info['fieldable_panels_pane']['bundles'] as $name => &$bundle) {
if (isset($bundle['admin']['path']) && strpos($bundle['admin']['path'], $old_base_path) !== FALSE) {
$bundle['admin']['path'] = str_replace($old_base_path, $new_base_path, $bundle['admin']['path']);
$bundle['admin']['real path'] = str_replace($old_base_path, $new_base_path, $bundle['admin']['real path']);
$bundle['admin']['bundle argument'] = $bundle['admin']['bundle argument'] - 2;
}
}
}
}