/** * Does initial setup on activation of the plugin */ public function do_activation() { require_once $this->plugin_path . 'admin/mpp-admin-install.php'; mpp_upgrade_legacy_1_0_b1_activity(); //post type require_once $this->plugin_path . 'core/common/mpp-common-functions.php'; require_once $this->plugin_path . 'core/mpp-post-type.php'; //store default settings if not already exists add_option('mpp-settings', mpp_get_all_options()); //initialize post type( because we want to flush the rewrite rules) MPP_Post_Type_Helper::get_instance()->init(); //rewrite end points add_rewrite_endpoint('manage', EP_PERMALINK); add_rewrite_endpoint('media', EP_PERMALINK); flush_rewrite_rules(); //multiple terms creation by WordPress is too much db intensive, let us do it lightly mpp_install_terms(); //on activation, create logger table mpp_install_db(); }
public function do_activation() { require_once $this->plugin_path . 'admin/mpp-admin-install.php'; mpp_upgrade_legacy_1_0_b1_activity(); //post type require_once $this->plugin_path . 'core/common/mpp-common-functions.php'; require_once $this->plugin_path . 'core/mpp-post-type.php'; add_option('mpp-settings', mpp_get_all_options()); MPP_Post_Type_Helper::get_instance()->init(); //rewrite end points add_rewrite_endpoint('manage', EP_PERMALINK); add_rewrite_endpoint('media', EP_PERMALINK); flush_rewrite_rules(); //on activation, create logger table mpp_install_terms(); mpp_install_db(); }