<?php/*Plugin Name:Auto-metaPlugin URI: http://sesstreets.com/auto-metaDescription: Automatically adds meta in the head section so search engines can index your site with a description.Version: 1.0Author: sesstreetsAuthor URI: http://.sesstreets.com*//* Copyright 2006 sesstreets (email : s@sesstreets.com) 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA*/// Add submenufunction show_metatags() { if (function_exists('add_submenu_page')) { add_management_page("Meta-Tags", "Meta-Tags", 10, __FILE__, 'metatag_menu');} }// What's displayed in the menufunction metatag_menu(){$file_name = ABSPATH . '/wp-content/plugins/auto-meta/meta.php';function display_form($file_contents){ echo <<<EOT<form action="$_SERVER['PHP_SELF']" method="POST"> <textarea name="filestring">{$file_contents}</textarea> <input type="submit" name="submit" value="Submit" /></form>EOT;}if ($_POST['submit']) { // save to file file_put_contents($file_name, $_POST['filestring']);} else { // assuming this is a GET request // get contents of file $file_contents = file_get_contents($file_name); // display form display_form($file_contents);}}// Define main function that pulls in filefunction add_meta_tags(){readfile(ABSPATH . '/wp-content/plugins/auto-meta/meta.php');}// Add actionsadd_action('wp_head', 'add_meta_tags');add_action('admin_menu', 'show_metatags');?>