Пример #1
0
    function vce_modules_metabox($object, $box)
    {
        $vce_meta = vce_get_page_meta($object->ID);
        $data = array('layouts' => vce_get_main_layouts(), 'starter_layouts' => vce_get_main_layouts(false, true), 'cats' => get_categories(array('hide_empty' => false, 'number' => 0)), 'order' => vce_get_post_order_opts(), 'time' => vce_get_time_diff_opts(), 'actions' => vce_get_module_actions(), 'paginations' => vce_get_pagination_layouts());
        $module_def = array('layout' => 'c', 'title' => '', 'title_link' => '', 'limit' => 4, 'manual' => array(), 'cat' => array(), 'time' => 0, 'timeto' => 0, 'order' => 'date', 'top_layout' => 0, 'top_limit' => 2, 'one_column' => 0, 'action' => 0, 'pagination' => 'load-more', 'action_link_text' => 'View all', 'action_link_url' => 'http://', 'cat_child' => 0, 'tag' => '', 'type' => 'posts', 'content' => '', 'autoplay' => '', 'exclude' => 0);
        //print_r($vce_meta['modules']);
        ?>

		<ul id="vce-modules-wrap">
			<?php 
        if (!empty($vce_meta['modules'])) {
            ?>
			<?php 
            foreach ($vce_meta['modules'] as $i => $module) {
                $module = wp_parse_args((array) $module, $module_def);
                ?>
			<li data-module="<?php 
                echo $i;
                ?>
">
				<span class="module-title"><?php 
                echo $module['title'];
                ?>
</span> <span class="actions"> <a href="#" class="vce-edit-module">Edit</a> | <a href="#" class="vce-remove-module">Remove</a></span>
				<?php 
                if ($module['type'] == 'posts') {
                    vce_generate_module_field($module, $i, $data);
                } else {
                    vce_generate_blank_module_field($module, $i, $data);
                }
                ?>
			</li>
			<?php 
            }
            ?>
			<?php 
        }
        ?>
		</ul>

		<p><a id="vce-add-module" href="javascript:void(0);" class="button-secondary"><?php 
        _e('Add posts module', THEME_SLUG);
        ?>
</a> <a id="vce-add-module-blank" href="javascript:void(0);" class="button-secondary"><?php 
        _e('Add html/text module', THEME_SLUG);
        ?>
</a></p>

		<div id="vce-modules-count" data-count="<?php 
        echo count($vce_meta['modules']);
        ?>
"></div>

		<?php 
        vce_generate_module_field($module_def, false, $data);
        ?>
		<?php 
        vce_generate_blank_module_field($module_def, false, $data);
        ?>

	<?php 
    }
Пример #2
0
/* Single Post */
Redux::setSection($opt_name, array('icon' => 'el-icon-pencil', 'title' => __('Single Post', THEME_SLUG), 'desc' => __('Manage settings for single post template', THEME_SLUG), 'fields' => array(array('id' => 'single_layout', 'type' => 'image_select', 'title' => __('Single post layout', THEME_SLUG), 'subtitle' => __('Choose default layout for your single posts', THEME_SLUG), 'desc' => __('Note: You can override this option for each particular post', THEME_SLUG), 'options' => vce_get_single_layout_opts(), 'default' => 'classic'), array('id' => 'single_content_width', 'type' => 'slider', 'title' => __('Content width (with sidebar)', THEME_SLUG), 'subtitle' => __('Choose post content width for posts which have sidebar included', THEME_SLUG), 'desc' => __('Note: Value is in px.', THEME_SLUG), 'min' => 600, 'max' => 760, 'step' => 10, 'default' => 600), array('id' => 'single_content_width_full', 'type' => 'slider', 'title' => __('Content width (without sidebar)', THEME_SLUG), 'subtitle' => __('Choose post content width for posts which don\'t have sidebar included (full width posts)', THEME_SLUG), 'desc' => __('Note: Value is in px.', THEME_SLUG), 'min' => 600, 'max' => 1090, 'step' => 10, 'default' => 600), array('id' => 'single_use_sidebar', 'type' => 'image_select', 'title' => __('Sidebar layout', THEME_SLUG), 'subtitle' => __('Choose default sidebar layout for single posts', THEME_SLUG), 'desc' => __('Note: You can override this option for each particular post', THEME_SLUG), 'options' => vce_get_sidebar_layouts(), 'default' => 'right'), array('id' => 'single_sidebar', 'type' => 'select', 'title' => __('Post standard sidebar', THEME_SLUG), 'subtitle' => __('Choose single post standard sidebar', THEME_SLUG), 'options' => vce_get_sidebars_list(), 'default' => 'vce_default_sidebar', 'required' => array('single_use_sidebar', '!=', 'none')), array('id' => 'single_sticky_sidebar', 'type' => 'select', 'title' => __('Post sticky sidebar', THEME_SLUG), 'subtitle' => __('Choose single post sticky sidebar', THEME_SLUG), 'options' => vce_get_sidebars_list(), 'default' => 'vce_default_sticky_sidebar', 'required' => array('single_use_sidebar', '!=', 'none')), array('id' => 'single_meta', 'type' => 'sortable', 'mode' => 'checkbox', 'title' => __('Meta data', THEME_SLUG), 'subtitle' => __('Check which meta data to show for single post', THEME_SLUG), 'options' => array('date' => __('Date/time', THEME_SLUG), 'author' => __('Author', THEME_SLUG), 'comments' => __('Comments', THEME_SLUG), 'views' => __('Views', THEME_SLUG), 'rtime' => __('Reading time', THEME_SLUG)), 'default' => array('date' => 1, 'author' => 1, 'comments' => 1, 'views' => 1, 'rtime' => 0)), array('id' => 'show_cat', 'type' => 'switch', 'title' => __('Display category link', THEME_SLUG), 'subtitle' => __('Choose if you want to display category link', THEME_SLUG), 'default' => true), array('id' => 'show_fimg', 'type' => 'switch', 'title' => __('Display featured image', THEME_SLUG), 'subtitle' => __('Choose if you want to display featured image', THEME_SLUG), 'default' => true), array('id' => 'show_fimg_cap', 'type' => 'switch', 'title' => __('Display featured image caption', THEME_SLUG), 'subtitle' => __('Choose if you want to display caption/description on featured image', THEME_SLUG), 'default' => false, 'required' => array('show_fimg', '=', true)), array('id' => 'show_author_img', 'type' => 'switch', 'title' => __('Display author image', THEME_SLUG), 'subtitle' => __('Choose if you want to display author image below featured image', THEME_SLUG), 'default' => true), array('id' => 'show_headline', 'type' => 'switch', 'title' => __('Display headline (exceprt)', THEME_SLUG), 'subtitle' => __('Choose if you want to display headline (post exceprt) before main post content', THEME_SLUG), 'default' => true), array('id' => 'show_tags', 'type' => 'switch', 'title' => __('Display tags', THEME_SLUG), 'subtitle' => __('Choose if you want to display tags below post content', THEME_SLUG), 'default' => true), array('id' => 'show_share', 'type' => 'switch', 'title' => __('Display share buttons', THEME_SLUG), 'subtitle' => __('Choose if you want to display social share buttons', THEME_SLUG), 'default' => true), array('id' => 'social_share', 'type' => 'sortable', 'mode' => 'checkbox', 'title' => __('Social share buttons', THEME_SLUG), 'subtitle' => __('Check which social networks you want to use for sharing your posts', THEME_SLUG), 'options' => array('facebook' => __('Facebook', THEME_SLUG), 'twitter' => __('Twitter', THEME_SLUG), 'gplus' => __('Google+', THEME_SLUG), 'pinterest' => __('Pinterest', THEME_SLUG), 'linkedin' => __('LinkedIN', THEME_SLUG)), 'default' => array('facebook' => 1, 'twitter' => 1, 'gplus' => 1, 'pinterest' => 1, 'linkedin' => 1), 'required' => array('show_share', '=', true)), array('id' => 'show_prev_next', 'type' => 'switch', 'title' => __('Display previous/next post links', THEME_SLUG), 'subtitle' => __('Choose if you want to display previous and next post links for current post.', THEME_SLUG), 'default' => true), array('id' => 'prev_next_cat', 'type' => 'checkbox', 'title' => __('Previous/next links to posts from same category?', THEME_SLUG), 'subtitle' => __('Check if you want previous and next post links to display only posts from same category.', THEME_SLUG), 'default' => false, 'required' => array('show_prev_next', '=', '1')), array('id' => 'show_author_box', 'type' => 'switch', 'title' => __('Display author box', THEME_SLUG), 'subtitle' => __('Choose if you want to display "about author" area below post content.', THEME_SLUG), 'default' => true), array('id' => 'author_box_position', 'type' => 'radio', 'title' => __('Author box position', THEME_SLUG), 'subtitle' => __('Choose where to display author box', THEME_SLUG), 'options' => array('up' => __('Above related posts', THEME_SLUG), 'down' => __('Below related posts', THEME_SLUG)), 'default' => 'down', 'required' => array('show_author_box', '=', true)), array('id' => 'comments_position', 'type' => 'switch', 'title' => __('Comment form on top', THEME_SLUG), 'subtitle' => __('Choose if you want to display the comment form before comments', THEME_SLUG), 'default' => false), array('id' => 'section_related', 'type' => 'section', 'title' => __('Related Posts', THEME_SLUG), 'subtitle' => __('Manage options for related posts area', THEME_SLUG), 'indent' => false), array('id' => 'show_related', 'type' => 'switch', 'title' => __('Display "related" posts box', THEME_SLUG), 'subtitle' => __('Choose if you want to display additional area with related posts below post content', THEME_SLUG), 'default' => true), array('id' => 'related_layout', 'type' => 'image_select', 'title' => __('Related area posts layout', THEME_SLUG), 'default' => 'd', 'options' => vce_get_main_layouts(), 'required' => array('show_related', '=', true)), array('id' => 'related_limit', 'type' => 'text', 'class' => 'small-text', 'title' => __('Related area posts number limit', THEME_SLUG), 'default' => '6', 'validate' => 'numeric', 'required' => array('show_related', '=', true)), array('id' => 'related_type', 'type' => 'radio', 'title' => __('Related area chooses from', THEME_SLUG), 'options' => array('cat' => __('Posts located in same category', THEME_SLUG), 'tag' => __('Posts tagged with at least one same tag', THEME_SLUG), 'cat_or_tag' => __('Posts located in same category OR tagged with same tag', THEME_SLUG), 'cat_and_tag' => __('Posts located in same category AND tagged with same tag', THEME_SLUG), 'author' => __('Posts by same author', THEME_SLUG), '0' => __('All posts', THEME_SLUG)), 'default' => 'cat', 'required' => array('show_related', '=', true)), array('id' => 'related_order', 'type' => 'radio', 'title' => __('Related posts are ordered by', THEME_SLUG), 'options' => vce_get_post_order_opts(), 'default' => 'date', 'required' => array('show_related', '=', true)), array('id' => 'related_time', 'type' => 'radio', 'title' => __('Related posts are not older than', THEME_SLUG), 'options' => vce_get_time_diff_opts('from'), 'default' => '0', 'required' => array('show_related', '=', true)), array('id' => 'section_paginated', 'type' => 'section', 'title' => __('Paginated/Multipage Posts', THEME_SLUG), 'subtitle' => __('These are options which apply to your posts split with "&lt;!--nextpage--&gt; tag"', THEME_SLUG), 'indent' => false), array('id' => 'show_paginated', 'type' => 'radio', 'title' => __('Display navigation for paginated posts', THEME_SLUG), 'subtitle' => __('Choose where to display navigation for paginated/multi-page posts', THEME_SLUG), 'options' => array('above' => __('Above post content', THEME_SLUG), 'below' => __('Below post content', THEME_SLUG)), 'default' => 'above'), array('id' => 'show_paginated_fimg', 'type' => 'switch', 'title' => __('Display featured image on first page of paginated post', THEME_SLUG), 'subtitle' => __('Check if you want to display featured image/author image on the first page of paginated/multi page posts', THEME_SLUG), 'default' => false), array('id' => 'show_paginated_headline', 'type' => 'switch', 'title' => __('Display headline/excerpt on first page of paginated post', THEME_SLUG), 'subtitle' => __('Check if you want to display headline/excerp on the first page of paginated/multi page posts', THEME_SLUG), 'default' => false))));
/* Page */
Redux::setSection($opt_name, array('icon' => 'el-icon-file-edit', 'title' => __('Page Templates', THEME_SLUG), 'desc' => __('Manage default settings for your pages (page templates)', THEME_SLUG), 'fields' => array(array('id' => 'page_content_width', 'type' => 'slider', 'title' => __('Page content width (with sidebar)', THEME_SLUG), 'subtitle' => __('Choose page content width for pages which have sidebar included', THEME_SLUG), 'desc' => __('Note: Value is in px.', THEME_SLUG), 'min' => 600, 'max' => 760, 'step' => 10, 'default' => 600), array('id' => 'page_content_width_full', 'type' => 'slider', 'title' => __('Page content width (without sidebar)', THEME_SLUG), 'subtitle' => __('Choose page content width for pages which don\'t have sidebar included (full width pages)', THEME_SLUG), 'desc' => __('Note: Value is in px.', THEME_SLUG), 'min' => 600, 'max' => 1090, 'step' => 10, 'default' => 600), array('id' => 'page_use_sidebar', 'type' => 'image_select', 'title' => __('Sidebar layout', THEME_SLUG), 'subtitle' => __('Choose default sidebar layout for pages', THEME_SLUG), 'desc' => __('Note: You can override this option for each particular page', THEME_SLUG), 'options' => vce_get_sidebar_layouts(), 'default' => 'right'), array('id' => 'page_sidebar', 'type' => 'select', 'title' => __('Page standard sidebar', THEME_SLUG), 'subtitle' => __('Choose page standard sidebar', THEME_SLUG), 'options' => vce_get_sidebars_list(), 'default' => 'vce_default_sidebar', 'required' => array('page_use_sidebar', '!=', 'none')), array('id' => 'page_sticky_sidebar', 'type' => 'select', 'title' => __('Page sticky sidebar', THEME_SLUG), 'subtitle' => __('Choose page sticky sidebar', THEME_SLUG), 'options' => vce_get_sidebars_list(), 'default' => 'vce_default_sticky_sidebar', 'required' => array('page_use_sidebar', '!=', 'none')), array('id' => 'page_show_fimg', 'type' => 'switch', 'title' => __('Display featured image', THEME_SLUG), 'subtitle' => __('Choose if you want to display featured image on single pages', THEME_SLUG), 'default' => true), array('id' => 'page_show_fimg_cap', 'type' => 'switch', 'title' => __('Display featured image caption', THEME_SLUG), 'subtitle' => __('Choose if you want to display caption/description on featured image', THEME_SLUG), 'default' => false, 'required' => array('page_show_fimg', '=', true)), array('id' => 'page_show_comments', 'type' => 'switch', 'title' => __('Display comments', THEME_SLUG), 'subtitle' => __('Choose if you want to display comments on single pages', THEME_SLUG), 'description' => __('Note: This is just an option to quickly hide the comments on pages. If you want to allow/disallow comments properly, you need to do it in "Discussion" box for each particular page.', THEME_SLUG), 'default' => true), array('id' => 'page_show_share', 'type' => 'switch', 'title' => __('Display share buttons', THEME_SLUG), 'subtitle' => __('Choose if you want to display social share buttons', THEME_SLUG), 'default' => false), array('id' => 'page_social_share', 'type' => 'sortable', 'mode' => 'checkbox', 'title' => __('Social share buttons', THEME_SLUG), 'subtitle' => __('Check which social networks you want to use for sharing your pages', THEME_SLUG), 'options' => array('facebook' => __('Facebook', THEME_SLUG), 'twitter' => __('Twitter', THEME_SLUG), 'gplus' => __('Google+', THEME_SLUG), 'pinterest' => __('Pinterest', THEME_SLUG), 'linkedin' => __('LinkedIN', THEME_SLUG)), 'default' => array('facebook' => 1, 'twitter' => 1, 'gplus' => 1, 'pinterest' => 1, 'linkedin' => 1), 'required' => array('page_show_share', '=', true)))));
/* Categories */
Redux::setSection($opt_name, array('icon' => 'el-icon-folder', 'title' => __('Category Templates', THEME_SLUG), 'desc' => __('Manage settings for category templates. Note: these are global category settings, you can optionally modify these settings for each category.', THEME_SLUG), 'fields' => array(array('id' => 'category_fa', 'type' => 'switch', 'title' => __('Display featured area/slider', THEME_SLUG), 'subtitle' => __('Check if you want to enable featured area for category templates', THEME_SLUG), 'default' => false), array('id' => 'category_fa_layout', 'type' => 'image_select', 'title' => __('Featured area layout', THEME_SLUG), 'subtitle' => __('Choose a layout for your featured area on category templates', THEME_SLUG), 'options' => vce_get_featured_area_layouts(), 'default' => 'full_grid', 'required' => array('category_fa', 'equals', true)), array('id' => 'category_fa_limit', 'class' => 'small-text', 'type' => 'text', 'title' => __('Number of featured area posts', THEME_SLUG), 'subtitle' => __('Specify how many posts you want to display inside featured area', THEME_SLUG), 'default' => 8, 'validate' => 'numeric', 'required' => array('category_fa', 'equals', true)), array('id' => 'category_fa_order', 'type' => 'radio', 'title' => __('Featured posts are ordered by', THEME_SLUG), 'options' => vce_get_post_order_opts(), 'default' => 'date', 'required' => array('category_fa', '=', true)), array('id' => 'category_fa_time', 'type' => 'radio', 'title' => __('Featured posts are not older than', THEME_SLUG), 'options' => vce_get_time_diff_opts('from'), 'default' => '0', 'required' => array('category_fa', '=', true)), array('id' => 'category_fa_not_duplicate', 'type' => 'switch', 'title' => __('Do not duplicate', THEME_SLUG), 'subtitle' => __('Enable this option to exclude posts in featured area from showing in main post listing', THEME_SLUG), 'default' => true, 'required' => array('category_fa', '=', true)), array('id' => 'category_fa_hide_on_pages', 'type' => 'switch', 'title' => __('Show featured area on first page only', THEME_SLUG), 'subtitle' => __('Enable this option to display featured area only on first page of category', THEME_SLUG), 'default' => true, 'required' => array('category_fa', '=', true)), array('id' => 'category_layout', 'type' => 'image_select', 'title' => __('Category posts main layout', THEME_SLUG), 'subtitle' => __('Choose how to display your posts on category templates', THEME_SLUG), 'options' => vce_get_main_layouts(), 'default' => 'b'), array('id' => 'category_use_top', 'type' => 'switch', 'title' => __('Enable starter posts', THEME_SLUG), 'subtitle' => __('Check if you want to enable top/starter posts which will have different different layout than posts in main listing', THEME_SLUG), 'default' => false), array('id' => 'category_top_layout', 'type' => 'image_select', 'title' => __('Category starter posts layout', THEME_SLUG), 'subtitle' => __('Choose how to display top/starter posts on category templates', THEME_SLUG), 'options' => vce_get_main_layouts(), 'default' => 'a', 'required' => array('category_use_top', 'equals', true)), array('id' => 'category_top_limit', 'class' => 'small-text', 'type' => 'text', 'title' => __('Number of starter posts', THEME_SLUG), 'subtitle' => __('Specify how many top/starter posts you want to have', THEME_SLUG), 'default' => 1, 'validate' => 'numeric', 'required' => array('category_use_top', 'equals', true)), array('id' => 'category_use_sidebar', 'type' => 'image_select', 'title' => __('Sidebar layout', THEME_SLUG), 'subtitle' => __('Choose default sidebar layout for category template', THEME_SLUG), 'options' => vce_get_sidebar_layouts(), 'default' => 'right'), array('id' => 'category_sidebar', 'type' => 'select', 'title' => __('Category standard sidebar', THEME_SLUG), 'subtitle' => __('Choose standard category sidebar', THEME_SLUG), 'options' => vce_get_sidebars_list(), 'default' => 'vce_default_sidebar', 'required' => array('category_use_sidebar', '!=', 'none')), array('id' => 'category_sticky_sidebar', 'type' => 'select', 'title' => __('Category sticky sidebar', THEME_SLUG), 'subtitle' => __('Choose sticky category sidebar', THEME_SLUG), 'options' => vce_get_sidebars_list(), 'default' => 'vce_default_sticky_sidebar', 'required' => array('category_use_sidebar', '!=', 'none')), array('id' => 'category_pagination', 'type' => 'image_select', 'title' => __('Category pagination', THEME_SLUG), 'subtitle' => __('Choose which pagination to use on category templates', THEME_SLUG), 'options' => vce_get_pagination_layouts(), 'default' => 'load-more'), array('id' => 'category_ppp', 'type' => 'radio', 'title' => __('Posts per page', THEME_SLUG), 'subtitle' => __('Choose how many posts per page you want to display', THEME_SLUG), 'options' => array('inherit' => sprintf(__('Inherit from global option in <a href="%s">Settings->Reading</a>', THEME_SLUG), admin_url('options-general.php')), 'custom' => __('Custom number', THEME_SLUG)), 'default' => 'inherit'), array('id' => 'category_ppp_num', 'type' => 'text', 'class' => 'small-text', 'title' => __('Number of post per page', THEME_SLUG), 'default' => get_option('posts_per_page'), 'required' => array('category_ppp', '=', 'custom'), 'validate' => 'numeric'))));
/* Tags */
Redux::setSection($opt_name, array('icon' => ' el-icon-tag', 'title' => __('Tag Templates', THEME_SLUG), 'desc' => __('Manage settings for tag templates', THEME_SLUG), 'fields' => array(array('id' => 'tag_layout', 'type' => 'image_select', 'title' => __('Tag archives layout', THEME_SLUG), 'subtitle' => __('Choose how to display your posts on tag template', THEME_SLUG), 'options' => vce_get_main_layouts(), 'default' => 'd'), array('id' => 'tag_use_sidebar', 'type' => 'image_select', 'title' => __('Sidebar layout', THEME_SLUG), 'subtitle' => __('Choose sidebar layout for tag template', THEME_SLUG), 'options' => vce_get_sidebar_layouts(), 'default' => 'right'), array('id' => 'tag_sidebar', 'type' => 'select', 'title' => __('Tag standard sidebar', THEME_SLUG), 'subtitle' => __('Choose standard sidebar for tag template', THEME_SLUG), 'options' => vce_get_sidebars_list(), 'default' => 'vce_default_sidebar', 'required' => array('tag_use_sidebar', '!=', 'none')), array('id' => 'tag_sticky_sidebar', 'type' => 'select', 'title' => __('Tag sticky sidebar', THEME_SLUG), 'subtitle' => __('Choose sticky sidebar for tag template', THEME_SLUG), 'options' => vce_get_sidebars_list(), 'default' => 'vce_default_sticky_sidebar', 'required' => array('tag_use_sidebar', '!=', 'none')), array('id' => 'tag_pagination', 'type' => 'image_select', 'title' => __('Tag pagination', THEME_SLUG), 'subtitle' => __('Choose which pagination to use on tag template', THEME_SLUG), 'options' => vce_get_pagination_layouts(), 'default' => 'load-more'), array('id' => 'tag_ppp', 'type' => 'radio', 'title' => __('Posts per page', THEME_SLUG), 'subtitle' => __('Choose how many posts per page you want to display', THEME_SLUG), 'options' => array('inherit' => sprintf(__('Inherit from global option in <a href="%s">Settings->Reading</a>', THEME_SLUG), admin_url('options-general.php')), 'custom' => __('Custom number', THEME_SLUG)), 'default' => 'inherit'), array('id' => 'tag_ppp_num', 'type' => 'text', 'class' => 'small-text', 'title' => __('Number of post per page', THEME_SLUG), 'default' => get_option('posts_per_page'), 'required' => array('tag_ppp', '=', 'custom'), 'validate' => 'numeric'))));
/* Author */
Redux::setSection($opt_name, array('icon' => 'el-icon-user', 'title' => __('Author Templates', THEME_SLUG), 'desc' => __('Manage settings for author templates', THEME_SLUG), 'fields' => array(array('id' => 'author_layout', 'type' => 'image_select', 'title' => __('Author archives layout', THEME_SLUG), 'subtitle' => __('Choose how to display your posts on author template', THEME_SLUG), 'options' => vce_get_main_layouts(), 'default' => 'c'), array('id' => 'author_use_sidebar', 'type' => 'image_select', 'title' => __('Sidebar layout', THEME_SLUG), 'subtitle' => __('Choose sidebar layout for author template', THEME_SLUG), 'options' => vce_get_sidebar_layouts(), 'default' => 'right'), array('id' => 'author_sidebar', 'type' => 'select', 'title' => __('Author standard sidebar', THEME_SLUG), 'subtitle' => __('Choose standard sidebar for author template', THEME_SLUG), 'options' => vce_get_sidebars_list(), 'default' => 'vce_default_sidebar', 'required' => array('author_use_sidebar', '!=', 'none')), array('id' => 'author_sticky_sidebar', 'type' => 'select', 'title' => __('Author sticky sidebar', THEME_SLUG), 'subtitle' => __('Choose sticky sidebar for author template', THEME_SLUG), 'options' => vce_get_sidebars_list(), 'default' => 'vce_default_sticky_sidebar', 'required' => array('author_use_sidebar', '!=', 'none')), array('id' => 'author_pagination', 'type' => 'image_select', 'title' => __('Author pagination', THEME_SLUG), 'subtitle' => __('Choose which pagination to use on author template', THEME_SLUG), 'options' => vce_get_pagination_layouts(), 'default' => 'load-more'), array('id' => 'author_ppp', 'type' => 'radio', 'title' => __('Posts per page', THEME_SLUG), 'subtitle' => __('Choose how many posts per page you want to display', THEME_SLUG), 'options' => array('inherit' => sprintf(__('Inherit from global option in <a href="%s">Settings->Reading</a>', THEME_SLUG), admin_url('options-general.php')), 'custom' => __('Custom number', THEME_SLUG)), 'default' => 'inherit'), array('id' => 'author_ppp_num', 'type' => 'text', 'class' => 'small-text', 'title' => __('Number of post per page', THEME_SLUG), 'default' => get_option('posts_per_page'), 'required' => array('author_ppp', '=', 'custom'), 'validate' => 'numeric'))));
/* Search */
Redux::setSection($opt_name, array('icon' => 'el-icon-search', 'title' => __('Search Template', THEME_SLUG), 'desc' => __('Manage settings for search results template', THEME_SLUG), 'fields' => array(array('id' => 'search_layout', 'type' => 'image_select', 'title' => __('Search archives layout', THEME_SLUG), 'subtitle' => __('Choose how to display your posts on search template', THEME_SLUG), 'options' => vce_get_main_layouts(), 'default' => 'd'), array('id' => 'search_use_sidebar', 'type' => 'image_select', 'title' => __('Sidebar layout', THEME_SLUG), 'subtitle' => __('Choose sidebar layout for search template', THEME_SLUG), 'options' => vce_get_sidebar_layouts(), 'default' => 'right'), array('id' => 'search_sidebar', 'type' => 'select', 'title' => __('Search standard sidebar', THEME_SLUG), 'subtitle' => __('Choose standard sidebar for search template', THEME_SLUG), 'options' => vce_get_sidebars_list(), 'default' => 'vce_default_sidebar', 'required' => array('search_use_sidebar', '!=', 'none')), array('id' => 'search_sticky_sidebar', 'type' => 'select', 'title' => __('Search sticky sidebar', THEME_SLUG), 'subtitle' => __('Choose sticky sidebar for search template', THEME_SLUG), 'options' => vce_get_sidebars_list(), 'default' => 'vce_default_sticky_sidebar', 'required' => array('search_use_sidebar', '!=', 'none')), array('id' => 'search_pagination', 'type' => 'image_select', 'title' => __('Search pagination', THEME_SLUG), 'subtitle' => __('Choose which pagination to use on search template', THEME_SLUG), 'options' => vce_get_pagination_layouts(), 'default' => 'load-more'), array('id' => 'search_ppp', 'type' => 'radio', 'title' => __('Posts per page', THEME_SLUG), 'subtitle' => __('Choose how many posts per page you want to display', THEME_SLUG), 'options' => array('inherit' => sprintf(__('Inherit from global option in <a href="%s">Settings->Reading</a>', THEME_SLUG), admin_url('options-general.php')), 'custom' => __('Custom number', THEME_SLUG)), 'default' => 'inherit'), array('id' => 'search_ppp_num', 'type' => 'text', 'class' => 'small-text', 'title' => __('Number of post per page', THEME_SLUG), 'default' => get_option('posts_per_page'), 'required' => array('search_ppp', '=', 'custom'), 'validate' => 'numeric'))));
/* Posts page archive */
Redux::setSection($opt_name, array('icon' => 'el-icon-folder-open', 'title' => __('Posts Page Archive', THEME_SLUG), 'desc' => sprintf(__('Manage settings for posts page archive if you are using "posts page" option in <a href="%s">Settings-> Reading</a>', THEME_SLUG), admin_url('options-reading.php')), 'fields' => array(array('id' => 'posts_page_layout', 'type' => 'image_select', 'title' => __('Posts page archives layout', THEME_SLUG), 'subtitle' => __('Choose how to display your posts on posts page template', THEME_SLUG), 'options' => vce_get_main_layouts(), 'default' => 'b'), array('id' => 'posts_page_pagination', 'type' => 'image_select', 'title' => __('Posts page pagination', THEME_SLUG), 'subtitle' => __('Choose which pagination to use on posts page template', THEME_SLUG), 'options' => vce_get_pagination_layouts(), 'default' => 'load-more'), array('id' => 'posts_page_ppp', 'type' => 'radio', 'title' => __('Posts per page', THEME_SLUG), 'subtitle' => __('Choose how many posts per page you want to display', THEME_SLUG), 'options' => array('inherit' => sprintf(__('Inherit from global option in <a href="%s">Settings->Reading</a>', THEME_SLUG), admin_url('options-general.php')), 'custom' => __('Custom number', THEME_SLUG)), 'default' => 'inherit'), array('id' => 'posts_page_ppp_num', 'type' => 'text', 'class' => 'small-text', 'title' => __('Number of post per page', THEME_SLUG), 'default' => get_option('posts_per_page'), 'required' => array('posts_page_ppp', '=', 'custom'), 'validate' => 'numeric'))));
/* Archives */
Redux::setSection($opt_name, array('icon' => 'el-icon-folder-open', 'title' => __('Archive Templates', THEME_SLUG), 'desc' => __('Manage settings for other miscellaneous templates like date archives, post format archives, etc...', THEME_SLUG), 'fields' => array(array('id' => 'archive_layout', 'type' => 'image_select', 'title' => __('Archives layout', THEME_SLUG), 'subtitle' => __('Choose how to display your posts on miscellaneous archive templates', THEME_SLUG), 'options' => vce_get_main_layouts(), 'default' => 'b'), array('id' => 'archive_use_sidebar', 'type' => 'image_select', 'title' => __('Sidebar layout', THEME_SLUG), 'subtitle' => __('Choose sidebar layout for archive templates', THEME_SLUG), 'options' => vce_get_sidebar_layouts(), 'default' => 'right'), array('id' => 'archive_sidebar', 'type' => 'select', 'title' => __('Archive standard sidebar', THEME_SLUG), 'subtitle' => __('Choose standard sidebar for archive templates', THEME_SLUG), 'options' => vce_get_sidebars_list(), 'default' => 'vce_default_sidebar', 'required' => array('archive_use_sidebar', '!=', 'none')), array('id' => 'archive_sticky_sidebar', 'type' => 'select', 'title' => __('Archive sticky sidebar', THEME_SLUG), 'subtitle' => __('Choose sticky sidebar for archive templates', THEME_SLUG), 'options' => vce_get_sidebars_list(), 'default' => 'vce_default_sticky_sidebar', 'required' => array('archive_use_sidebar', '!=', 'none')), array('id' => 'archive_pagination', 'type' => 'image_select', 'title' => __('Archive pagination', THEME_SLUG), 'subtitle' => __('Choose which pagination to use on archive templates', THEME_SLUG), 'options' => vce_get_pagination_layouts(), 'default' => 'load-more'), array('id' => 'archive_ppp', 'type' => 'radio', 'title' => __('Posts per page', THEME_SLUG), 'subtitle' => __('Choose how many posts per page you want to display', THEME_SLUG), 'options' => array('inherit' => sprintf(__('Inherit from global option in <a href="%s">Settings->Reading</a>', THEME_SLUG), admin_url('options-general.php')), 'custom' => __('Custom number', THEME_SLUG)), 'default' => 'inherit'), array('id' => 'archive_ppp_num', 'type' => 'text', 'class' => 'small-text', 'title' => __('Number of post per page', THEME_SLUG), 'default' => get_option('posts_per_page'), 'required' => array('archive_ppp', '=', 'custom'), 'validate' => 'numeric'))));
/* Typography */
Redux::setSection($opt_name, array('icon' => 'el-icon-font', 'title' => __('Typography', THEME_SLUG), 'desc' => __('Manage fonts and typography settings', THEME_SLUG), 'fields' => array(array('id' => 'main_font', 'type' => 'typography', 'title' => __('Main text font', THEME_SLUG), 'google' => true, 'font-backup' => false, 'font-size' => false, 'color' => false, 'line-height' => false, 'text-align' => false, 'units' => 'px', 'subtitle' => __('This is you main font for standard text', THEME_SLUG), 'default' => array('google' => true, 'font-weight' => '400', 'font-family' => 'Open Sans', 'subsets' => 'latin-ext'), 'preview' => array('always_display' => true, 'font-size' => '16px', 'line-height' => '26px', 'text' => 'This is a font used for your main content on the website. Here in MeksHQ, we think that readability is very important part of any WordPress theme. This is actually a rough example of how simple paragraph of text will look like on your website so you have a simple preview here.')), array('id' => 'h_font', 'type' => 'typography', 'title' => __('Headings font', THEME_SLUG), 'google' => true, 'font-backup' => false, 'font-size' => false, 'color' => false, 'line-height' => false, 'text-align' => false, 'units' => 'px', 'subtitle' => __('This font is used for headings, titles, h-elements...', THEME_SLUG), 'default' => array('google' => true, 'font-weight' => '400', 'font-family' => 'Roboto Slab', 'subsets' => 'latin-ext'), 'preview' => array('always_display' => true, 'font-size' => '24px', 'line-height' => '30px', 'text' => 'There is no good blog without great readability')), array('id' => 'nav_font', 'type' => 'typography', 'title' => __('Navigation font', THEME_SLUG), 'google' => true, 'font-backup' => false, 'font-size' => false, 'color' => false, 'line-height' => false, 'text-align' => false, 'units' => 'px', 'subtitle' => __('This font is used for main website navigation', THEME_SLUG), 'default' => array('font-weight' => '400', 'font-family' => 'Roboto Slab', 'subsets' => 'latin-ext'), 'preview' => array('always_display' => true, 'font-size' => '16px', 'text' => 'Home &nbsp;&nbsp;About &nbsp;&nbsp;Blog &nbsp;&nbsp;Contact')), array('id' => 'text_upper', 'type' => 'checkbox', 'multi' => true, 'title' => __('Uppercase text', THEME_SLUG), 'subtitle' => __('Check if you want to show CAPITAL LETTERS for specific elements', THEME_SLUG), 'options' => array('site-title a' => __('Site title', THEME_SLUG), 'site-description' => __('Site description', THEME_SLUG), 'nav-menu li a' => __('Main navigation', THEME_SLUG), 'entry-title' => __('Post/Page titles', THEME_SLUG), 'main-box-title' => __('Box (module, archive, category, tag, etc...) titles', THEME_SLUG), 'sidebar .widget-title' => __('Widget titles', THEME_SLUG), 'site-footer .widget-title' => __('Footer widget titles', THEME_SLUG), 'vce-featured-link-article' => __('Featured area titles', THEME_SLUG)), 'default' => array('site-title a' => 0, 'site-description' => 0, 'nav-menu li a' => 0, 'entry-title' => 0, 'main-box-title' => 0, 'sidebar .widget-title' => 0, 'site-footer .widget-title' => 0, 'vce-featured-link-article' => 0)))));
/* Misc */
Redux::setSection($opt_name, array('icon' => 'el-icon-wrench', 'title' => __('Miscellaneous', THEME_SLUG), 'desc' => __('These are some miscellaneous settings for the website', THEME_SLUG), 'fields' => array(array('id' => 'more_string', 'type' => 'text', 'class' => 'small-text', 'title' => __('More string', THEME_SLUG), 'subtitle' => __('Specify your "more" string to append after limited post titles and excerpts across the theme', THEME_SLUG), 'default' => '...', 'validate' => 'no_html'), array('id' => 'time_ago', 'type' => 'switch', 'title' => __('Display "time ago" format', THEME_SLUG), 'subtitle' => __('Display post dates in "time ago" manner, like Twitter and Facebook (i.e 5 hours ago, 3 days ago, 2 weeks ago, 4 months ago, etc...)', THEME_SLUG), 'desc' => sprintf(__('Note: If you disable this option, you can choose your preferred date format in <a href="%s">Settings -> General</a>', THEME_SLUG), admin_url('options-general.php')), 'default' => true), array('id' => 'time_ago_limit', 'type' => 'radio', 'title' => __('Apply "time ago" to posts which are not older than', THEME_SLUG), 'options' => array('hour' => __('1 Hour', THEME_SLUG), 'day' => __('1 Day', THEME_SLUG), 'week' => __('1 Week', THEME_SLUG), 'month' => __('1 Month', THEME_SLUG), 'three_months' => __('3 Months', THEME_SLUG), 'six_months' => __('6 Months', THEME_SLUG), 'year' => __('1 Year', THEME_SLUG), '0' => __('Apply to all posts', THEME_SLUG)), 'default' => '0', 'required' => array('time_ago', '=', true)), array('id' => 'ago_before', 'type' => 'checkbox', 'title' => __('Display "ago" word before date/time', THEME_SLUG), 'subtitle' => __('By default, "ago" word goes after date/time string but in some languages different than English it is more proper to display it before.', THEME_SLUG), 'desc' => __('Example: "Publie depuis 3 heures"', THEME_SLUG), 'default' => false, 'required' => array('time_ago', '=', true)), array('id' => 'views_forgery', 'type' => 'text', 'class' => 'small-text', 'title' => __('Post views forgery', THEME_SLUG), 'subtitle' => __('Specify value to add to real number of entry views for each post', THEME_SLUG), 'desc' => __('i.e. If post has 45 views and you put 100, your post will display 145 views', THEME_SLUG), 'default' => '', 'validate' => 'numeric'), array('id' => 'scroll_to_top', 'type' => 'switch', 'title' => __('Display scroll to top button', THEME_SLUG), 'subtitle' => __('Check if you want to display scroll to top button', THEME_SLUG), 'default' => true), array('id' => 'scroll_to_top_color', 'type' => 'color', 'title' => __('Scroll to top button color', THEME_SLUG), 'subtitle' => __('Choose color for scroll to top button', THEME_SLUG), 'transparent' => false, 'default' => '#323232', 'required' => array('scroll_to_top', '=', true)), array('id' => 'use_gallery', 'type' => 'switch', 'title' => __('Use Voice gallery style', THEME_SLUG), 'subtitle' => __('Check if you want to use our built in gallery style or disable if you want to use default WordPress gallery or some other gallery plugin', THEME_SLUG), 'default' => true), array('id' => 'img_zoom', 'type' => 'switch', 'title' => __('Enable zoom effect on featured images', THEME_SLUG), 'subtitle' => __('Check if you want to enable zoom effect on featured image mouse-over', THEME_SLUG), 'default' => true), array('id' => '404_img', 'type' => 'media', 'url' => true, 'title' => __('404 template image', THEME_SLUG), 'subtitle' => __('Upload image for 404 template (optional)', THEME_SLUG), 'desc' => __('Supported formats: .jpg and .png', THEME_SLUG), 'default' => array('url' => '')), array('id' => 'multibyte_excerpts', 'type' => 'switch', 'title' => __('Enable support for "multibyte" text excerpts', THEME_SLUG), 'subtitle' => __('Use this option for some specific languages that have special characters i.e. Japanese', THEME_SLUG), 'default' => false))));
/* WooCommerce */
if (vce_is_woocommerce_active()) {
    Redux::setSection($opt_name, array('icon' => 'el-icon-cogs', 'title' => __('WooCommerce', THEME_SLUG), 'desc' => __('Manage options for WooCommerce pages', THEME_SLUG), 'fields' => array(array('id' => 'product_use_sidebar', 'type' => 'image_select', 'title' => __('Product sidebar layout', THEME_SLUG), 'subtitle' => __('Choose sidebar layout for WooCommerce products', THEME_SLUG), 'options' => vce_get_sidebar_layouts(), 'default' => 'right'), array('id' => 'product_sidebar', 'type' => 'select', 'title' => __('Product standard sidebar', THEME_SLUG), 'subtitle' => __('Choose standard sidebar for WooCommerce products', THEME_SLUG), 'options' => vce_get_sidebars_list(), 'default' => 'vce_default_sidebar', 'required' => array('product_use_sidebar', '!=', 'none')), array('id' => 'product_sticky_sidebar', 'type' => 'select', 'title' => __('Product sticky sidebar', THEME_SLUG), 'subtitle' => __('Choose sticky sidebar for WooCommerce products', THEME_SLUG), 'options' => vce_get_sidebars_list(), 'default' => 'vce_default_sticky_sidebar', 'required' => array('product_use_sidebar', '!=', 'none')), array('id' => 'product_cat_use_sidebar', 'type' => 'image_select', 'title' => __('Product category sidebar layout', THEME_SLUG), 'subtitle' => __('Choose sidebar layout for WooCommerce product category', THEME_SLUG), 'options' => vce_get_sidebar_layouts(), 'default' => 'right'), array('id' => 'product_cat_sidebar', 'type' => 'select', 'title' => __('Product category standard sidebar', THEME_SLUG), 'subtitle' => __('Choose standard sidebar for WooCommerce product category', THEME_SLUG), 'options' => vce_get_sidebars_list(), 'default' => 'vce_default_sidebar', 'required' => array('product_cat_use_sidebar', '!=', 'none')), array('id' => 'product_cat_sticky_sidebar', 'type' => 'select', 'title' => __('Product category sticky sidebar', THEME_SLUG), 'subtitle' => __('Choose sticky sidebar for WooCommerce product category', THEME_SLUG), 'options' => vce_get_sidebars_list(), 'default' => 'vce_default_sticky_sidebar', 'required' => array('product_cat_use_sidebar', '!=', 'none')))));
}
/* bbPress */
if (vce_is_bbpress_active()) {
    Redux::setSection($opt_name, array('icon' => 'el-icon-cogs', 'title' => __('bbPress', THEME_SLUG), 'desc' => __('Manage options for bbPress pages', THEME_SLUG), 'fields' => array(array('id' => 'forum_use_sidebar', 'type' => 'image_select', 'title' => __('Forum sidebar layout', THEME_SLUG), 'subtitle' => __('Choose sidebar layout for bbPress forums', THEME_SLUG), 'options' => vce_get_sidebar_layouts(), 'default' => 'right'), array('id' => 'forum_sidebar', 'type' => 'select', 'title' => __('Forum standard sidebar', THEME_SLUG), 'subtitle' => __('Choose standard sidebar for bbPress forums', THEME_SLUG), 'options' => vce_get_sidebars_list(), 'default' => 'vce_default_sidebar', 'required' => array('forum_use_sidebar', '!=', 'none')), array('id' => 'forum_sticky_sidebar', 'type' => 'select', 'title' => __('Forum sticky sidebar', THEME_SLUG), 'subtitle' => __('Choose sticky sidebar for bbPress forums', THEME_SLUG), 'options' => vce_get_sidebars_list(), 'default' => 'vce_default_sticky_sidebar', 'required' => array('forum_use_sidebar', '!=', 'none')), array('id' => 'topic_use_sidebar', 'type' => 'image_select', 'title' => __('Topic sidebar layout', THEME_SLUG), 'subtitle' => __('Choose sidebar layout for bbPress topics', THEME_SLUG), 'options' => vce_get_sidebar_layouts(), 'default' => 'right'), array('id' => 'topic_sidebar', 'type' => 'select', 'title' => __('Topic standard sidebar', THEME_SLUG), 'subtitle' => __('Choose standard sidebar for bbPress topics', THEME_SLUG), 'options' => vce_get_sidebars_list(), 'default' => 'vce_default_sidebar', 'required' => array('topic_use_sidebar', '!=', 'none')), array('id' => 'topic_sticky_sidebar', 'type' => 'select', 'title' => __('Topic sticky sidebar', THEME_SLUG), 'subtitle' => __('Choose sticky sidebar for bbPress topics', THEME_SLUG), 'options' => vce_get_sidebars_list(), 'default' => 'vce_default_sticky_sidebar', 'required' => array('topic_use_sidebar', '!=', 'none')))));
}
Redux::setSection($opt_name, array('type' => 'divide', 'id' => 'vce-divide'));
/* Translation Options */
$translate_options[] = array('id' => 'enable_translate', 'type' => 'switch', 'switch' => true, 'title' => __('Enable theme translation?', THEME_SLUG), 'default' => '1');