<?php
/*
Plugin Name: #9657 Extra Metas
Plugin URI: http://core.trac.wordpress.org/ticket/9657
Description: Extra Meta Links Test Plugin. Activate to add an additional Meta Links for testing. Needs a patched template.php to work.
Version: 0.2.1
Author: hakre
Author URI: http://codex.wordpress.org/User:Hakre
*/
/*  Copyright 2009 by the authors

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

/**
 * extra-metas plugin class
 * 
 */
class pluginExtraMetas
{
	/**
	 * constructor
	 * 
	 * @return this
	 */
	function pluginExtraMetas() {
		// Add Hook for adding extra meta links
		add_filter('screen_meta_extra_metas', array($this, 'screen_meta_extra_metas'), 10, 2);		
	}	
	
	
	/**
	 * screen_meta_extra_metas hook function
	 * 
	 * @param  array  $extra_metas extra meta links array
	 * @param  string $screen      current screen
	 * @return array  filtered extra meta links array
	 */
	function screen_meta_extra_metas($extra_metas, $screen)
	{
		// sample everwhere additional link
		$extra_metas[] = array(__('Extra Meta Test'), '<h5>Test Content</h5><div>This is an Extra Meta Test content</div>');
		
		return $extra_metas;
	}
}

$oExtraMetas = new pluginExtraMetas();