Beispiel #1
0
function ecwid_apply_theme($theme_name = null)
{
    $themes = array('bretheon', 'responsive', 'twentyfourteen', 'pagelines', 'envision', 'twentyfifteen', 'customizr', 'evolve', 'twentytwelve', 'genesis', 'twentysixteen');
    if (empty($theme_name)) {
        $theme_name = ecwid_get_theme_identification();
    }
    $theme_file = '';
    if (in_array($theme_name, $themes)) {
        $theme_file = ECWID_THEMES_DIR . '/class-ecwid-theme-' . $theme_name . '.php';
    }
    $theme_file = apply_filters('ecwid_get_theme_file', $theme_file);
    if (!empty($theme_file) && is_file($theme_file) && is_readable($theme_file)) {
        require_once $theme_file;
    }
}
function ecwid_apply_theme($theme_name = null)
{
    $themes = array('bretheon', 'responsive', 'twentyfourteen', 'pagelines', 'envision', 'twentyfifteen', 'customizr', 'evolve', 'twentytwelve', 'genesis', 'twentysixteen', 'mantra', 'attitude', 'responsiveboat');
    if (empty($theme_name)) {
        $theme_name = ecwid_get_theme_identification();
    }
    $theme_file = '';
    if ($theme_name == 'zerif-lite' && function_exists('wp_get_theme') && wp_get_theme()->Name == 'ResponsiveBoat') {
        $theme_name = 'responsiveboat';
    }
    if (in_array($theme_name, $themes)) {
        $theme_file = ECWID_THEMES_DIR . '/class-ecwid-theme-' . $theme_name . '.php';
    }
    $theme_file = apply_filters('ecwid_get_theme_file', $theme_file);
    if (!empty($theme_file) && is_file($theme_file) && is_readable($theme_file)) {
        require_once $theme_file;
    }
}