13/12/2011, 12:13
|
| | Fecha de Ingreso: diciembre-2011 Ubicación: Concepcion
Mensajes: 3
Antigüedad: 12 años, 11 meses Puntos: 0 | |
Respuesta: Warning: session_start() [function.session-start] // Themes folder locations
define( 'WPSC_CORE_THEME_PATH', WPSC_FILE_PATH . '/wpsc-theme/' );
define( 'WPSC_CORE_THEME_URL' , WPSC_URL . '/wpsc-theme/' );
// No transient so look for the themes directory
if ( false === ( $theme_path = get_transient( 'wpsc_theme_path' ) ) ) {
// Use the old path if it exists
if ( file_exists( WPSC_OLD_THEMES_PATH.get_option('wpsc_selected_the me') ) )
define( 'WPSC_THEMES_PATH', WPSC_OLD_THEMES_PATH );
// Use the built in theme files
else
define( 'WPSC_THEMES_PATH', WPSC_CORE_THEME_PATH );
// Store the theme directory in a transient for safe keeping
set_transient( 'wpsc_theme_path', WPSC_THEMES_PATH, 60 * 60 * 12 );
// Transient exists, so use that
} else {
define( 'WPSC_THEMES_PATH', $theme_path );
}
}
/**
* wpsc_core_setup_cart()
*
* Setup the cart
*/
function wpsc_core_setup_cart() {
global $wpsc_cart;
if ( 2 == get_option( 'cart_location' ) )
add_filter( 'the_content', 'wpsc_shopping_cart', 14 );
// Cart exists in Session, so attempt to unserialize it
if ( isset( $_SESSION['wpsc_cart'] ) ) {
$wpsc_cart = maybe_unserialize( $_SESSION['wpsc_cart'] );
if ( !is_object( $wpsc_cart ) || ( 'wpsc_cart' != get_class( $wpsc_cart ) ) )
$wpsc_cart = new wpsc_cart;
// Cart doesn't exist in session, so create one
} else {
$wpsc_cart = new wpsc_cart;
}
}
/***
* wpsc_core_setup_globals()
*
* Initialize the wpsc query vars, must be a global variable as we
* cannot start it off from within the wp query object.
* Starting it in wp_query results in intractable infinite loops in 3.0
*/
function wpsc_core_setup_globals() {
global $wpsc_query_vars, $wpsc_cart, $wpec_ash;
// Setup some globals
$wpsc_query_vars = array();
$selected_theme = get_option( 'wpsc_selected_theme' );
// Pick selected theme or fallback to default
if ( empty( $selected_theme ) || !file_exists( WPSC_THEMES_PATH ) )
define( 'WPSC_THEME_DIR', 'default' );
else
define( 'WPSC_THEME_DIR', $selected_theme );
// Include a file named after the current theme, if one exists
if ( !empty( $selected_theme ) && file_exists( WPSC_THEMES_PATH . $selected_theme . '/' . $selected_theme . '.php' ) )
include_once( WPSC_THEMES_PATH . $selected_theme . '/' . $selected_theme . '.php' );
require_once( WPSC_FILE_PATH . '/wpsc-includes/shipping.helper.php');
$wpec_ash = new ASH();
}
Lo corté porque era demasiado largo |