diff --git a/sites/all/modules/contrib/metatag/metatag.module b/sites/all/modules/contrib/metatag/metatag.module index 7f2edd6..5a47094 100644 --- a/sites/all/modules/contrib/metatag/metatag.module +++ b/sites/all/modules/contrib/metatag/metatag.module @@ -1230,8 +1230,19 @@ function metatag_metatags_form(array &$form, $instance, array $metatags = array( // tokens. By this we update the #description of each group. if ($form['metatags']['#access']) { // Built the token list. - $token_listing_link = theme('token_tree', array('token_types' => $options['token types'], 'dialog' => TRUE)); - + //for value "all" theme_token_tree() compares with string, not array + if (in_array('all', $options['token types'])) { + $token_listing_link = theme('token_tree', array( + 'token_types' => 'all', + 'dialog' => TRUE + )); + } + else { + $token_listing_link = theme('token_tree', array( + 'token_types' => $options['token types'], + 'dialog' => TRUE + )); + } // Add the token list to the top of the fieldset. $form['metatags'][$langcode]['#description'] = $token_listing_link; diff --git a/sites/all/modules/contrib/metatag/metatag_context/metatag_context.context.inc b/sites/all/modules/contrib/metatag/metatag_context/metatag_context.context.inc index 9a0822f..5e33ed0 100644 --- a/sites/all/modules/contrib/metatag/metatag_context/metatag_context.context.inc +++ b/sites/all/modules/contrib/metatag/metatag_context/metatag_context.context.inc @@ -27,7 +27,12 @@ class metatag_context_reaction extends context_reaction { } // No options currently available. - $options = array(); + //provide token types + $options = array( + 'token types' => array('node'), + ); + //allow others modules to add token types + drupal_alter('metatag_add_token_types', $options); $form['help'] = array( '#prefix' => '

', @@ -80,9 +85,6 @@ class metatag_context_reaction extends context_reaction { } } - // Show all takens. - $form['metatags']['tokens']['#token_types'] = 'all'; - $form['metatag_admin'] = array( '#type' => 'checkbox', '#title' => t('Show on metatag admin page.'),