Пример #1
0
/**
 * Process when plugin is activated
 */
function pvc_install()
{
    update_option('a3_pvc_version', '1.3.8');
    // empty pvc_daily table for daily
    wp_schedule_event(strtotime(date('Y-m-d') . ' 00:00:00'), 'daily', 'pvc_empty_daily_table_daily_event_hook');
    A3_PVC::install_database();
    // Set Settings Default from Admin Init
    global $wp_pvc_admin_init;
    $wp_pvc_admin_init->set_default_settings();
    update_option('pvc_just_installed', true);
}
Пример #2
0
/**
 * Process when plugin is activated
 */
function pvc_install()
{
    update_option('a3_pvc_version', '1.4.0');
    // empty pvc_daily table for daily
    wp_schedule_event(strtotime(date('Y-m-d') . ' 00:00:00'), 'daily', 'pvc_empty_daily_table_daily_event_hook');
    A3_PVC::install_database();
    // Set Settings Default from Admin Init
    global $wp_pvc_admin_init;
    $wp_pvc_admin_init->set_default_settings();
    delete_metadata('user', 0, $wp_pvc_admin_init->plugin_name . '-' . 'plugin_framework_global_box' . '-' . 'opened', '', true);
    update_option('pvc_just_installed', true);
}