You are here

function amp_theme in Accelerated Mobile Pages (AMP) 7

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

Implements hook_theme().

3 string references to 'amp_theme'
amp_admin_form in ./amp.admin.inc
Form constructor for the AMP administration form.
amp_custom_theme in ./amp.module
Implements hook_custom_theme().
amp_uninstall in ./amp.install
Implements hook_uninstall().

File

./amp.module, line 98

Code

function amp_theme() {
  $theme = array(
    'amp_iframe' => array(
      'variables' => array(
        'iframe' => NULL,
      ),
      'template' => 'templates/amp-iframe',
    ),
    'amp_pixel' => array(
      'variables' => array(
        'domain' => NULL,
        'query_string' => NULL,
        'subs' => array(
          'AMPDOC_HOST' => array(
            'active' => FALSE,
          ),
          'AMPDOC_URL' => array(
            'active' => FALSE,
          ),
          'CANONICAL_HOST' => array(
            'active' => FALSE,
          ),
          'CANONICAL_PATH' => array(
            'active' => FALSE,
          ),
          'CANONICAL_URL' => array(
            'active' => FALSE,
          ),
          'SOURCE_URL' => array(
            'active' => FALSE,
          ),
          'SOURCE_HOST' => array(
            'active' => FALSE,
          ),
          'DOCUMENT_CHARSET' => array(
            'active' => FALSE,
          ),
          'DOCUMENT_REFERRER' => array(
            'active' => FALSE,
          ),
          'TITLE' => array(
            'active' => FALSE,
          ),
          'VIEWER' => array(
            'active' => FALSE,
          ),
          'CONTENT_LOAD_TIME' => array(
            'active' => FALSE,
          ),
          'DOMAIN_LOOKUP_TIME' => array(
            'active' => FALSE,
          ),
          'DOM_INTERACTIVE_TIME' => array(
            'active' => FALSE,
          ),
          'PAGE_DOWNLOAD_TIME' => array(
            'active' => FALSE,
          ),
          'PAGE_LOAD_TIME' => array(
            'active' => FALSE,
          ),
          'REDIRECT_TIME' => array(
            'active' => FALSE,
          ),
          'SERVER_RESPONSE_TIME' => array(
            'active' => FALSE,
          ),
          'TCP_CONNECT_TIME' => array(
            'active' => FALSE,
          ),
          'AVAILABLE_SCREEN_HEIGHT' => array(
            'active' => FALSE,
          ),
          'AVAILABLE_SCREEN_WIDTH' => array(
            'active' => FALSE,
          ),
          'BROWSER_LANGUAGE' => array(
            'active' => FALSE,
          ),
          'SCREEN_COLOR_DEPTH' => array(
            'active' => FALSE,
          ),
          'VIEWPORT_HEIGHT' => array(
            'active' => FALSE,
          ),
          'VIEWPORT_WIDTH' => array(
            'active' => FALSE,
          ),
          'PAGE_VIEW_ID' => array(
            'active' => FALSE,
          ),
          'RANDOM' => array(
            'active' => FALSE,
          ),
          'TIMESTAMP' => array(
            'active' => FALSE,
          ),
          'TOTAL_ENGAGED_TIME' => array(
            'active' => FALSE,
          ),
        ),
      ),
      'template' => 'templates/amp-pixel',
    ),
    'amp_video' => array(
      'variables' => array(
        'file' => NULL,
        'src' => NULL,
        'description' => NULL,
        'video_attributes_array' => array(),
        'fallback_text' => '',
      ),
      'template' => 'templates/amp-video',
    ),
  );
  return $theme;
}