Beispiel #1
0
function porto_product_get_postdata()
{
    global $porto_settings, $product_meta_boxes, $product_view_meta_boxes, $product_skin_meta_boxes, $product_cat_meta_boxes;
    $product_columns = porto_ct_product_columns();
    $addlinks_pos = porto_ct_category_addlinks_pos();
    // Product View Meta Boxes
    $product_view_meta_boxes = porto_ct_default_meta_view_boxes();
    // Sidebar
    $product_view_meta_boxes['sidebar']['default'] = 'woo-product-sidebar';
    // Product Skin Meta Boxes
    $product_skin_meta_boxes = porto_ct_default_meta_skin_boxes();
    // Product Meta Boxes
    $product_meta_boxes = array("custom_tab_title1" => array("name" => "custom_tab_title1", "title" => __("Custom Tab Title 1", 'porto'), "desc" => __("Input the custom tab title.", 'porto'), "type" => "text"), "custom_tab_content1" => array("name" => "custom_tab_content1", "title" => __("Custom Tab Content 1", 'porto'), "desc" => __("Input the custom tab content.", 'porto'), "type" => "editor"), "custom_tab_title2" => array("name" => "custom_tab_title2", "title" => __("Custom Tab Title 2", 'porto'), "desc" => __("Input the custom tab title.", 'porto'), "type" => "text"), "custom_tab_content2" => array("name" => "custom_tab_content2", "title" => __("Custom Tab Content 2", 'porto'), "desc" => __("Input the custom tab content.", 'porto'), "type" => "editor"));
    // Category Meta Boxes
    $product_cat_meta_boxes = porto_ct_default_meta_view_boxes();
    // Sidebar
    $product_cat_meta_boxes['sidebar']['default'] = 'woo-category-sidebar';
    // Columns
    $product_cat_meta_boxes = array_insert_after('sidebar', $product_cat_meta_boxes, "product_cols", array("name" => "product_cols", "title" => __("Product Columns", 'porto'), "type" => "select", "options" => $product_columns));
    $product_cat_meta_boxes = array_insert_after('product_cols', $product_cat_meta_boxes, "addlinks_pos", array("name" => "addlinks_pos", "title" => __("Add Links Position", 'porto'), "desc" => __('Select position of add to cart, add to wishlist, quickview.', 'porto'), "type" => "select", "options" => $addlinks_pos));
    // Category Image
    $product_cat_meta_boxes = array_insert_after('content_inner_bottom', $product_cat_meta_boxes, "category_image", array("name" => "category_image", "title" => __("Category Image", 'porto'), "type" => "upload"));
    if (isset($porto_settings['show-category-skin']) && $porto_settings['show-category-skin']) {
        $product_cat_meta_boxes = array_merge($product_cat_meta_boxes, porto_ct_default_meta_skin_boxes());
    }
}
Beispiel #2
0
function porto_product_get_postdata()
{
    global $porto_settings, $product_meta_boxes, $product_view_meta_boxes, $product_skin_meta_boxes, $product_cat_meta_boxes;
    $view_mode = porto_ct_category_view_mode();
    $product_columns = porto_ct_product_columns();
    $addlinks_pos = porto_ct_category_addlinks_pos();
    // Product View Meta Boxes
    $product_view_meta_boxes = porto_ct_default_meta_view_boxes();
    // Sidebar
    $product_view_meta_boxes['sidebar']['default'] = 'woo-product-sidebar';
    // Product Skin Meta Boxes
    $product_skin_meta_boxes = porto_ct_default_meta_skin_boxes();
    $custom_tabs_count = isset($porto_settings['product-custom-tabs-count']) ? $porto_settings['product-custom-tabs-count'] : '2';
    $custom_tabs = array();
    if ($custom_tabs_count) {
        for ($i = 0; $i < $custom_tabs_count; $i++) {
            $index = $i + 1;
            // Custom Tab Title
            $custom_tabs['custom_tab_title' . $index] = array("name" => "custom_tab_title" . $index, "title" => sprintf(__('Custom Tab Title %d', 'porto'), $index), "desc" => __("Input the custom tab title.", 'porto'), "type" => "text");
            // Content Tab Content
            $custom_tabs['custom_tab_content' . $index] = array("name" => "custom_tab_content" . $index, "title" => sprintf(__('Custom Tab Content %d', 'porto'), $index), "desc" => __("Input the custom tab content.", 'porto'), "type" => "editor");
        }
    }
    // Product Meta Boxes
    $product_meta_boxes = array_merge($custom_tabs, array("product_share" => array("name" => "product_share", "title" => __("Share", 'porto'), "type" => "radio", "default" => "", "options" => array_merge(porto_ct_share_options())), "product_more_link" => array("name" => "product_more_link", "title" => __("Read More Link in Catalog Mode", 'porto'), "type" => "text")));
    // Category Meta Boxes
    $product_cat_meta_boxes = porto_ct_default_meta_view_boxes();
    // Sidebar
    $product_cat_meta_boxes['sidebar']['default'] = 'woo-category-sidebar';
    // View Mode
    $product_cat_meta_boxes = array_insert_after('sidebar', $product_cat_meta_boxes, "view_mode", array("name" => "view_mode", "title" => __("View Mode", 'porto'), "type" => "radio", "options" => $view_mode));
    // Columns
    $product_cat_meta_boxes = array_insert_after('view_mode', $product_cat_meta_boxes, "product_cols", array("name" => "product_cols", "title" => __("Product Columns", 'porto'), "type" => "select", "options" => $product_columns));
    $product_cat_meta_boxes = array_insert_after('product_cols', $product_cat_meta_boxes, "addlinks_pos", array("name" => "addlinks_pos", "title" => __("Add Links Position", 'porto'), "desc" => __('Select position of add to cart, add to wishlist, quickview.', 'porto'), "type" => "select", "options" => $addlinks_pos));
    // Category Image
    $product_cat_meta_boxes = array_insert_after('addlinks_pos', $product_cat_meta_boxes, "category_image", array("name" => "category_image", "title" => __("Category Image", 'porto'), "type" => "upload"));
    if (isset($porto_settings['show-category-skin']) && $porto_settings['show-category-skin']) {
        $product_cat_meta_boxes = array_merge($product_cat_meta_boxes, porto_ct_default_meta_skin_boxes());
    }
}