empty_page_extras.page_title.inc in Empty Page 7
File
modules/empty_page_extras/plugins/page_title/empty_page_extras.page_title.inc
View source
<?php
function empty_page_extras_page_title_pattern_alter(&$pattern, &$types) {
$menu_item = menu_get_item();
$callbacks = empty_page_get_callbacks();
foreach ($callbacks as $cid => $callback) {
if ($menu_item['path'] == $callback->path) {
$pattern = variable_get('page_title_empty_page_' . $cid, '');
break;
}
}
}
function empty_page_extras_page_title_settings() {
$settings = array();
$callbacks = empty_page_get_callbacks();
foreach ($callbacks as $cid => $callback) {
$label_args = empty($callback->page_title) ? '[no title]' : $callback->page_title;
$settings['page_title_empty_page_' . $cid] = array(
'label' => 'Empty Page Callback - %title',
'label arguments' => array(
'%title' => $label_args,
),
'description' => 'This pattern will be used for /%path',
'description arguments' => array(
'%path' => $callback->path,
),
'scopes' => array(
'global',
),
);
}
return $settings;
}