Created
March 13, 2011 23:25
-
-
Save abecoffman/868547 to your computer and use it in GitHub Desktop.
Adds Facebook SDK anchor and Namespaces to Wordpress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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