 [ ← blog / drupal ](/) Jun 06, 2014  ·  \#drupal  ·  1 min read 

# Verify your Drupal site on Pinterest



 The [Metatag](http://drupal.org/project/metatag) module and [Site Verification](http://drupal.org/project/site_verify) module help setup site verification and social media integration. However social media is rapidly changing, more often than those submitting patches (or modules getting releases.) Or, hell, you're like me and think it's pointless to add a contrib module for a simple use case (note: I rock Metatag on this site.) One such case is Pinterest site verification. As far as I know this isn't supported by either module (more than likely it never will be on Metatag.) I whipped this up onto dropbucket.org for a friend and decided to share it here, as well. `<?php function my(theme|module)_preprocess_html($vars) {  $pinterest_domain = array(    '#tag' =?> 'meta',    '#attributes' => array(      'name' => 'p:domain_verify',      'content' => 'CODE__PROVIDED__HERE',    ),  );  drupal_add_html_head($pinterest_domain, 'p:domain_verify');}`This snippet can easily be reused for various site verifications, as well. 

  ![](/themes/custom/mglaman/images/headshot.webp)Thanks for reading

I write about Drupal, PHP, and the quiet infrastructure behind large sites — caching, config, and testing. New posts land every week or two.

 [Subscribe via RSS →](/rss.xml) [About me →](/about-me) 

 



 

  [← Older

"Getting Cozy with Drupal Commerce"

 ](/blog/getting-cozy-drupal-commerce) [Newer →

Keep Calm and Clear Cache

 ](/blog/keep-calm-and-clear-cache)