Skip to content

Instantly share code, notes, and snippets.

@abecoffman
Created March 13, 2011 23:25
Show Gist options
  • Save abecoffman/868547 to your computer and use it in GitHub Desktop.
Save abecoffman/868547 to your computer and use it in GitHub Desktop.
Adds Facebook SDK anchor and Namespaces to Wordpress
<?php
function facebook_namespaces($attr) {
$attr .= "\n xmlns=\"http://www.w3.org/1999/xhtml\"";
$attr .= "\n xmlns:og=\"http://opengraphprotocol.org/schema/\"";
$attr .= "\n xmlns:fb=\"http://www.facebook.com/2008/fbml\"";
return $attr;
}
add_filter('language_attributes', 'facebook_namespaces');
function facebook_sdk_anchor() {
echo '<div id="fb-root"></div>';
}
add_action('wp_footer', 'facebook_sdk_anchor');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment