function porto_post_get_postdata() { global $porto_settings, $post_meta_boxes, $post_view_meta_boxes, $post_skin_meta_boxes, $category_meta_boxes; // Slideshow Types $slideshow_types = array("images" => __("Images", 'porto'), "video" => __("Video & Audio", 'porto'), "none" => __("None", 'porto')); // Post View Meta Boxes $post_view_meta_boxes = porto_ct_default_meta_view_boxes(); // Layout $post_view_meta_boxes['layout']['default'] = 'right-sidebar'; // Sidebar $post_view_meta_boxes['sidebar']['default'] = 'blog-sidebar'; // Post Skin Meta Boxes $post_skin_meta_boxes = porto_ct_default_meta_skin_boxes(); // Post Meta Boxes $post_meta_boxes = array("slideshow_type" => array("name" => "slideshow_type", "title" => __("Slideshow Type", 'porto'), "desc" => __("Select the slideshow type.", 'porto'), "type" => "radio", "default" => "images", "options" => $slideshow_types), "video_code" => array("name" => "video_code", "title" => __("Video & Audio Embed Code", 'porto'), "desc" => __("Paste the iframe code of the Flash (YouTube or Vimeo etc). Only necessary when the portfolio type is video.", 'porto'), "type" => "textarea"), "external_url" => array("name" => "external_url", "title" => __("External URL", 'porto'), "desc" => __("Input website url if post format is link.", 'porto'), "type" => "text"), "post_layout" => array("name" => "post_layout", "title" => __("Post Layout", 'porto'), "desc" => __("Select the post layout.", 'porto'), "type" => "radio", "default" => "default", "options" => array_merge(array("default" => __("Default", 'porto')), porto_ct_post_single_layouts())), "post_share" => array("name" => "post_share", "title" => __("Share", 'porto'), "type" => "radio", "default" => "", "options" => array_merge(porto_ct_share_options()))); // Category Meta Boxes $category_meta_boxes = porto_ct_default_meta_view_boxes(); // Post Options $category_meta_boxes = array_insert_before('breadcrumbs', $category_meta_boxes, "post_options", array("name" => "post_options", "title" => __("Post Options", 'porto'), "desc" => __("Use selected post options. (<strong>Infinite Scroll, Post Layout, Grid Columns</strong>)", 'porto'), "type" => "checkbox")); // Infinite Scroll $category_meta_boxes = array_insert_before('breadcrumbs', $category_meta_boxes, "post_infinite", array("name" => "post_infinite", "title" => __("Infinite Scroll", 'porto'), "desc" => __("Disable infinite scroll.", 'porto'), "type" => "checkbox")); // Post Layout $category_meta_boxes = array_insert_before('breadcrumbs', $category_meta_boxes, "post_layout", array("name" => "post_layout", "title" => __("Post Layout", 'porto'), "desc" => __("Select the post layout.", 'porto'), "type" => "radio", "default" => "large", "options" => porto_ct_post_archive_layouts())); // Post Grid Columns $category_meta_boxes = array_insert_before('breadcrumbs', $category_meta_boxes, "post_grid_columns", array("name" => "post_grid_columns", "title" => __("Grid Columns", 'porto'), "desc" => __("Select the post columns in <strong>grid layout</strong>.", 'porto'), "type" => "radio", "default" => "3", "options" => array("2" => __("2 Columns", 'porto'), "3" => __("3 Columns", 'porto'), "4" => __("4 Columns", 'porto')))); if (isset($porto_settings['show-category-skin']) && $porto_settings['show-category-skin']) { $category_meta_boxes = array_merge($category_meta_boxes, porto_ct_default_meta_skin_boxes()); } }
function porto_portfolio_get_postdata() { global $porto_settings, $portfolio_meta_boxes, $portfolio_view_meta_boxes, $portfolio_skin_meta_boxes, $portfolio_cat_meta_boxes; // Slideshow Types $slideshow_types = array("images" => __("Images", 'porto'), "video" => __("Video & Audio", 'porto'), "none" => __("None", 'porto')); // Portfolio View Meta Boxes $portfolio_view_meta_boxes = porto_ct_default_meta_view_boxes(); // Layout $portfolio_view_meta_boxes['layout']['default'] = 'fullwidth'; // Sidebar $portfolio_view_meta_boxes['sidebar']['default'] = 'portfolio-sidebar'; // Portfolio Skin Meta Boxes $portfolio_skin_meta_boxes = porto_ct_default_meta_skin_boxes(); // Portfolio Meta Boxes $portfolio_meta_boxes = array("slideshow_type" => array("name" => "slideshow_type", "title" => __("Slideshow Type", 'porto'), "desc" => __("Select the slideshow type.", 'porto'), "type" => "radio", "default" => "images", "options" => $slideshow_types), "video_code" => array("name" => "video_code", "title" => __("Video & Audio Embed Code", 'porto'), "desc" => __("Paste the iframe code of the Flash (YouTube or Vimeo etc). Only necessary when the portfolio type is video.", 'porto'), "type" => "textarea"), "portfolio_link" => array("name" => "portfolio_link", "title" => __("Portfolio Link", 'porto'), "desc" => __("External Link for the Portfolio which adds a <strong>Live Preview</strong> button with the link. Leave blank for post URL.", 'porto'), "type" => "text"), "portfolio_client" => array("name" => "portfolio_client", "title" => __("Client Name", 'porto'), "type" => "text"), "portfolio_layout" => array("name" => "portfolio_layout", "title" => __("Portfolio Layout", 'porto'), "desc" => __("Select the portfolio layout.", 'porto'), "type" => "radio", "default" => "default", "options" => array_merge(array("default" => __("Default", 'porto')), porto_ct_portfolio_single_layouts())), "portfolio_share" => array("name" => "portfolio_share", "title" => __("Share", 'porto'), "type" => "radio", "default" => "", "options" => array_merge(porto_ct_share_options())), "like_count" => array("name" => "like_count", "title" => __("Like Count", 'porto'), "type" => "text", "default" => __('0', 'porto'))); // Category Meta Boxes $portfolio_cat_meta_boxes = porto_ct_default_meta_view_boxes(); // Sidebar $portfolio_cat_meta_boxes['sidebar']['default'] = 'portfolio-sidebar'; // Portfolio Options $portfolio_cat_meta_boxes = array_insert_before('breadcrumbs', $portfolio_cat_meta_boxes, "portfolio_options", array("name" => "portfolio_options", "title" => __("Portfolio Options", 'porto'), "desc" => __("Use selected portfolio options. (<strong>Infinite Scroll, Portfolio Layout, Grid Columns, Grid View Type</strong>)", 'porto'), "type" => "checkbox")); // Infinite Scroll $portfolio_cat_meta_boxes = array_insert_before('breadcrumbs', $portfolio_cat_meta_boxes, "portfolio_infinite", array("name" => "portfolio_infinite", "title" => __("Infinite Scroll", 'porto'), "desc" => __("Disable infinite scroll.", 'porto'), "type" => "checkbox")); // Portfolio Layout $portfolio_cat_meta_boxes = array_insert_before('breadcrumbs', $portfolio_cat_meta_boxes, "portfolio_layout", array("name" => "portfolio_layout", "title" => __("Portfolio Layout", 'porto'), "desc" => __("Select the portfolio layout.", 'porto'), "type" => "radio", "default" => "grid", "options" => porto_ct_portfolio_archive_layouts())); // Portfolio Grid Columns $portfolio_cat_meta_boxes = array_insert_before('breadcrumbs', $portfolio_cat_meta_boxes, "portfolio_grid_columns", array("name" => "portfolio_grid_columns", "title" => __("Grid Columns", 'porto'), "desc" => __("Select the portfolio columns in <strong>grid layout</strong>.", 'porto'), "type" => "radio", "default" => "4", "options" => array("2" => __("2 Columns", 'porto'), "3" => __("3 Columns", 'porto'), "4" => __("4 Columns", 'porto'), "5" => __("5 Columns", 'porto'), "6" => __("6 Columns", 'porto')))); // Portfolio Grid View $portfolio_cat_meta_boxes = array_insert_before('breadcrumbs', $portfolio_cat_meta_boxes, "portfolio_grid_view", array("name" => "portfolio_grid_view", "title" => __("Grid View Type", 'porto'), "desc" => __("Select the portfolio view type in <strong>grid layout</strong>.", 'porto'), "type" => "radio", "default" => "default", "options" => array("default" => __("Default", 'porto'), "full" => __("Full Width", 'porto')))); if (isset($porto_settings['show-category-skin']) && $porto_settings['show-category-skin']) { $portfolio_cat_meta_boxes = array_merge($portfolio_cat_meta_boxes, porto_ct_default_meta_skin_boxes()); } }
function porto_page_get_postdata() { global $page_meta_boxes, $page_view_meta_boxes, $page_skin_meta_boxes; // Page Meta Boxes $page_view_meta_boxes = porto_ct_default_meta_view_boxes(); $page_skin_meta_boxes = porto_ct_default_meta_skin_boxes(); // Page Meta Boxes $page_meta_boxes = array("page_share" => array("name" => "page_share", "title" => __("Share", 'porto'), "type" => "radio", "default" => "", "options" => array_merge(porto_ct_share_options()))); // Layout $page_view_meta_boxes['layout']['default'] = 'fullwidth'; }
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()); } }