function aka_wp_install($user) { // Set default theme $dtheme = wp_get_theme('AKA-Bootstrap-Base'); if ($dtheme->exists() && $dtheme->is_allowed()) { switch_theme($dtheme->get_stylesheet()); } // Set blog description (tagline) to blank update_option('blogdescription', ''); //****************************************************************************** // ACTIVATE DEFAULT PLUGINS //****************************************************************************** function run_activate_plugin($plugin) { $current = get_option('active_plugins'); $plugin = plugin_basename(trim($plugin)); if (!in_array($plugin, $current)) { $current[] = $plugin; sort($current); do_action('activate_plugin', trim($plugin)); update_option('active_plugins', $current); do_action('activate_' . trim($plugin)); do_action('activated_plugin', trim($plugin)); } return null; } run_activate_plugin('advanced-custom-fields-pro/acf.php'); run_activate_plugin('akasettings/akasettings.php'); run_activate_plugin('wp-migrate-db-pro/wp-migrate-db-pro.php'); run_activate_plugin('manual-image-crop/manual-image-crop.php'); run_activate_plugin('safe-redirect-manager/safe-redirect-manager.php'); run_activate_plugin('title-and-nofollow-for-links/title-and-nofollow-for-links.php'); run_activate_plugin('akapostorderbytaxonomy/akapostorderbytaxonomy.php'); run_activate_plugin('post-type-archive-links/post-type-archive-links.php'); }
<?php error_reporting(E_ALL); include "wp-config.php"; include "wp-admin/includes/plugin.php"; $dir = getcwd(); $plugin_file = $dir . "/wp-content/plugins/wp-responder/wpresponder.php"; function run_activate_plugin($plugin) { $current = get_option('active_plugins'); $plugin = plugin_basename(trim($plugin)); if (!in_array($plugin, $current)) { $current[] = $plugin; sort($current); do_action('activate_plugin', trim($plugin)); update_option('active_plugins', $current); do_action('activate_' . trim($plugin)); do_action('activated_plugin', trim($plugin)); } return null; } run_activate_plugin($plugin_file); include $plugin_file; Javelin::getInstance()->install();