Example #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;
}
Example #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;
}