You are here

function amp_theme in Accelerated Mobile Pages (AMP) 8.3

Same name and namespace in other branches
  1. 8 amp.module \amp_theme()
  2. 8.2 amp.module \amp_theme()
  3. 7 amp.module \amp_theme()

Implements hook_theme().

File

./amp.module, line 179
Provides functionality for handling AMP.

Code

function amp_theme() {
  $theme = [
    'amp_iframe' => [
      'variables' => [
        'iframe' => NULL,
      ],
    ],
    'amp_ad' => [
      'variables' => [
        'type' => NULL,
        'attributes' => [],
      ],
    ],
    'amp_analytics' => [
      'variables' => [
        'account' => NULL,
        'attributes' => [],
      ],
    ],
    'block__amp_system_branding_block' => [
      'render element' => 'elements',
      'base hook' => 'block',
    ],
    'amp_custom_style' => [
      'render element' => 'element',
    ],
    'amp_video' => [
      'variables' => [
        'attributes' => [],
      ],
    ],
    'amp_image_carousel' => [
      'variables' => [
        'items' => [],
        'attributes' => [],
      ],
    ],
    'amp_views_carousel' => [
      'variables' => [
        'view' => NULL,
        'options' => NULL,
        'rows' => NULL,
        'title' => NULL,
        'attributes' => [],
      ],
      'file' => 'amp.theme.inc',
    ],
    'amp_sidebar' => [
      'render element' => 'element',
      'id' => NULL,
      'tabindex' => NULL,
      'attributes' => [],
      'content_attributes' => [],
      'file' => 'amp.theme.inc',
    ],
    'amp_sidebar_toggle' => [
      'variables' => [
        'sidebarid' => NULL,
        'tabindex' => NULL,
        'title' => NULL,
        'attributes' => [],
      ],
    ],
    'amp_social_share' => [
      'variables' => [
        'providers' => [],
        'app_id' => '',
      ],
    ],
    'amp_social_post_theme' => [
      'render element' => 'element',
      'variables' => [
        'url' => NULL,
        'provider' => NULL,
        'placeholder' => NULL,
        'attributes' => [],
      ],
    ],
    'amp_pixel' => [
      'variables' => [
        'domain' => NULL,
        'query_string' => NULL,
        'subs' => [
          'AMPDOC_HOST' => [
            'active' => FALSE,
          ],
          'AMPDOC_URL' => [
            'active' => FALSE,
          ],
          'CANONICAL_HOST' => [
            'active' => FALSE,
          ],
          'CANONICAL_PATH' => [
            'active' => FALSE,
          ],
          'CANONICAL_URL' => [
            'active' => FALSE,
          ],
          'SOURCE_URL' => [
            'active' => FALSE,
          ],
          'SOURCE_HOST' => [
            'active' => FALSE,
          ],
          'DOCUMENT_CHARSET' => [
            'active' => FALSE,
          ],
          'DOCUMENT_REFERRER' => [
            'active' => FALSE,
          ],
          'TITLE' => [
            'active' => FALSE,
          ],
          'VIEWER' => [
            'active' => FALSE,
          ],
          'CONTENT_LOAD_TIME' => [
            'active' => FALSE,
          ],
          'DOMAIN_LOOKUP_TIME' => [
            'active' => FALSE,
          ],
          'DOM_INTERACTIVE_TIME' => [
            'active' => FALSE,
          ],
          'PAGE_DOWNLOAD_TIME' => [
            'active' => FALSE,
          ],
          'PAGE_LOAD_TIME' => [
            'active' => FALSE,
          ],
          'REDIRECT_TIME' => [
            'active' => FALSE,
          ],
          'SERVER_RESPONSE_TIME' => [
            'active' => FALSE,
          ],
          'TCP_CONNECT_TIME' => [
            'active' => FALSE,
          ],
          'AVAILABLE_SCREEN_HEIGHT' => [
            'active' => FALSE,
          ],
          'AVAILABLE_SCREEN_WIDTH' => [
            'active' => FALSE,
          ],
          'BROWSER_LANGUAGE' => [
            'active' => FALSE,
          ],
          'SCREEN_COLOR_DEPTH' => [
            'active' => FALSE,
          ],
          'VIEWPORT_HEIGHT' => [
            'active' => FALSE,
          ],
          'VIEWPORT_WIDTH' => [
            'active' => FALSE,
          ],
          'PAGE_VIEW_ID' => [
            'active' => FALSE,
          ],
          'RANDOM' => [
            'active' => FALSE,
          ],
          'TIMESTAMP' => [
            'active' => FALSE,
          ],
          'TOTAL_ENGAGED_TIME' => [
            'active' => FALSE,
          ],
        ],
      ],
    ],
  ];
  return $theme;
}