Esempio n. 1
0
function dt_f_catalog_hide_mboxes($hidden, $screen, $use_defaults)
{
    $template = dt_core_get_template_name();
    if ('dt-catalog.php' == $template) {
        $meta_boxes = dt_core_get_metabox_list();
        if (!empty($meta_boxes)) {
            $hidden = array_unique(array_merge($hidden, $meta_boxes));
            foreach ($hidden as $index => $box) {
                if ('dt_page_box-catalog_category' == $box || 'dt_page_box-catalog_options' == $box || 'dt_page_box-footer_options' == $box || 'dt_page_box-sidebar_options' == $box || 'dt_page_box-background_options' == $box) {
                    unset($hidden[$index]);
                }
            }
        }
    }
    return $hidden;
}
Esempio n. 2
0
function dt_f_obo_slider_hide_mboxes($hidden, $screen, $use_defaults)
{
    $template = dt_core_get_template_name();
    if ('dt-obo-slideshow-fullwidth.php' == $template || 'dt-obo-slideshow-sidebar.php' == $template || 'dt-obo-homepage-blog.php' == $template) {
        $meta_boxes = dt_core_get_metabox_list();
        if (!empty($meta_boxes)) {
            $hidden = array_unique(array_merge($hidden, $meta_boxes));
            foreach ($hidden as $index => $box) {
                if ('dt_page_box-obo_slides_list' == $box || 'dt_page_box-obo_slides_options' == $box || 'dt_page_box-footer_options' == $box || 'dt_page_box-background_options' == $box || 'dt-obo-slideshow-sidebar.php' == $template && 'dt_page_box-sidebar_options' == $box) {
                    unset($hidden[$index]);
                }
            }
        }
    }
    return $hidden;
}
Esempio n. 3
0
<?php

global $post;
$template = dt_core_get_template_name();
?>

<style type="text/css">

	<?php 
$po = array();
if (!empty($post) && !dt_storage('is_index') && !is_archive()) {
    $po = get_post_meta($post->ID, '_dt_background_options', true);
}
$bg_fixed = false;
if (empty($po['enable'])) {
    $main_bg_img = dt_style_options_get_image(array(), of_get_option('background-bg_image', 'none'), of_get_option('main_bg-bg_custom'), of_get_option('main_bg-bg_upload'));
    $main_bg_pos = dt_style_options_get_bg_position(of_get_option('main_bg-bg_horizontal_pos'), of_get_option('main_bg-bg_vertical_pos'));
    $main_bg_color = of_get_option('main_bg-bg_color');
    $bg_repeat = of_get_option('main_bg-bg_repeat');
} else {
    if (!empty($po['bg_image'])) {
        $main_bg_img = 'url("' . $po['bg_image'] . '")';
    } else {
        $main_bg_img = 'none';
    }
    $main_bg_img .= ' !important;';
    $main_bg_pos = dt_style_options_get_bg_position(isset($po['h_pos']) ? $po['h_pos'] : 'center', isset($po['v_pos']) ? $po['v_pos'] : 'center');
    $main_bg_color = !empty($po['color']) ? $po['color'] : '#000';
    $bg_repeat = isset($po['repeat']) ? $po['repeat'] : 'repeat';
    if (!empty($po['fixed'])) {
        $bg_fixed = true;
Esempio n. 4
0
function dt_storage_add_data_init(array $data)
{
    $thumb_sizes = array('2_col' => array('fullwidth' => array(470, 300), 'sidebar' => array(345, 220)), '3_col' => array('fullwidth' => array(306, 200), 'sidebar' => array(224, 140)));
    $thumb_sizes = apply_filters('dt_storage_add_data_init_thumb_sizes', $thumb_sizes, $data);
    $add_data = array();
    $template = dt_core_get_template_name();
    $page_data = dt_storage('page_data');
    $page_opts = !empty($page_data['page_options']) ? $page_data['page_options'] : array();
    if (isset($data['layout'])) {
        $cols_layout = current(explode('-', $data['layout']));
        $add_data['init_layout'] = $cols_layout . '-' . $page_data['layout'];
    } else {
        $cols_layout = '';
    }
    if (isset($data['template_layout'])) {
        $template_layout = array('1' => $data['template_layout']);
    } else {
        $template_layout = explode('-', str_replace(array('dt-', '.php'), '', $template));
    }
    if (isset($template_layout[1])) {
        $template_layout = $template_layout[1];
        if (isset($thumb_sizes[$cols_layout][$template_layout][0]) && isset($thumb_sizes[$cols_layout][$template_layout][1])) {
            $add_data['thumb_w'] = $thumb_sizes[$cols_layout][$template_layout][0];
            $add_data['thumb_h'] = !empty($page_opts['thumb_height']) ? $page_opts['thumb_height'] : $thumb_sizes[$cols_layout][$template_layout][1];
        }
    } else {
        $template_layout = '';
    }
    $add_data['cols_layout'] = $cols_layout;
    $add_data['template_layout'] = $template_layout;
    $add_data = apply_filters('dt_storage_add_data_init', $add_data, $data, $thumb_sizes);
    dt_storage('add_data', $add_data);
}