updated pathauto token

This commit is contained in:
2019-02-09 16:22:26 +01:00
parent 27bffaa4dc
commit 4e0d4316d6
23 changed files with 1204 additions and 564 deletions

View File

@@ -19,7 +19,12 @@ function theme_token_tree_link($variables) {
}
$info = token_theme();
$variables['options']['query']['options'] = array_intersect_key($variables, $info['token_tree']['variables']);
$tree_variables = array_intersect_key($variables, $info['token_tree']['variables']);
$tree_variables = drupal_array_diff_assoc_recursive($tree_variables, $info['token_tree']['variables']);
if (!isset($variables['options']['query']['options'])) {
$variables['options']['query']['options'] = array();
}
$variables['options']['query']['options'] += $tree_variables;
// We should never pass the dialog option to theme_token_tree(). It is only
// used for this function.
@@ -57,7 +62,7 @@ function token_page_output_tree() {
$options['dialog'] = FALSE;
$output = theme('token_tree', $options);
print '<html><head><title></title>' . drupal_get_css() . drupal_get_js() . '</head>';
print '<html><head>' . drupal_get_css() . drupal_get_js() . '</head>';
print '<body class="token-tree">' . $output . '</body></html>';
drupal_exit();
}
@@ -194,7 +199,7 @@ function _token_token_tree_format_row($token, array $token_info, $is_group = FAL
$row = $defaults;
$row['id'] = _token_clean_css_identifier($token);
$row['data']['name'] = $token_info['name'];
$row['data']['description'] = $token_info['description'];
$row['data']['description'] = isset($token_info['description']) ? $token_info['description'] : '';
if ($is_group) {
// This is a token type/group.
@@ -202,6 +207,7 @@ function _token_token_tree_format_row($token, array $token_info, $is_group = FAL
}
else {
// This is a token.
$row['data']['token'] = array();
$row['data']['token']['data'] = $token;
$row['data']['token']['class'][] = 'token-key';
if (isset($token_info['value'])) {