Your IP : 216.73.216.74


Current Path : /proc/thread-self/root/proc/thread-self/root/usr/local/ei2/
Upload File :
Current File : //proc/thread-self/root/proc/thread-self/root/usr/local/ei2/wp.php

<?php

/* Wordpress post-installation optimization script */

/* Include the rquired files to use the WP API and functions such as install() and activate_plugin() */
$path = getcwd();
require_once ("wp-load.php");
require_once ("wp-admin/includes/plugin.php");
require_once ("wp-admin/includes/plugin-install.php");
require_once ("wp-admin/includes/class-wp-upgrader.php");
require_once ("wp-admin/includes/file.php");
require_once ("wp-admin/includes/misc.php");


$api = plugins_api("plugin_information", array( "slug" => "Anti-spam" ));       /* Retreive information about the Anti-Spam plugin from the WP API */
$object = new Plugin_Upgrader();
$object -> install ($api -> download_link);     /* Install the plugin */
$result = activate_plugin("$path/wp-content/plugins/anti-spam/anti-spam.php");  /* Activate the plugin */


unlink("wp-content/plugins/hello.php");         /* Delete the useless Hello Dolly plugin */


$buffer = file_get_contents("wp-config.php");
$replacement = "/**#@-*/ \ndefine('WP_AUTO_UPDATE_CORE', true );\n";            /*Enable automatic WP core updates*/
$replace = preg_replace("/\/\*\*\#\@\-\*\//", $replacement, $buffer, 1);
file_put_contents("wp-config.php", $replace);

/*
if (!file_exists('.htaccess')) {
	file_put_contents('.htaccess', '# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>

# END WordPress');
}
*/