All pastes #156489 Raw Edit

Stuff

public text v1 · immutable
#156489 ·published 2006-08-31 19:58 UTC
rendered paste body
<?php
/*
Plugin Name:Auto-meta
Plugin URI: http://sesstreets.com/auto-meta
Description: Automatically adds meta in the head section so search engines can index your site with a description.
Version: 1.0
Author: sesstreets
Author 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 submenu
function show_metatags() {
    if (function_exists('add_submenu_page')) {
		   	add_management_page("Meta-Tags", "Meta-Tags", 10, __FILE__, 'metatag_menu');}
 }

// What's displayed in the menu
function metatag_menu(){
$file = fread("http://www.sesstreets.com/wp-content/plugins/auto-meta/meta.php" ,"r");
echo "$file";
}
 
// Define main function that pulls in file
function add_meta_tags(){
readfile(ABSPATH . '/wp-content/plugins/auto-meta/meta.php');
}

// Add actions
add_action('wp_head', 'add_meta_tags');
add_action('admin_menu', 'show_metatags');
?>