Foaf Header Plugin for WordPress

Drop a file called "foaf_header.php" into your site's wp-content/plugins/ and fill it with the following text:



<?php
/*
Plugin Name: Foaf Header
Version: 0.5
Plugin URI: http://www.cozy.org/wordpress/foaf-header.html
Description: Insert link to an associated FOAF (Friend of a friend).
Author: Ben Hyde
Author URI: http://enthusiasm.cozy.org/
*/ 

function insert_foaf_meta_tag() {
  echo <<<EOT
<link rel="meta" href="http://example.com/my/foaf.rdf"
      type="application/rdf+xml" title="FOAF" />
EOT;
}

add_action('wp_head', 'insert_foaf_meta_tag',3);

?>

Be sure to modify "http://example.com/my/foaf.rdf" to point to your actual foaf file. Save the file, activate the plug-in by going to your wordpress adminstration UI, visiting the plug-in page and hitting activate.

That's it.

You should see the added link on the source of your pages, near the bottom of the <head> section.

Meanwhile FOAF Output Plugin is much more full featured, with some really cool output.


Last modified: Sun Aug 15 13:24:06 EDT 2004