Adds meta tag to verify site with Twitter on Drupal

Public

Adds metatag that allows you to verify site with Twitter. Drop in module or template.php

</> CopyGet raw version
php
  1. <?php
  2. function mytheme_preprocess_html($vars) {
  3. $twitter_account = array(
  4. '#tag' => 'meta',
  5. '#attributes' => array(
  6. 'property' => 'twitter:account_id',
  7. 'content' => '8665962',
  8. ),
  9. );
  10. drupal_add_html_head($twitter_account, 'twitter:account_id');
  11. }

Comments

tomavitabile's picture

<?php
function mytheme_preprocess_html($vars) {
$twitter_account = array(
'#tag' => 'meta',
'#attributes' => array(
'property' => 'twitter:account_id',
'content' => '8665962',
),
);
drupal_add_html_head($twitter_account, 'twitter:account_id');
}