You are here

function _metatags_quick_known_fields in Meta tags quick 7.2

Same name and namespace in other branches
  1. 8.3 known_tags.inc \_metatags_quick_known_fields()

Returns array of fields needed for upgrade from nodewords, keyed by meta name We can add a default formatter to each tag type this can be seen in the canonical tag where we want it formed as a link element by default. To do this add a 'formatter' array element matching one of the defined metatags_quick formatters @todo: use hooks to alter known tags

Return value

array

4 calls to _metatags_quick_known_fields()
metatags_quick_admin_settings in ./metatags_quick.admin.inc
General settings form
metatags_quick_update_7006 in ./metatags_quick.install
Ensure all existing metatags_quick fields have the default display formatter if set.
metatags_quick_upgrade in ./metatags_quick_import.admin.inc
@file upgrade path from the D6 nodewords module @author maxiorel <http://drupal.org/user/49016> @author valthebald <http://drupal.org/user/239562>
_metatags_quick_field_attach in ./metatags_quick.admin.inc

File

./known_tags.inc, line 15
Functionality needed for upgrade path from nodewords

Code

function _metatags_quick_known_fields() {
  return array(
    'abstract' => array(
      'type' => 'meta_contents',
      'widget' => 'metatags_quick_textfield',
      'title' => t('Abstract'),
      'description' => t('Enter a short abstract. Typically it is one sentence.'),
    ),
    /* Comment that out until [#1229822] is solved properly */
    'canonical' => array(
      'type' => 'head_link',
      'widget' => 'metatags_quick_textfield',
      'formatter' => 'metatags_quick_link',
      'title' => t('Canonical URL'),
      'description' => t('Canonical URLs are used from the search engines, and allow them to not report duplicate titles for HTML pages that are accessible from different URLs. Use an absolute path for your URL; canonical URLs that point to a different domain are normally not accepted.'),
    ),
    'copyright' => array(
      'type' => 'meta_contents',
      'widget' => 'metatags_quick_textfield',
      'title' => t('Copyright'),
      'description' => t('Enter a short copyright statement.'),
    ),
    'description' => array(
      'type' => 'meta_contents',
      'widget' => 'metatags_quick_textarea',
      'title' => t('Description'),
      'description' => t('Enter a description. Limit your description to about 20 words, with a maximum of 255 characters. It should not contain any HTML tags or other formatting.'),
    ),
    'keywords' => array(
      'type' => 'meta_contents',
      'widget' => 'metatags_quick_textfield',
      'title' => t('Keywords'),
      'description' => t('Enter a short abstract. Typically it is one sentence.'),
    ),
    'revisit_after' => array(
      'meta_name' => 'revisit-after',
      'type' => 'meta_contents',
      'widget' => 'metatags_quick_textfield',
      'title' => t('Revisit after'),
      'description' => t('day(s)'),
    ),
    'robots' => array(
      'type' => 'meta_contents',
      'widget' => 'metatags_quick_checkboxes',
      'title' => t('Robots'),
      'options' => 'noarchive,nofollow,noindex,noodp,nosnippet,noydir',
    ),
    // Using 'title' as the key messes up the admin.
    'meta_title' => array(
      'meta_name' => 'title',
      'type' => 'meta_contents',
      'widget' => 'metatags_quick_textfield',
      'title' => t('Title'),
      'description' => t('Custom title.'),
    ),
  );
}