/**
 * Created by Sublime Text 2.
 * User: thanhhiep992
 * Date: 12/08/15
 * Time: 10:20 AM
 */

add_action('admin_init', 's7upf_custom_meta_boxes');
if(!function_exists('s7upf_custom_meta_boxes')){
    function s7upf_custom_meta_boxes(){
        //Format content
        $format_metabox = array(
            'id' => 'block_format_content',
            'title' => esc_html__('Format Settings', 'handy'),
            'desc' => '',
            'pages' => array('post'),
            'context' => 'normal',
            'priority' => 'high',
            'fields' => array(                
                array(
                    'id' => 'format_image',
                    'label' => esc_html__('Upload Image', 'handy'),
                    'type' => 'upload',
                ),
                array(
                    'id' => 'format_gallery',
                    'label' => esc_html__('Add Gallery', 'handy'),
                    'type' => 'Gallery',
                ),
                array(
                    'id' => 'format_media',
                    'label' => esc_html__('Link Media', 'handy'),
                    'type' => 'text',
                )
            ),
        );
        // SideBar
    	$sidebar_metabox_default = array(
            'id'        => 'sv_sidebar_option',
            'title'     => 'Advanced Settings',
            'desc'      => '',
            'pages'     => array( 'page','post','product'),
            'context'   => 'side',
            'priority'  => 'low',
            'fields'    => array(
                array(
                    'id'          => 'sv_sidebar_position',
                    'label'       => esc_html__('Sidebar position ','handy'),
                    'type'        => 'select',
                    'std' => '',
                    'choices'     => array(
                        array(
                            'label'=>esc_html__('--Select--','handy'),
                            'value'=>'',
                        ),
                        array(
                            'label'=>esc_html__('No Sidebar','handy'),
                            'value'=>'no'
                        ),
                        array(
                            'label'=>esc_html__('Left sidebar','handy'),
                            'value'=>'left'
                        ),
                        array(
                            'label'=>esc_html__('Right sidebar','handy'),
                            'value'=>'right'
                        ),
                        array(
                            'label'=>esc_html__('Left - Right sidebar','handy'),
                            'value'=>'left-right'
                        ),
                    ),

                ),
                array(
                    'id'        =>'sv_select_sidebar',
                    'label'     =>esc_html__('Selects sidebar','handy'),
                    'type'      =>'sidebar-select',
                    'condition' => 'sv_sidebar_position:not(no),sv_sidebar_position:not()',
                ),
                array(
                    'id'        =>'sv_select_sidebar2',
                    'label'     =>esc_html__('Selects Right sidebar','handy'),
                    'type'      =>'sidebar-select',
                    'condition' => 'sv_sidebar_position:is(left-right)',
                ),
                array(
                    'id'          => 'sv_show_breadrumb',
                    'label'       => esc_html__('Show Breadcrumb','handy'),
                    'type'        => 'select',
                    'choices'     => array(
                        array(
                            'label'=>esc_html__('--Select--','handy'),
                            'value'=>'',
                        ),
                        array(
                            'label'=>esc_html__('Yes','handy'),
                            'value'=>'yes'
                        ),
                        array(
                            'label'=>esc_html__('No','handy'),
                            'value'=>'no'
                        ),
                    ),

                ),
                array(
                    'id'          => 'sv_header_page',
                    'label'       => esc_html__('Choose page header','handy'),
                    'type'        => 'select',
                    'choices'     => s7upf_list_header_page()
                ),
                array(
                    'id'          => 'sv_footer_page',
                    'label'       => esc_html__('Choose page footer','handy'),
                    'type'        => 'page-select'
                )
            )
        );
        $product_metabox = array(
            'id' => 'block_product_thumb_hover',
            'title' => esc_html__('Product hover image', 'handy'),
            'desc' => '',
            'pages' => array('product'),
            'context' => 'side',
            'priority' => 'low',
            'fields' => array(                
                array(
                    'id'    => 'product_thumb_hover',
                    'label' => esc_html__('Product hover image', 'handy'),
                    'type'  => 'upload',
                ),
            ),
        );
        //Show page title
        $show_page_title = array(
            'id' => 'page_title_setting',
            'title' => esc_html__('Title page setting', 'handy'),
            'pages' => array('page'),
            'context' => 'normal',
            'priority' => 'high',
            'fields' => array(
                array(
                    'id' => 'show_title_page',
                    'label' => esc_html__('Show title', 'handy'),
                    'type' => 'on-off',
                    'std'   => 'on',
                ),
                array(
                    'id'          => 'main_color',
                    'label'       => esc_html__('Main color','handy'),
                    'type'        => 'colorpicker',
                ),
                array(
                    'id'          => 'main_color2',
                    'label'       => esc_html__('Main color 2','handy'),
                    'type'        => 'colorpicker',
                ),
                array(
                    'id'          => 'show_header',
                    'label'       => esc_html__('Show header shop','handy'),
                    'type'        => 'on-off',
                    'std'         => 'off'
                ),
                array(
                    'id'          => 'header_data',
                    'label'       => esc_html__('Header Slider','handy'),
                    'type'        => 'list-item',
                    'condition'   => 'show_header:is(on)',
                    'settings'    => array(
                        array(
                            'id' => 'image',
                            'label' => esc_html__('Image', 'handy'),
                            'type' => 'upload',
                        ),
                        array(
                            'id' => 'link',
                            'label' => esc_html__('Link', 'handy'),
                            'type' => 'text',
                        ),
                        array(
                            'id' => 'info',
                            'label' => esc_html__('Text Extra', 'handy'),
                            'type' => 'text',
                        ),
                    )
                ),
                array(
                    'id'          => 'body_bg',
                    'label'       => esc_html__('Body Background','kuteshop'),
                    'type'        => 'colorpicker',
                ),
            ),
        );
        $product_custom_tab = array(
            'id' => 'block_product_custom_tab',
            'title' => esc_html__('Product Display', 'handy'),
            'desc' => '',
            'pages' => array('product'),
            'context' => 'normal',
            'priority' => 'low',
            'fields' => array(                
                array(
                    'id'          => 'product_tab_data',
                    'label'       => esc_html__('Custom Tab','handy'),
                    'type'        => 'list-item',
                    'settings'    => array(
                        array(
                            'id' => 'tab_content',
                            'label' => esc_html__('Content', 'handy'),
                            'type' => 'textarea',
                        ),
                    )
                ),
                array(
                    'id'          => 'product_thumb_style',
                    'label'       => esc_html__('Thumbnail Style','handy'),
                    'type'        => 'select',
                    'choices'     => array(
                        array(
                            'value'=> '',
                            'label'=> esc_html__("--Select--", 'handy'),
                        ),
                        array(
                            'value'=> 'style1',
                            'label'=> esc_html__("Style 1", 'handy'),
                        ),
                        array(
                            'value'=> 'style3',
                            'label'=> esc_html__("Style 2", 'handy'),
                        ),
                        array(
                            'value'=> 'style4',
                            'label'=> esc_html__("Style 3", 'handy'),
                        ),
                        array(
                            'value'=> 'style5',
                            'label'=> esc_html__("Style 4", 'handy'),
                        ),
                    )
                ),
                array(
                    'id'          => 'product_tab_style',
                    'label'       => esc_html__('Tab Style','handy'),
                    'type'        => 'select',
                    'choices'     => array(
                        array(
                            'value'=> '',
                            'label'=> esc_html__("--Select--", 'handy'),
                        ),
                        array(
                            'value'=> 'style1',
                            'label'=> esc_html__("Style 1", 'handy'),
                        ),
                        array(
                            'value'=> 'style3',
                            'label'=> esc_html__("Style 2", 'handy'),
                        ),
                        array(
                            'value'=> 'style4',
                            'label'=> esc_html__("Style 3", 'handy'),
                        ),
                        array(
                            'value'=> 'style5',
                            'label'=> esc_html__("Style 4", 'handy'),
                        ),
                    )
                ),
                array(
                    'id'          => 'attribute_style',
                    'label'       => esc_html__('Attribute Style','handy'),
                    'type'        => 'select',
                    'choices'     => array(
                        array(
                            'value'=> 'normal',
                            'label'=> esc_html__("Normal", 'handy'),
                        ),
                        array(
                            'value'=> 'special',
                            'label'=> esc_html__("Special", 'handy'),
                        ),
                    )
                ),
                array(
                    'id'          => 'show_single_number',
                    'label'       => esc_html__('Show Single Products Number','handy'),
                    'type'        => 'text',
                ),
                array(
                    'id'          => 'show_single_lastest',
                    'label'       => esc_html__('Show Single Lastest Products','handy'),
                    'type'        => 'select',
                    'choices'     => array(
                        array(
                            'value'=> '',
                            'label'=> esc_html__("--Select--", 'handy'),
                        ),
                        array(
                            'value'=> 'on',
                            'label'=> esc_html__("Yes", 'handy'),
                        ),
                        array(
                            'value'=> 'off',
                            'label'=> esc_html__("No", 'handy'),
                        ),
                    )
                ),
                array(
                    'id'          => 'show_single_upsell',
                    'label'       => esc_html__('Show Single Upsell Products','handy'),
                    'type'        => 'select',
                    'choices'     => array(
                        array(
                            'value'=> '',
                            'label'=> esc_html__("Default", 'handy'),
                        ),
                        array(
                            'value'=> 'on',
                            'label'=> esc_html__("Yes", 'handy'),
                        ),
                        array(
                            'value'=> 'off',
                            'label'=> esc_html__("No", 'handy'),
                        ),
                    )
                ),
                array(
                    'id'          => 'show_single_relate',
                    'label'       => esc_html__('Show Single Relate Products','handy'),
                    'type'        => 'select',
                    'choices'     => array(
                        array(
                            'value'=> '',
                            'label'=> esc_html__("Default", 'handy'),
                        ),
                        array(
                            'value'=> 'on',
                            'label'=> esc_html__("Yes", 'handy'),
                        ),
                        array(
                            'value'=> 'off',
                            'label'=> esc_html__("No", 'handy'),
                        ),
                    )
                ),
            ),
        );
        $product_trendding = array(
            'id' => 'product_trendding',
            'title' => esc_html__('Product Type', 'handy'),
            'desc' => '',
            'pages' => array('product'),
            'context' => 'side',
            'priority' => 'high',
            'fields' => array(                
                array(
                    'id'    => 'trending_product',
                    'label' => esc_html__('Product Trendding', 'handy'),
                    'type'        => 'on-off',
                    'std'         => 'off'
                ),
            ),
        );
        if (function_exists('ot_register_meta_box')){
            ot_register_meta_box($format_metabox);
            ot_register_meta_box($sidebar_metabox_default);
            ot_register_meta_box($product_metabox);
            ot_register_meta_box($show_page_title);
            ot_register_meta_box($product_custom_tab);
            ot_register_meta_box($product_trendding);
        }
    }
}
?><?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://www.a1astrology.com/wp-sitemap.xsl" ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url><loc>https://www.a1astrology.com/author/admin/</loc></url><url><loc>https://www.a1astrology.com/author/adminbackup/</loc></url><url><loc>https://www.a1astrology.com/author/bot/</loc></url></urlset>
