PUM_Install::activate_site()
Installs the plugin
Description Description
Source Source
File: classes/Install.php
public static function activate_site() { // Add default values where needed. $options = array_merge( get_option( 'popmake_settings', array() ), array( 'disable_popup_category_tag' => 1, ) ); // Setup some default options. add_option( 'popmake_settings', $options ); add_option( 'pum_version', Popup_Maker::$VER ); pum(); // Setup the Popup & Theme Custom Post Type. // PUM_Types::register_post_types();. // Setup the Popup Taxonomies. // PUM_Types::register_taxonomies( true );. // Updates stored values for versioning. // PUM_Utils_Upgrades::update_plugin_version();. // We used transients before, but since the check for this option runs every admin page load it means 2 queries after its cleared. // To prevent that we flipped it, now we delete the following option, and check for it. // If its missing then we know its a fresh install. delete_option( '_pum_installed' ); // Prepare to redirect to welcome screen, if not seen before. if ( false === get_option( 'pum_seen_welcome' ) ) { set_transient( 'pum_activation_redirect', 1, 60 ); } pum_get_default_theme_id(); pum_install_built_in_themes(); pum_install_example_popups(); // Reset JS/CSS assets for regeneration. pum_reset_assets(); }
Expand full source code Collapse full source code View on Trac