function jeg_get_navigation_setup($pageid = null)
{
    $navobj = array();
    $navobj['navpos'] = get_theme_mod('default_navigation', 'side');
    $navobj['navcollapse'] = get_theme_mod('default_collapse_navigator', false);
    $navobj['navtopmenu'] = get_theme_mod('default_menuheader_navigator', true);
    $navobj['navtopcenter'] = get_theme_mod('centering_top_navigator', false);
    $navobj['navtoptwoline'] = get_theme_mod('twoline_top_navigator', false);
    $navobj['navtopsmaller'] = get_theme_mod('smaller_navigator', false);
    $navobj['boxedcontent'] = get_theme_mod('boxed_content', false);
    if ($navobj['navpos'] === 'transparent') {
        $navobj['navtoptwoline'] = 0;
        $navobj['navtopcenter'] = get_theme_mod('centering_top_navigator_transparent', false);
        $navobj['navtopsmaller'] = get_theme_mod('smaller_navigator_transparent', false);
        $navobj['boxedcontent'] = get_theme_mod('boxed_content_transparent', false);
    }
    // alter page id
    $pageid = jeg_alter_woo_page_id($pageid);
    // check if page setting overrided on single page
    $pageid = $pageid === null ? JEG_PAGE_ID : $pageid;
    if (vp_metabox('jkreativ_general.override_navigation', null, $pageid)) {
        $navobj['navpos'] = vp_metabox('jkreativ_general.override_navigation_group.0.navigation_position', 'side', $pageid);
        $navobj['navcollapse'] = vp_metabox('jkreativ_general.override_navigation_group.0.default_collapse_navigator', false, $pageid);
        $navobj['navtopmenu'] = vp_metabox('jkreativ_general.override_navigation_group.0.default_menuheader_navigator', true, $pageid);
        $navobj['navtopcenter'] = vp_metabox('jkreativ_general.override_navigation_group.0.centering_top_navigator', false, $pageid);
        $navobj['navtoptwoline'] = vp_metabox('jkreativ_general.override_navigation_group.0.twoline_top_navigator', false, $pageid);
        $navobj['navtopsmaller'] = vp_metabox('jkreativ_general.override_navigation_group.0.smaller_navigator', false, $pageid);
        $navobj['boxedcontent'] = vp_metabox('jkreativ_general.override_navigation_group.0.boxed_content', false, $pageid);
        if ($navobj['navpos'] === 'transparent') {
            $navobj['navtoptwoline'] = 0;
            $navobj['navtopcenter'] = vp_metabox('jkreativ_general.override_navigation_group.0.centering_top_navigator_transparent', false, $pageid);
            $navobj['navtopsmaller'] = vp_metabox('jkreativ_general.override_navigation_group.0.smaller_navigator_transparent', false, $pageid);
            $navobj['boxedcontent'] = vp_metabox('jkreativ_general.override_navigation_group.0.boxed_content_transparent', false, $pageid);
        }
    }
    return $navobj;
}
Beispiel #2
0
function jeg_get_body_background()
{
    $bgobj = array();
    $bgobj['color'] = get_theme_mod('website_color_background', '#ffffff');
    $bgobj['imgbg'] = get_theme_mod('website_image_background', get_template_directory_uri() . '/public/img/pattern/grid_noise.png');
    if (ctype_digit($bgobj['imgbg']) || is_int($bgobj['imgbg'])) {
        $bgobj['imgbg'] = wp_get_attachment_image_src($bgobj['imgbg'], "full");
        $bgobj['imgbg'] = $bgobj['imgbg'][0];
    }
    $bgobj['bgvertical'] = get_theme_mod('website_background_vertical_position', 'center');
    $bgobj['bghorizontal'] = get_theme_mod('website_background_horizontal_position', 'center');
    $bgobj['bgrepeat'] = get_theme_mod('website_background_repeat', 'repeat');
    $bgobj['bgfullscreen'] = get_theme_mod('website_background_fullscreen', false);
    // alter page id
    global $post;
    $pageid = $post !== null ? jeg_alter_woo_page_id(get_the_ID()) : null;
    if (vp_metabox('jkreativ_general.override_background', null, $pageid)) {
        $bgobj = array();
        $bgobj['color'] = vp_metabox('jkreativ_general.override_background_group.0.color_background', null, $pageid);
        $bgobj['imgbg'] = jeg_get_image_attachment(vp_metabox('jkreativ_general.override_background_group.0.image_background', null, $pageid));
        $bgobj['bgvertical'] = vp_metabox('jkreativ_general.override_background_group.0.background_vertical_position', null, $pageid);
        $bgobj['bghorizontal'] = vp_metabox('jkreativ_general.override_background_group.0.background_horizontal_position', null, $pageid);
        $bgobj['bgrepeat'] = vp_metabox('jkreativ_general.override_background_group.0.background_repeat', null, $pageid);
        $bgobj['bgfullscreen'] = vp_metabox('jkreativ_general.override_background_group.0.background_fullscreen', null, $pageid);
    }
    return $bgobj;
}