| 1 |
<?php |
| 2 |
/* |
| 3 |
Plugin Name: WP-Optimize |
| 4 |
Plugin URI: http://www.ruhanirabin.com/wp-optimize/ |
| 5 |
Description: This plugin helps you to keep your database clean by removing post revisions and spams in a blaze. allows you to rename your admin name also. Additionally it allows you to run optimize command on your wordpress core tables (use with caution). |
| 6 |
Version: 0.7.0 |
| 7 |
Author: Ruhani Rabin |
| 8 |
Author URI: http://www.ruhanirabin.com |
| 9 |
|
| 10 |
Copyright 2008-2009 Ruhani Rabin (email : get@ruhanirabin.com) |
| 11 |
|
| 12 |
This program is free software; you can redistribute it and/or modify |
| 13 |
it under the terms of the GNU General Public License as published by |
| 14 |
the Free Software Foundation; either version 2 of the License, or |
| 15 |
(at your option) any later version. |
| 16 |
|
| 17 |
This program is distributed in the hope that it will be useful, |
| 18 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 |
GNU General Public License for more details. |
| 21 |
|
| 22 |
You should have received a copy of the GNU General Public License |
| 23 |
along with this program; if not, write to the Free Software |
| 24 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 25 |
*/ |
| 26 |
|
| 27 |
# ---------------------------------- # |
| 28 |
# prevent file from being accessed directly |
| 29 |
# ---------------------------------- # |
| 30 |
if ('wp-optimize.php' == basename($_SERVER['SCRIPT_FILENAME'])) |
| 31 |
die ('Please do not access this file directly. Thanks!'); |
| 32 |
|
| 33 |
register_activation_hook(__FILE__,'optimize_admin_actions'); |
| 34 |
|
| 35 |
function optimize_menu(){ |
| 36 |
include 'wp-optimize-admin.php'; |
| 37 |
} |
| 38 |
|
| 39 |
function optimize_admin_actions() |
| 40 |
{ |
| 41 |
//add_options_page("WP-Optimize", "WP-Optimize", 10, "WP-Optimize", "optimize_menu"); |
| 42 |
add_submenu_page("index.php", "WP-Optimize", "WP-Optimize", 10, "WP-Optimize", "optimize_menu"); |
| 43 |
} |
| 44 |
|
| 45 |
add_action('admin_menu', 'optimize_admin_actions'); |
| 46 |
?> |