diff --git a/metatag.admin.inc b/metatag.admin.inc index 7249d24..34dc8d0 100644 --- a/metatag.admin.inc +++ b/metatag.admin.inc @@ -309,10 +309,6 @@ function metatag_config_edit_form($form, &$form_state, $config) { metatag_metatags_form($form, $config->instance, $config->config, $options); $form['metatags']['#type'] = 'container'; - // Make the token browser available. - $form['metatags']['#prefix'] = $form['metatags']['#description']; - unset($form['metatags']['#description']); - $form['actions']['#type'] = 'actions'; $form['actions']['save'] = array( '#type' => 'submit', diff --git a/metatag.install b/metatag.install index 29f44a7..cf53584 100644 --- a/metatag.install +++ b/metatag.install @@ -1736,3 +1736,12 @@ function metatag_update_7038() { } } } + +/** + * Reload some meta tag caches. + */ +function metatag_update_7039() { + foreach (language_list() as $langcode => $language) { + cache_clear_all('info:' . $langcode, 'cache_metatag'); + } +} diff --git a/metatag.metatag.inc b/metatag.metatag.inc index c4bcc23..5865d5f 100644 --- a/metatag.metatag.inc +++ b/metatag.metatag.inc @@ -130,10 +130,17 @@ function metatag_metatag_config_instance_info() { * Implements hook_metatag_info(). */ function metatag_metatag_info() { + $info['groups']['basic'] = array( + 'label' => t('Basic tags'), + 'form' => array( + '#weight' => 1, + '#collapsed' => FALSE, + ), + ); $info['groups']['advanced'] = array( - 'label' => t('Advanced'), + 'label' => t('Advanced tags'), 'form' => array( - '#weight' => 100, + '#weight' => 2, ), ); @@ -144,6 +151,7 @@ function metatag_metatag_info() { 'label' => t('Page title'), 'description' => t("The text to display in the title bar of a visitor's web browser when they view this page. This meta tag may also be used as the title of the page when a visitor bookmarks or favorites this page."), 'class' => 'DrupalTitleMetaTag', + 'group' => 'basic', 'weight' => ++$weight, ); @@ -151,6 +159,7 @@ function metatag_metatag_info() { 'label' => t('Description'), 'description' => t("A brief and concise summary of the page's content, preferably 150 characters or less. The description meta tag may be used by search engines to display a snippet about the page in search results."), 'class' => 'DrupalTextMetaTag', + 'group' => 'basic', 'weight' => ++$weight, 'form' => array( '#type' => 'textarea', @@ -163,6 +172,7 @@ function metatag_metatag_info() { 'label' => t('Abstract'), 'description' => t("A brief and concise summary of the page's content, preferably 150 characters or less. The abstract meta tag may be used by search engines for archiving purposes."), 'class' => 'DrupalTextMetaTag', + 'group' => 'basic', 'weight' => ++$weight, 'form' => array( '#type' => 'textarea', @@ -175,6 +185,7 @@ function metatag_metatag_info() { 'label' => t('Keywords'), 'description' => t("A comma-separated list of keywords about the page. This meta tag is not supported by most search engines anymore."), 'class' => 'DrupalTextMetaTag', + 'group' => 'basic', 'weight' => ++$weight, ); diff --git a/metatag.module b/metatag.module index 418d84a..8429934 100644 --- a/metatag.module +++ b/metatag.module @@ -1299,14 +1299,11 @@ function metatag_metatags_form(array &$form, $instance, array $metatags = array( // Check the #access of each group. If it passed, we display options for // 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)); - - // Add the token list to the top of the fieldset. - $form['metatags']['#description'] = $token_listing_link; - // Check if each meta tag group is being displayed. if (!empty($group_metatag_access)) { + // Built the token browser link. + $token_listing_link = theme('token_tree', array('token_types' => $options['token types'], 'dialog' => TRUE)); + foreach ($group_metatag_access as $group_key => $token_access) { if ($token_access) { // Update the description. @@ -1316,6 +1313,8 @@ function metatag_metatags_form(array &$form, $instance, array $metatags = array( else { $form['metatags'][$langcode][$group_key]['#description'] = ''; } + + // Add the token browser popup link. $form['metatags'][$langcode][$group_key]['#description'] .= $token_listing_link; } }