Beispiel #1
0
/**
 * Call this function when plugin is deactivated
 */
function people_contact_install()
{
    update_option('a3rev_wp_people_contact_lite_version', '2.1.0');
    update_option('a3rev_wp_people_contact_version', '2.1.0');
    update_option('a3rev_wp_people_contact_ultimate_version', '2.1.0');
    $contact_us_page_id = People_Contact_Functions::create_page(esc_sql('contact-us-page'), 'contact_us_page_id', __('Contact Us Page', 'cup_cp'), '[people_contacts]');
    People_Contact_Functions::auto_create_page_for_wpml($contact_us_page_id, _x('contact-us-page', 'page_slug', 'cup_cp'), __('Contact Us Page', 'cup_cp'), '[people_contacts]');
    People_Contact_Profile_Data::install_database();
    // Set Settings Default from Admin Init
    global $people_contact_admin_init;
    $people_contact_admin_init->set_default_settings();
    delete_metadata('user', 0, $people_contact_admin_init->plugin_name . '-' . 'plugin_framework_global_box' . '-' . 'opened', '', true);
    // Build sass
    global $a3_people_contact_less;
    $a3_people_contact_less->plugin_build_sass();
    update_option('a3rev_wp_people_contact_just_installed', true);
}