Beispiel #1
0
function _install_jigoshop()
{
    jigoshop_populate_options();
    jigoshop_create_emails();
    if (!get_option('jigoshop_db_version')) {
        jigoshop_tables_install();
        /* we need tables installed first to eliminate installation errors */
        jigoshop_create_pages();
        jigoshop_post_type();
        jigoshop_default_taxonomies();
        // Clear cron
        wp_clear_scheduled_hook('jigoshop_cron_pending_orders');
        // Flush Rules
        flush_rewrite_rules(false);
        // Update version
        update_site_option("jigoshop_db_version", JIGOSHOP_DB_VERSION);
    }
}
/**
 * Install jigoshop
 * 
 * Calls each function to install bits, and clears the cron jobs and rewrite rules
 *
 * @since 		1.0
 */
function install_jigoshop() {
	
	// Get options and define post types before we start
	require_once ( 'jigoshop-admin-settings-options.php' );	
	jigoshop_post_type();
	
	// Do install
	jigoshop_default_options();
	jigoshop_create_pages();
	jigoshop_tables_install();
	
	jigoshop_post_type();
	jigoshop_default_taxonomies();
	
	// Clear cron
	wp_clear_scheduled_hook('jigoshop_update_sale_prices_schedule_check');
	update_option('jigoshop_update_sale_prices', 'no');
	
	// Flush Rules
	flush_rewrite_rules( false );
	
	// Update version
	update_option( "jigoshop_db_version", JIGOSHOP_VERSION );
}