You are here

function _amp_get_metadata_type_fields in Accelerated Mobile Pages (AMP) 7

Helper function to return information about metadata node type fields.

Return value

array

2 calls to _amp_get_metadata_type_fields()
amp_form_node_type_form_alter in ./amp.module
Implements hook_form_FORM_ID_alter().
amp_node_view in ./amp.module
Implements hook_node_view().

File

./amp.module, line 1652

Code

function _amp_get_metadata_type_fields() {
  return array(
    'schemaType' => array(
      'value' => 'NewsArticle',
      'type' => 'schema',
    ),
    'headline' => array(
      'value' => '[node:title]',
      'type' => 'text',
    ),
    'datePublished' => array(
      'value' => '[node:created]',
      'type' => 'date',
    ),
    'dateModified' => array(
      'value' => '[node:changed]',
      'type' => 'date',
    ),
    'description' => array(
      'value' => '[node:summary]',
      'type' => 'text',
    ),
    'author' => array(
      'value' => '[node:author:name]',
      'type' => 'Person',
    ),
    'image' => array(
      'value' => '',
      'type' => 'ImageObject',
    ),
    'imageStyle' => array(
      'value' => '',
      'type' => 'ImageStyle',
    ),
  );
}