Beispiel #1
0
    ?>
">
			<ul>
			<?php 
    if (cr_get_option('post_sidebars_option') == 'global') {
        $sidebar = cr_get_option('post_sidebar');
        $sidebars = cr_get_option('sidebars', array());
        if (circleflip_valid($sidebar) && in_array($sidebar, $sidebars)) {
            dynamic_sidebar($sidebar);
        }
    } else {
        $post_custom_values = get_post_custom_values('_sidebar', $post->ID);
        if (!empty($post_custom_values) && isset($post_custom_values)) {
            $sidebar = array_shift($post_custom_values);
            $sidebars = cr_get_option('sidebars', array());
            if (circleflip_valid($sidebar) && in_array($sidebar, $sidebars)) {
                dynamic_sidebar($sidebar);
            }
        }
    }
    ?>
			</ul>
		</aside>
	</section>
	<?php 
}
?>
</div>
</div>
<?php 
get_footer();
Beispiel #2
0
/**
 * Defines an array of options that will be used to generate the settings page and be saved in the database.
 * When creating the 'id' fields, make sure to use all lowercase and no spaces.
 *
 * If you are making your theme translatable, you should replace 'options_framework_theme'
 * with the actual text domain for your theme.  Read more:
 * http://codex.wordpress.org/Function_Reference/load_theme_textdomain
 */
function circleflip_optionsframework_options()
{
    global $fonts_global_array;
    $args = array('post_type' => 'ml-slider', 'post_status' => 'publish', 'orderby' => 'date', 'order' => 'ASC', 'posts_per_page' => -1);
    $the_query = new WP_Query($args);
    while ($the_query->have_posts()) {
        $the_query->the_post();
        $sliders[$the_query->post->ID] = get_the_title();
    }
    if (!isset($sliders)) {
        $sliders = array();
    }
    array_key_exists(0, $sliders) ? $sliders[$the_query->post->ID + 1] = 'ultimate' : ($sliders['ultimate'] = 'ultimate');
    array_key_exists(1, $sliders) ? $sliders[$the_query->post->ID + 2] = 'posts' : ($sliders['posts'] = 'posts');
    array_key_exists(2, $sliders) ? $sliders[$the_query->post->ID + 3] = '3D Slider' : ($sliders['3D'] = '3D Slider');
    array_key_exists(3, $sliders) ? $sliders[$the_query->post->ID + 4] = 'Elastic Slider' : ($sliders['Elastic'] = 'Elastic Slider');
    // Background Defaults
    $background_defaults = array('color' => '', 'image' => '', 'repeat' => 'repeat', 'position' => 'top center', 'attachment' => 'scroll');
    // Typography Defaults
    $typography_defaults = array('size' => '16px', 'face' => 'Arial', 'style' => 'Normal', 'color' => '#bada55');
    // Typography Options
    $my_fonts = array('Arial' => 'Arial', 'Times New Roman' => 'Times New Roman', 'DroidArabicKufi' => 'DroidArabicKufi', 'SourceSansSemiBold' => 'SourceSansSemiBold', 'sourceSans' => 'sourceSans');
    $typography_options = array('sizes' => range(6, 71), 'faces' => array_merge($my_fonts, $fonts_global_array), 'styles' => array('Normal' => 'Normal', 'Italic' => 'Italic'), 'weights' => array('Normal' => 'Normal', 'Bold' => 'Bold'), 'color' => TRUE);
    // header builder names
    $hb_names = get_option('hb_names');
    //side bars array
    $sideBarsArray = array();
    $side_bars = cr_get_option("sidebars");
    if (isset($side_bars) && is_array($side_bars)) {
        foreach ($side_bars as $sidebar) {
            $sideBarsArray[$sidebar] = $sidebar;
        }
    }
    // Pull all the categories into an array
    $options_categories = array();
    $options_categories_obj = get_categories();
    foreach ($options_categories_obj as $category) {
        $options_categories[$category->cat_ID] = $category->cat_name;
    }
    // Get all posts in the website
    $allPosts = get_posts(array('numberposts' => -1));
    $postNames = array();
    foreach ($allPosts as $key => $post) {
        $postNames[$post->ID] = $post->post_title . " on " . date("F j, Y g:i a", strtotime($post->post_date)) . " by " . get_user_by('id', $post->post_author)->display_name;
    }
    wp_reset_postdata();
    $pages = get_pages();
    if (isset($pages) && is_array($pages)) {
        foreach ($pages as $page) {
            $pagesList[$page->ID] = $page->post_title;
        }
    }
    wp_reset_postdata();
    // Pull all tags into an array
    $options_tags = array();
    $options_tags_obj = get_tags();
    foreach ($options_tags_obj as $tag) {
        $options_tags[$tag->term_id] = $tag->name;
    }
    // Pull all the pages into an array
    $options_pages = array();
    $options_pages_obj = get_pages('sort_column=post_parent,menu_order');
    $options_pages[''] = 'Select a page:';
    foreach ($options_pages_obj as $page) {
        $options_pages[$page->ID] = $page->post_title;
    }
    // If using image radio buttons, define a directory path
    $imagepath = get_template_directory_uri() . '/creiden-framework/images/';
    $imagepathinc = get_template_directory_uri() . '/creiden-framework/inc/images/';
    $options = array();
    /* ========================================================================================================================
    
    Start of Options
    
    ======================================================================================================================== */
    /* ========================================================================================================================
    
    General Settings Tab
    
    ======================================================================================================================== */
    $options[] = array('name' => 'General Settings', 'icon_name' => $imagepathinc . 'general.png', 'type' => 'heading');
    /* ========================================================================================================================
    
    			Header Options
    
    			======================================================================================================================== */
    $options[] = array('name' => 'Header Settings', 'icon_name' => $imagepathinc . 'sub.png', 'class' => 'sub_heading', 'type' => 'heading');
    $options[] = array('name' => 'Header Builder', 'desc' => 'To Enable the header builder and disable the old styles', 'id' => 'header_builder', 'class' => 'header_builder', 'std' => '0', 'type' => 'checkbox');
    $options[] = array('name' => 'Header Style', 'desc' => 'Choose the header style', 'id' => 'header_style', 'std' => 'style1', 'class' => 'header_images', 'type' => "images", 'options' => array('style1' => $imagepath . 'Header1.png', 'style2' => $imagepath . 'Header2.png', 'style4' => $imagepath . 'Header4.png', 'style5' => $imagepath . 'Header5.png', 'style6' => $imagepath . 'Header6.png', 'style7' => $imagepath . 'Header7.png', 'style8' => $imagepath . 'Header8.png', 'style9' => $imagepath . 'Header9.png'));
    if (circleflip_valid($hb_names)) {
        $options[] = array('name' => 'Global Header', 'desc' => 'Choose the global header setting', 'id' => 'global_header_builder', 'type' => "select", 'options' => $hb_names);
        $options[] = array('name' => 'Global RTL Header', 'desc' => 'Choose the global RTL header setting', 'id' => 'global_header_builder_rtl', 'type' => "select", 'options' => $hb_names);
    }
    $options[] = array('name' => 'Header Sticky', 'desc' => 'To enable Sticky Header', 'id' => 'sticky_header', 'class' => 'sticky_header', 'std' => '0', 'type' => 'checkbox');
    $options[] = array('name' => 'Top Left Area Settings', 'desc' => 'Choose what to add in the top left area', 'id' => 'top_left_area_settings', 'std' => 'contact', 'type' => "select", 'options' => array('contact' => 'Contact', 'social' => 'Social Icons', 'main_navigation' => 'Main Navigation', 'header_menu' => 'Header Menu'));
    $options[] = array('name' => 'Top Right Area Settings', 'desc' => 'Choose what to add in the top right area', 'id' => 'top_right_area_settings', 'std' => 'social', 'type' => "select", 'options' => array('contact' => 'Contact', 'social' => 'Social Icons', 'main_navigation' => 'Main Navigation', 'header_menu' => 'Header Menu'));
    $options[] = array('name' => 'Ad Area Settings', 'desc' => 'Choose what to add in the Ad area', 'id' => 'top_area_header_settings', 'std' => 'main_navigation', 'type' => "select", 'options' => array('ad' => 'Advertisment', 'social' => 'Social Icons', 'main_navigation' => 'Main Navigation', 'header_menu' => 'Header Menu'));
    $options[] = array('name' => 'Header Revolution Slider Shortcode', 'desc' => 'Please enter the Overlay Header Revolution Slider Shortcode', 'id' => 'overlayheader_slider', 'std' => '', 'type' => "text");
    $options[] = array('name' => 'Contact info', 'desc' => 'Write a brief for your contact info to appear in the header', 'id' => 'header_contact_settings', 'std' => 'for any inquiry: 000-111-222-333 | info@circleflip.com', 'type' => "text");
    $options[] = array('name' => 'Contact Link', 'desc' => 'where do you want to link your contact text', 'id' => 'header_contact_link_settings', 'std' => '', 'type' => "text");
    $options[] = array('name' => 'Ad Area Image', 'desc' => 'Add the image of the ad', 'id' => 'header_ad_area', 'class' => 'ad_area', 'std' => '', 'type' => 'upload');
    $options[] = array('name' => 'Ad Link', 'desc' => 'Add the link of the ad area', 'id' => 'header_ad_link', 'std' => '#', 'type' => "text");
    $options[] = array('name' => 'Header height', 'desc' => 'height in pixels (After changing this please refresh the window for changes to take effect on Logo Builder)', 'id' => 'header_height', 'std' => 137, 'class' => 'mini', 'type' => 'text');
    $options[] = array('name' => 'Search Area', 'desc' => 'Show the search area in the header', 'id' => 'search_area', 'class' => 'mini themeoptionsHidden showSearch', 'std' => '1', 'type' => 'checkbox');
    $options[] = array('name' => 'Breaking News', 'desc' => 'Show the breaking area in the header', 'id' => 'breaking_area', 'class' => 'mini themeoptionsHidden showBreak', 'std' => '1', 'type' => 'checkbox');
    $options[] = array('name' => 'Breaking Title', 'desc' => 'Text of the breaking area title', 'id' => 'breaking_title', 'std' => 'Breaking', 'class' => 'mini themeoptionsHidden showBreak', 'type' => 'text');
    $options[] = array('name' => 'What to show', 'desc' => 'Select the content of the Breaking Area', 'id' => 'breaking_content', 'class' => 'themeoptionsHidden showBreak', 'std' => 'posts', 'type' => 'radio', 'options' => array('posts' => 'Latest Posts', 'custom' => 'Custom News'));
    $options[] = array('name' => 'Number of posts', 'desc' => 'Enter number of posts to show in breaking area', 'id' => 'number_breaking_posts', 'class' => 'themeoptionsHidden showBreak', 'std' => 10, 'type' => 'text');
    $options[] = array('name' => 'Breaking Area Selected Categories', 'desc' => 'Select the categories you want', 'id' => 'breaking_selected_category', 'class' => 'themeoptionsHidden showBreak', 'type' => 'selectmultiple', 'options' => $options_categories);
    $options[] = array('name' => 'Custom Content', 'desc' => 'Put the sentences you want to show in the Breaking Area here separated by commas "," ', 'id' => 'custome_breaking', 'class' => 'themeoptionsHidden showBreak', 'std' => 'Lorem Ipsum, Lorem Ipsum', 'type' => 'textarea');
    /* ========================================================================================================================
    
    			Social Icons Options
    
    			======================================================================================================================== */
    $options[] = array('name' => 'Social Icons Settings', 'icon_name' => $imagepathinc . 'sub.png', 'class' => 'sub_heading', 'type' => 'heading');
    $options[] = array('name' => 'Social Links', 'desc' => 'add your social links', 'id' => 'social_urls', 'type' => 'cust_social', 'std' => array());
    /* ========================================================================================================================
    
    			Footer Options
    
    			======================================================================================================================== */
    $options[] = array('name' => 'Footer Settings', 'icon_name' => $imagepathinc . 'sub.png', 'class' => 'sub_heading', 'type' => 'heading');
    $options[] = array('name' => 'Copy Rights Text', 'desc' => 'Enter the text you want to show in your footer here', 'id' => 'copy_rights_text', 'std' => 'All rights Reserved', 'type' => 'text');
    $options[] = array('name' => 'Footer Widgets Width', 'desc' => 'Choose the maximum number of widgets', 'id' => 'max_number_widgets', 'type' => 'select', 'options' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4'));
    /* ========================================================================================================================
    
    			Logo Options
    
    			======================================================================================================================== */
    $options[] = array('name' => 'Logo', 'icon_name' => $imagepathinc . 'sub.png', 'class' => 'sub_heading', 'type' => 'heading');
    $options[] = array('name' => 'Logo Builder', 'desc' => 'Preferred Logo Size is 194px X 90px ', 'id' => 'theme_logo', 'std' => '', 'class' => 'theme_logo', 'type' => 'upload');
    $options[] = array('name' => 'Preview Logo Position and Size', 'desc' => 'Check here', 'id' => 'logoWrapper', 'class' => 'builder', 'type' => 'logo_builder');
    $options[] = array('id' => 'logo_width', 'class' => 'mini', 'placeholder' => 'Width', 'std' => '270', 'type' => 'text');
    $options[] = array('id' => 'logo_height', 'class' => 'mini', 'placeholder' => 'Height', 'std' => '137', 'type' => 'text');
    $options[] = array('id' => 'logo_top', 'class' => 'mini', 'placeholder' => 'Top', 'std' => '0', 'type' => 'text');
    $options[] = array('id' => 'logo_left', 'class' => 'mini', 'placeholder' => 'Left', 'std' => '0', 'type' => 'text');
    $options[] = array('desc' => 'Aspect Ratio', 'id' => 'logo_aspectRatio', 'class' => 'mini', 'std' => '1', 'type' => 'checkbox');
    $options[] = array('id' => 'resetLogoSize', 'text' => 'Reset Size', 'type' => 'button');
    $options[] = array('name' => 'Logo Wrapper Width', 'desc' => 'Width in pixels (After changing this please refresh the window for changes to take effect on Logo Builder)', 'id' => 'logo_wrapper_width', 'std' => 270, 'class' => 'mini', 'type' => 'text');
    $options[] = array('name' => 'Retina Logo', 'desc' => 'Dimensions should be double of the normal logo (Preferred Size is 540px X 274px) and must be named filename@2x.png', 'id' => 'retina_logo', 'std' => '', 'class' => 'theme_logo', 'type' => 'upload');
    $options[] = array('name' => 'RTL Retina Logo', 'desc' => 'Dimensions should be double of the normal logo (Preferred Size is 540px X 274px) and must be named filename@2x.png', 'id' => 'rtl_retina_logo', 'std' => '', 'class' => 'theme_logo', 'type' => 'upload');
    if (!function_exists('wp_site_icon')) {
        $options[] = array('name' => 'Favicon', 'desc' => 'Upload your favicon here (Please use *.ico file type only)', 'id' => 'favicon', 'std' => '', 'type' => 'upload');
    }
    /* ========================================================================================================================
    
    			Advanced Options
    
    			======================================================================================================================== */
    $options[] = array('name' => 'Advanced', 'icon_name' => $imagepathinc . 'sub.png', 'class' => 'sub_heading', 'type' => 'heading');
    $options[] = array('name' => 'Responsive', 'desc' => 'To enable viewing this website normally on a mobile device, mark this option', 'id' => 'responsive', 'class' => 'mini', 'std' => '1', 'type' => 'checkbox');
    $options[] = array('name' => 'RTL Website', 'desc' => 'To enable viewing this website with RTL languages', 'id' => 'rtl', 'class' => 'mini', 'std' => '0', 'type' => 'checkbox');
    $options[] = array('name' => 'Nice scroll bar', 'desc' => 'Enable nice scroll bar for all pages', 'id' => 'nice_scroll_bar', 'class' => 'mini', 'std' => '', 'type' => 'checkbox');
    $options[] = array('name' => 'Custom CSS Code', 'desc' => 'Paste any CSS rules that you want to add to the theme here.', 'id' => 'custom_css', 'std' => '', 'type' => 'textarea');
    $options[] = array('name' => 'Custom Javascript code', 'desc' => 'Paste any JS that you want to add to the theme here.', 'id' => 'custom_js', 'std' => '', 'type' => 'textarea');
    $options[] = array('name' => 'Custom Code', 'desc' => 'Paste any code that you want to add to the theme here, mainly used when you have a noscript tag or html that you want to place directly to the theme', 'id' => 'custom_code', 'std' => '', 'type' => 'textarea');
    $options[] = array('name' => 'Login Page Logo', 'desc' => 'Upload your preferred image for Wordpress Login page here', 'id' => 'login_image', 'type' => 'upload');
    $options[] = array('name' => 'Default Blocks Animations', 'desc' => 'Choose the default animation for the blocks', 'id' => 'block_animations', 'type' => 'select', 'options' => array('noanimation' => 'no animation', 'cr_left' => 'Fade To Left', 'cr_right' => 'Fade To Right', 'cr_top' => 'Fade To Up', 'cr_bottom' => 'Fade To Down', 'cr_popup' => 'Popout', 'cr_fade' => 'Fade in'));
    $options[] = array('name' => 'Activate the revisions history', 'desc' => 'Do you want to activate the revisions history, note: enabling it makes publishing pages a little bit slower however it is safer to your content builder data', 'id' => 'activate_revisions_history', 'type' => 'select', 'options' => array('Yes' => 'Yes', 'No' => 'No'));
    /* ========================================================================================================================
    
    		Pages Settings Tab
    
    		======================================================================================================================== */
    $options[] = array('name' => 'Pages Settings', 'icon_name' => $imagepathinc . 'pages.png', 'type' => 'heading');
    /* ========================================================================================================================
    
    			Blog Page Options
    
    			======================================================================================================================== */
    $options[] = array('name' => 'Template Blog Page', 'icon_name' => $imagepathinc . 'sub.png', 'class' => 'sub_heading', 'type' => 'heading');
    $options[] = array('name' => 'Posts per Page', 'desc' => 'Number of posts to show in the blog page', 'id' => 'blog_posts_per_page', 'std' => '5', 'class' => 'mini', 'type' => 'text');
    $options[] = array('name' => 'Selected Category', 'desc' => 'Select the category you want to show in the Blog Page', 'id' => 'blog_selected_cat', 'type' => 'selectmultiple', 'options' => $options_categories);
    $options[] = array('name' => 'Display Views Count', 'desc' => 'View count of comments/views of the posts shown in Blog page', 'id' => 'blog_views_count', 'class' => 'mini', 'std' => '1', 'type' => 'checkbox');
    $options[] = array('name' => 'Display Date', 'desc' => 'View date of the posts shown in blog page', 'id' => 'blog_date', 'class' => 'mini', 'std' => '1', 'type' => 'checkbox');
    $options[] = array('name' => 'Display Author Name', 'desc' => 'View Author name of the post shown in blog page', 'id' => 'blog_author', 'class' => 'mini', 'std' => '1', 'type' => 'checkbox');
    $options[] = array('name' => 'Order Direction', 'desc' => 'Order direction for posts in Blog page ', 'id' => 'blog_posts_order_direction', 'std' => 'DESC', 'type' => 'select', 'options' => array('ASC' => 'Ascending', 'DESC' => 'Descending'));
    $options[] = array('name' => 'Read More button Text', 'desc' => 'Text shown under the arrow which opens the post', 'id' => 'blog_read_more', 'std' => 'More', 'class' => 'mini', 'type' => 'text');
    /* ========================================================================================================================
    
    			Tags page Options
    
    			======================================================================================================================== */
    $options[] = array('name' => 'Tags Page', 'icon_name' => $imagepathinc . 'sub.png', 'class' => 'sub_heading', 'type' => 'heading');
    $options[] = array('name' => "Page Layout", 'desc' => "Please choose the preferred layout for Tags page", 'id' => "tags_layout", 'std' => "right", 'type' => "images", 'options' => array('none' => $imagepath . '/1col.png', 'left' => $imagepath . '/2cl.png', 'right' => $imagepath . '/2cr.png'));
    $options[] = array('name' => 'Tags page Sidebar', 'desc' => 'Select the side bar you want to view in the Tags page', 'id' => 'tags_sidebar', 'type' => 'select', 'options' => $sideBarsArray);
    $options[] = array('name' => 'Posts per Page', 'desc' => 'Number of posts to show in the tags page', 'id' => 'tags_posts_per_page', 'std' => '5', 'class' => 'mini', 'type' => 'text');
    $options[] = array('name' => 'Order Direction', 'desc' => 'Order direction for posts in tags page ', 'id' => 'tags_posts_order_direction', 'std' => 'DESC', 'type' => 'select', 'options' => array('ASC' => 'Ascending', 'DESC' => 'Descending'));
    /* ========================================================================================================================
    
    			Search Results Options
    
    			======================================================================================================================== */
    $options[] = array('name' => 'Search Results Page', 'icon_name' => $imagepathinc . 'sub.png', 'class' => 'sub_heading', 'type' => 'heading');
    $options[] = array('name' => "Page Layout", 'desc' => "Please choose the preferred layout for search page", 'id' => "search_layout", 'std' => "right", 'type' => "images", 'options' => array('none' => $imagepath . '/1col.png', 'left' => $imagepath . '/2cl.png', 'right' => $imagepath . '/2cr.png'));
    $options[] = array('name' => 'search page Sidebar', 'desc' => 'Select the side bar you want to view in the search page', 'id' => 'search_sidebar', 'type' => 'select', 'options' => $sideBarsArray);
    $options[] = array('name' => 'Posts per Page', 'desc' => 'Number of posts to show in the search page', 'id' => 'search_posts_per_page', 'std' => '5', 'class' => 'mini', 'type' => 'text');
    $options[] = array('name' => 'Order Direction', 'desc' => 'Order direction for posts in search page ', 'id' => 'search_posts_order_direction', 'std' => 'DESC', 'type' => 'select', 'options' => array('ASC' => 'Ascending', 'DESC' => 'Descending'));
    /* ========================================================================================================================
    
    			Category Page Options
    
    			======================================================================================================================== */
    $options[] = array('name' => 'Category Page', 'icon_name' => $imagepathinc . 'sub.png', 'class' => 'sub_heading', 'type' => 'heading');
    $options[] = array('name' => "Page Layout", 'desc' => "Please choose the preferred layout for category page", 'id' => "category_layout", 'std' => "right", 'type' => "images", 'options' => array('none' => $imagepath . '/1col.png', 'left' => $imagepath . '/2cl.png', 'right' => $imagepath . '/2cr.png'));
    $options[] = array('name' => 'Category page Sidebar', 'desc' => 'Select the side bar you want to view in the category page', 'id' => 'category_sidebar', 'type' => 'select', 'options' => $sideBarsArray);
    $options[] = array('name' => 'Number Of Posts Displayed', 'desc' => 'Number of posts to show', 'id' => 'category_posts', 'std' => '5', 'class' => 'mini', 'type' => 'text');
    $options[] = array('name' => 'Order Direction', 'desc' => 'Order posts in category page ', 'id' => 'category_posts_order_direction', 'std' => 'DESC', 'type' => 'select', 'options' => array('ASC' => 'Ascending', 'DESC' => 'Descending'));
    /* ========================================================================================================================
    
    			Author Page Options
    
    			======================================================================================================================== */
    $options[] = array('name' => 'Author Page', 'icon_name' => $imagepathinc . 'sub.png', 'class' => 'sub_heading', 'type' => 'heading');
    $options[] = array('name' => "Page Layout", 'desc' => "Please choose the preferred layout for Author page", 'id' => "author_layout", 'std' => "right", 'type' => "images", 'options' => array('none' => $imagepath . '/1col.png', 'left' => $imagepath . '/2cl.png', 'right' => $imagepath . '/2cr.png'));
    $options[] = array('name' => 'Author page Sidebar', 'desc' => 'Select the side bar you want to view in the author page', 'id' => 'author_sidebar', 'type' => 'select', 'options' => $sideBarsArray);
    $options[] = array('name' => 'Number Of Posts Displayed', 'desc' => 'Number of posts to show', 'id' => 'author_posts', 'std' => '5', 'class' => 'mini', 'type' => 'text');
    $options[] = array('name' => 'Order Direction', 'desc' => 'Order posts in author page ', 'id' => 'author_posts_order_direction', 'std' => 'DESC', 'type' => 'select', 'options' => array('ASC' => 'Ascending', 'DESC' => 'Descending'));
    /* ========================================================================================================================
    
    			Post Page Options
    
    			======================================================================================================================== */
    $options[] = array('name' => 'Post Page', 'icon_name' => $imagepathinc . 'sub.png', 'class' => 'sub_heading', 'type' => 'heading');
    $options[] = array('name' => 'Style Posts', 'desc' => 'Choose the style of the posts', 'id' => 'style_posts', 'std' => 'fade', 'type' => 'radio', 'options' => array('singlestyle1' => 'Single Style1', 'singlestyle2' => 'Single Style2'));
    $options[] = array('name' => 'Post side Bar Settings', 'desc' => 'Select whether to setup layout settings for each post separately or globally through here', 'id' => 'post_sidebars_option', 'std' => 'meta', 'type' => 'radio', 'options' => array('meta' => 'Use settings from each post separetly (found in the meta box)', 'global' => 'Use global values set here (This will override meta post settings)'));
    $options[] = array('name' => "Post Global Sidebar position", 'desc' => "Please choose the preferred layout for post page (this will override meta settings)", 'id' => "post_layout", 'std' => "none", 'type' => "images", 'options' => array('none' => $imagepath . '/1col.png', 'left' => $imagepath . '/2cl.png', 'right' => $imagepath . '/2cr.png'));
    $options[] = array('name' => 'Post page Global Sidebar', 'desc' => 'Select the side bar you want to view in the post page (this will override meta settings)', 'id' => 'post_sidebar', 'type' => 'select', 'options' => $sideBarsArray);
    $options[] = array('name' => 'Default Post image', 'desc' => 'The image to show if post has no thumbnail (this will only work if post type is not none)', 'id' => 'post_default', 'std' => $imagepathinc . 'defaultImage.png', 'class' => 'theme_logo', 'type' => 'upload');
    $options[] = array('name' => 'Display Post image', 'desc' => 'View Post image/video/slider area', 'id' => 'post_view_image', 'class' => 'mini', 'std' => '1', 'type' => 'checkbox');
    $options[] = array('name' => 'Display Post author details', 'desc' => 'View About Author section', 'id' => 'post_author', 'class' => 'mini', 'std' => '1', 'type' => 'checkbox');
    $options[] = array('name' => 'Display Social Shares icons', 'desc' => 'View Social section', 'id' => 'post_social', 'class' => 'mini', 'std' => '1', 'type' => 'checkbox');
    $options[] = array('name' => 'Display Views Count', 'id' => 'post_views', 'class' => 'mini', 'std' => '1', 'type' => 'checkbox');
    $options[] = array('name' => 'Display Comments Count', 'id' => 'post_comments_count', 'class' => 'mini', 'std' => '1', 'type' => 'checkbox');
    $options[] = array('name' => 'Display related posts Section', 'desc' => 'Show related posts below the post', 'id' => 'post_related', 'class' => 'mini', 'std' => '1', 'type' => 'checkbox');
    $options[] = array('name' => 'Query related posts by', 'id' => 'post_related_query', 'std' => 'category', 'type' => 'select', 'options' => array('category' => 'Category', 'author' => 'Author'));
    $options[] = array('name' => 'Number of related posts to show', 'desc' => 'Type the number of related posts you want to show in this section. Please don&#39;t type (-1) as value', 'id' => 'post_related_number_of_posts', 'std' => '5', 'class' => 'mini', 'type' => 'text');
    $options[] = array('name' => 'Display Wordpress Comments Section', 'id' => 'post_comments_section', 'class' => 'mini', 'std' => '1', 'type' => 'checkbox');
    $options[] = array('name' => 'Display Facebook Comments Section', 'id' => 'post_facebook_comments_section', 'class' => 'mini', 'std' => '1', 'type' => 'checkbox');
    /* ========================================================================================================================
    
    			Sitemap Page Options
    
    			======================================================================================================================== */
    $options[] = array('name' => 'Sitemap Page', 'icon_name' => $imagepathinc . 'sub.png', 'class' => 'sub_heading', 'type' => 'heading');
    $options[] = array('name' => 'Show pages section', 'desc' => 'Show pages sections in the sitemap page', 'id' => 'show_pages_sitemap', 'class' => 'mini', 'std' => '1', 'type' => 'checkbox');
    $options[] = array('name' => 'Selected Pages', 'desc' => 'Select the pages you want', 'id' => 'site_map_selected_pages', 'type' => 'selectmultiple', 'options' => $pagesList);
    $options[] = array('name' => 'Show Categories section', 'desc' => 'Show Categories sections in the sitemap page', 'id' => 'show_categories_sitemap', 'class' => 'mini', 'std' => '1', 'type' => 'checkbox');
    $options[] = array('name' => 'Selected Categories', 'desc' => 'Select the Categories you want', 'id' => 'site_map_selected_categories', 'type' => 'selectmultiple', 'options' => $options_categories);
    $options[] = array('name' => 'Show posts section', 'desc' => 'Show posts sections in the sitemap page', 'id' => 'show_posts_sitemap', 'class' => 'mini', 'std' => '1', 'type' => 'checkbox');
    $options[] = array('name' => 'Selected Posts', 'desc' => 'Select the Posts you want', 'id' => 'site_map_selected_posts', 'type' => 'selectmultiple', 'options' => $postNames);
    $options = apply_filters('circleflip_theme_options_pages_settings', $options);
    /* ========================================================================================================================
    
    			Sliders Page Options
    
    			======================================================================================================================== */
    $options[] = array('name' => 'Sliders Settings', 'icon_name' => $imagepathinc . 'pages.png', 'type' => 'heading');
    /* ========================================================================================================================
    
    			Create Slider
    
    			======================================================================================================================== */
    $options[] = array('name' => 'Create New Slider', 'icon_name' => $imagepathinc . 'sub.png', 'class' => 'sub_heading', 'type' => 'heading');
    $options[] = array('name' => 'Create Slider', 'id' => 'create_slider', 'type' => 'create_slider');
    /* ========================================================================================================================
    
    			All Sliders
    
    			======================================================================================================================== */
    foreach (cr_get_option('create_slider', array()) as $key => $value) {
        if (circleflip_valid($value)) {
            $options[] = array('name' => $value . ' Settings', 'icon_name' => $imagepathinc . 'sub.png', 'class' => 'sub_heading', 'type' => 'heading');
            $value = strtolower(str_replace(' ', '_', $value));
            $options[] = array('name' => 'Slider Type', 'id' => $value . 'select_slider', 'desc' => 'Choose Your Slider', 'class' => 'choose_slider', 'type' => 'select', 'options' => array('nivo_slider' => 'Nivo Slider', 'threed_slider' => '3D Slider', 'accordion' => 'Accordion Slider', 'elastic_slider' => 'Elastic Slider', 'vertical_accordion_slider' => 'Vertical Accordion Slider'));
            $options[] = array('name' => 'Slider Settings', 'desc' => 'Add/Remove any slide and click Save Changes to take effect.', 'std' => 1, 'id' => $value, 'type' => 'add_slide', 'slider_items' => array(0 => array('name' => 'Title', 'desc' => 'Enter the slide title', 'id' => $value . '_title', 'class' => 'title', 'std' => 'Title', 'type' => 'text'), 1 => array('name' => 'Text', 'desc' => 'Enter the slide text', 'id' => $value . '_text', 'class' => 'text', 'std' => 'Text', 'type' => 'text'), 2 => array('name' => 'Radio Button', 'desc' => 'Select whether to setup layout settings for each post separately or globally through here', 'id' => $value . '_radio', 'class' => 'radio', 'std' => 'meta', 'type' => 'radio', 'options' => array('meta' => 'Use settings from each post separetly (found in the meta box)', 'global' => 'Use global values set here (This will override meta post settings)')), 3 => array('name' => 'Upper Area Sidebar', 'desc' => 'Select the side bar you want to view in the upper area of the page', 'id' => $value . '_select', 'class' => 'select', 'type' => 'select', 'options' => array('Option_1' => 'Option 1', 'Option_2' => 'Option 2', 'Option_3' => 'Option 3', 'Option_4' => 'Option 4')), 4 => array('name' => 'Slide Image', 'desc' => 'Add Your Image', 'id' => $value . '_image', 'class' => 'slide_image image', 'std' => '', 'type' => 'upload'), 5 => array('name' => 'Slide Thumbnail', 'desc' => 'Add Your Thumbnail Image', 'id' => $value . '_thumb', 'class' => 'slide_image thumb', 'std' => '', 'type' => 'upload'), 6 => array('name' => 'Link', 'desc' => 'Enter the slide link', 'id' => $value . '_link', 'class' => 'slide_link link', 'std' => '', 'type' => 'text'), 7 => array('name' => 'Title Font', 'id' => $value . '_font_title', 'std' => array('size' => '22px', 'face' => 'BebasNeueRegular', 'style' => 'Normal', 'color' => '#b57e65', 'weight' => 'Normal'), 'class' => 'titleFont', 'type' => 'typography', 'options' => $typography_options), 8 => array('name' => 'Text Font', 'id' => $value . '_font_text', 'std' => array('size' => '22px', 'face' => 'BebasNeueRegular', 'style' => 'Normal', 'color' => '#b57e65', 'weight' => 'Normal'), 'class' => 'textFont', 'type' => 'typography', 'options' => $typography_options), 9 => array('name' => 'button1Text', 'desc' => 'Enter button 1 text', 'id' => $value . '_button1', 'class' => 'button1', 'std' => 'Text', 'type' => 'text'), 10 => array('name' => 'button1Link', 'desc' => 'Enter button 1 Link', 'id' => $value . '_button1link', 'class' => 'button1link', 'std' => 'Text', 'type' => 'text'), 11 => array('name' => 'button2Text', 'desc' => 'Enter button 2 text', 'id' => $value . '_button2', 'class' => 'button2', 'std' => 'Text', 'type' => 'text'), 12 => array('name' => 'button2Link', 'desc' => 'Enter button 2 Link', 'id' => $value . '_button2link', 'class' => 'button2link', 'std' => 'Text', 'type' => 'text'), 13 => array('name' => 'button3Text', 'desc' => 'Enter button 3 text', 'id' => $value . '_button3', 'class' => 'button3', 'std' => 'Text', 'type' => 'text'), 14 => array('name' => 'button3Link', 'desc' => 'Enter button 3 Link', 'id' => $value . '_button3link', 'class' => 'button3link', 'std' => 'Text', 'type' => 'text')));
        }
    }
    /* ========================================================================================================================
    
    Style Settings Tab
    
    ======================================================================================================================== */
    $options[] = array('name' => 'Style Settings', 'icon_name' => $imagepathinc . 'style.png', 'type' => 'heading');
    /* ========================================================================================================================
    
    			Style Settings Tab
    
    			======================================================================================================================== */
    $options[] = array('name' => 'General Style', 'icon_name' => $imagepathinc . 'sub.png', 'class' => 'sub_heading', 'type' => 'heading');
    $options[] = array('name' => 'Template Color', 'desc' => 'Select the template color you want', 'id' => 'template_color', 'type' => 'select', 'std' => 'red', 'options' => array('red' => 'Red (Default)', 'light_red' => 'Light Red', 'blue' => 'Blue', 'green' => 'Green', 'purple' => 'Purple', 'dark_blue' => 'Dark Blue', 'orange' => 'Orange', 'pink' => 'Pink', 'grey' => 'Grey', 'yellow' => 'Yellow', 'brown' => 'Brown', 'custom' => 'Custom'));
    $options[] = array('name' => 'Colored Elements Color (Theme Color)', 'desc' => 'Applied to Tabs, tags hover,etc ', 'id' => 'color_elements', 'std' => '#e32831', 'type' => 'color');
    $options[] = array('name' => 'Colored Elements Color (Darker Color)', 'desc' => 'This color is usually darker than theme color.', 'id' => 'color_elements_dark', 'std' => '#b92424', 'type' => 'color');
    $options[] = array('name' => 'H1 Font, size and color', 'id' => "h1", 'std' => array('size' => '24px', 'face' => 'sourceSans', 'style' => 'Normal', 'color' => '#2a2a2a', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    $options[] = array('name' => 'H2 Font, size and color', 'id' => "h2", 'std' => array('size' => '22px', 'face' => 'sourceSans', 'style' => 'Normal', 'color' => '#2a2a2a', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    $options[] = array('name' => 'H3 Font, size and color', 'id' => "h3", 'std' => array('size' => '20px', 'face' => 'sourceSans', 'style' => 'Normal', 'color' => '#2a2a2a', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    $options[] = array('name' => 'H4 Font, size and color', 'id' => "h4", 'std' => array('size' => '18px', 'face' => 'sourceSans', 'style' => 'Normal', 'color' => '#2a2a2a', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    $options[] = array('name' => 'H5 Font, size and color', 'id' => "h5", 'std' => array('size' => '16px', 'face' => 'sourceSans', 'style' => 'Normal', 'color' => '#2a2a2a', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    $options[] = array('name' => 'H6 Font, size and color', 'id' => "h6", 'std' => array('size' => '14px', 'face' => 'sourceSans', 'style' => 'Normal', 'color' => '#2a2a2a', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    $options[] = array('name' => 'Paragraphs', 'desc' => 'Custom typography options.', 'id' => "paragraphs", 'std' => array('size' => '13px', 'face' => 'sourceSans', 'style' => 'Normal', 'color' => '#5a5a5a', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    /* ========================================================================================================================
    
    			Header Style Options
    
    			======================================================================================================================== */
    $options[] = array('name' => 'Header Style', 'icon_name' => $imagepathinc . 'sub.png', 'class' => 'sub_heading', 'type' => 'heading');
    $options[] = array('name' => 'Menu Typography', 'id' => 'header_menu_typography', 'std' => array('size' => '15px', 'face' => 'sourceSans', 'style' => 'Normal', 'color' => '#5a5a5a', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    $options[] = array('name' => 'Breaking Title', 'id' => 'header_breaking_title_typography', 'std' => array('size' => '17px', 'face' => 'SourceSansSemiBold', 'style' => 'Normal', 'color' => '#ffffff', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    $options[] = array('name' => 'Breaking Text', 'id' => 'header_breaking_text_typography', 'std' => array('size' => '12px', 'face' => 'sourceSans', 'style' => 'Normal', 'color' => '#ffffff', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    /*========================================================================================================================
    
    			Footer Style Options
    
    			======================================================================================================================== */
    $options[] = array('name' => 'Footer Widgets Style', 'icon_name' => $imagepathinc . 'sub.png', 'class' => 'sub_heading', 'type' => 'heading');
    $options[] = array('name' => 'Footer Title Typography', 'id' => 'footer_title_style', 'std' => array('size' => '22px', 'face' => 'sourceSans', 'style' => 'Normal', 'color' => '#ffffff', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    $options[] = array('name' => 'Footer Text Typography', 'id' => 'footer_text_style', 'std' => array('size' => '12px', 'face' => 'sourceSans', 'style' => 'Normal', 'color' => '#d5d5d5', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    /* ========================================================================================================================
    
    			Widgets Style Options
    
    			======================================================================================================================== */
    $options[] = array('name' => 'Sidebar Widgets Style', 'icon_name' => $imagepathinc . 'sub.png', 'class' => 'sub_heading', 'type' => 'heading');
    $options[] = array('name' => 'Widget Title Typography', 'id' => 'widget_title_typography', 'std' => array('size' => '22px', 'face' => 'sourceSans', 'style' => 'Normal', 'color' => '#2a2a2a', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    $options[] = array('name' => 'Widget Text Typography', 'id' => 'widget_text_typography', 'std' => array('size' => '14px', 'face' => 'sourceSans', 'style' => 'Normal', 'color' => '#5a5a5a', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    /* ========================================================================================================================
    
    			Sitemap Page Style Options
    
    			======================================================================================================================== */
    $options[] = array('name' => 'SiteMap Page ', 'icon_name' => $imagepathinc . 'sub.png', 'class' => 'sub_heading', 'type' => 'heading');
    $options[] = array('name' => 'SiteMap Title Style', 'desc' => '', 'id' => 'sitemap_title', 'std' => array('size' => '28px', 'face' => 'SourceSansSemiBold', 'style' => 'Normal', 'color' => '#333333', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    $options[] = array('name' => 'SiteMap Text', 'id' => 'sitemap_text', 'std' => array('size' => '18px', 'face' => 'SourceSansSemiBold', 'style' => 'Normal', 'color' => '#ffffff', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    /* ========================================================================================================================
    
    			Layout & Background
    
    			======================================================================================================================== */
    $options[] = array('name' => __('Layout & Background', 'options_framework_theme'), 'icon_name' => $imagepathinc . 'sub.png', 'class' => 'sub_heading', 'type' => 'heading');
    $options[] = array('name' => 'Boxed Layout', 'desc' => 'To enable the boxed layout, mark this option', 'id' => 'boxedlayout', 'class' => 'mini', 'std' => '', 'type' => 'checkbox');
    $options[] = array('name' => 'Page background color', 'desc' => 'Applied to body', 'id' => 'body_color', 'std' => '#fff', 'type' => 'color');
    $options[] = array('name' => __('Upload page background', 'options_framework_theme'), 'desc' => __('Upload page background , including patterns, wide images or select one of the patterns below. ', 'options_framework_theme'), 'id' => 'custom_pattern', 'std' => '', 'type' => 'upload');
    $options[] = array('name' => __("Background pattern", 'options_framework_theme'), 'desc' => __("For all pages of the website", 'options_framework_theme'), 'id' => "featured_pattern", 'std' => "", 'class' => "sidebarPosition featuredPatterns", 'type' => "images", 'options' => array('p1' => $imagepath . 'patterns/p1.png', 'p2' => $imagepath . 'patterns/p2.png', 'p3' => $imagepath . 'patterns/p3.png', 'p4' => $imagepath . 'patterns/p4.png', 'p5' => $imagepath . 'patterns/p5.png'));
    $options[] = array('name' => 'Background type', 'desc' => 'To enable background patterns, mark this option', 'id' => 'pattern_check', 'class' => 'mini', 'std' => '1', 'type' => 'checkbox');
    /* ========================================================================================================================
    			
    			RTL Style Settings Tab
    			
    			======================================================================================================================== */
    $options[] = array('name' => 'RTL Style Settings', 'icon_name' => $imagepathinc . 'style.png', 'type' => 'heading');
    /* ========================================================================================================================
    
    			Style Settings Tab
    
    			======================================================================================================================== */
    $options[] = array('name' => 'RTL General Style', 'icon_name' => $imagepathinc . 'sub.png', 'class' => 'sub_heading', 'type' => 'heading');
    $options[] = array('name' => 'Template Color', 'desc' => 'Select the template color you want', 'id' => 'rtl_template_color', 'type' => 'select', 'std' => 'red', 'options' => array('red' => 'Red (Default)', 'light_red' => 'Light Red', 'blue' => 'Blue', 'green' => 'Green', 'purple' => 'Purple', 'dark_blue' => 'Dark Blue', 'orange' => 'Orange', 'pink' => 'Pink', 'grey' => 'Grey', 'yellow' => 'Yellow', 'brown' => 'Brown', 'custom' => 'Custom'));
    $options[] = array('name' => 'Contact info', 'desc' => 'Write a brief for your contact info to appear in the header', 'id' => 'rtl_header_contact_settings', 'std' => 'test', 'type' => "text");
    $options[] = array('name' => 'Contact Link', 'desc' => 'where do you want to link your contact text', 'id' => 'rtl_header_contact_link_settings', 'std' => '', 'type' => "text");
    $options[] = array('name' => 'Logo Builder', 'desc' => 'Preferred Logo Size is 194px X 90px ', 'id' => 'rtl_theme_logo', 'std' => '', 'class' => 'theme_logo', 'type' => 'upload');
    $options[] = array('name' => 'Colored Elements Color (Theme Color)', 'desc' => 'Applied to Tabs, tags hover,etc ', 'id' => 'rtl_color_elements', 'std' => '#e32831', 'type' => 'color');
    $options[] = array('name' => 'Colored Elements Color (Darker Color)', 'desc' => 'This color is usually darker than theme color.', 'id' => 'rtl_color_elements_dark', 'std' => '#b92424', 'type' => 'color');
    $options[] = array('name' => 'H1 Font, size and color', 'id' => "rtl_h1", 'std' => array('size' => '24px', 'face' => 'sourceSans', 'style' => 'Normal', 'color' => '#2a2a2a', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    $options[] = array('name' => 'H2 Font, size and color', 'id' => "rtl_h2", 'std' => array('size' => '22px', 'face' => 'sourceSans', 'style' => 'Normal', 'color' => '#2a2a2a', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    $options[] = array('name' => 'H3 Font, size and color', 'id' => "rtl_h3", 'std' => array('size' => '20px', 'face' => 'sourceSans', 'style' => 'Normal', 'color' => '#2a2a2a', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    $options[] = array('name' => 'H4 Font, size and color', 'id' => "rtl_h4", 'std' => array('size' => '18px', 'face' => 'sourceSans', 'style' => 'Normal', 'color' => '#2a2a2a', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    $options[] = array('name' => 'H5 Font, size and color', 'id' => "rtl_h5", 'std' => array('size' => '16px', 'face' => 'sourceSans', 'style' => 'Normal', 'color' => '#2a2a2a', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    $options[] = array('name' => 'H6 Font, size and color', 'id' => "rtl_h6", 'std' => array('size' => '14px', 'face' => 'sourceSans', 'style' => 'Normal', 'color' => '#2a2a2a', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    $options[] = array('name' => 'Paragraphs', 'desc' => 'Custom typography options.', 'id' => "rtl_paragraphs", 'std' => array('size' => '13px', 'face' => 'sourceSans', 'style' => 'Normal', 'color' => '#5a5a5a', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    /* ========================================================================================================================
    
    			Header Style Options
    
    			======================================================================================================================== */
    $options[] = array('name' => 'RTL Header Style', 'icon_name' => $imagepathinc . 'sub.png', 'class' => 'sub_heading', 'type' => 'heading');
    $options[] = array('name' => 'Menu Typography', 'id' => 'rtl_header_menu_typography', 'std' => array('size' => '15px', 'face' => 'museo_slab500', 'style' => 'Normal', 'color' => '#5a5a5a', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    $options[] = array('name' => 'Breaking Title', 'id' => 'rtl_header_breaking_title_typography', 'std' => array('size' => '17px', 'face' => 'museo_slab500', 'style' => 'Normal', 'color' => '#ffffff', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    $options[] = array('name' => 'Breaking Text', 'id' => 'rtl_header_breaking_text_typography', 'std' => array('size' => '12px', 'face' => 'OpenSansRegular', 'style' => 'Normal', 'color' => '#ffffff', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    /*========================================================================================================================
    
    			Footer Style Options
    
    			======================================================================================================================== */
    $options[] = array('name' => 'RTL Footer Widgets Style', 'icon_name' => $imagepathinc . 'sub.png', 'class' => 'sub_heading', 'type' => 'heading');
    $options[] = array('name' => 'Footer Title Typography', 'id' => 'rtl_footer_title_style', 'std' => array('size' => '16px', 'face' => 'OpenSansBold', 'style' => 'Normal', 'color' => '#ffffff', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    $options[] = array('name' => 'Footer Text Typography', 'id' => 'rtl_footer_text_style', 'std' => array('size' => '16px', 'face' => 'OpenSansBold', 'style' => 'Normal', 'color' => '#ffffff', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    /* ========================================================================================================================
    
    			Widgets Style Options
    
    			======================================================================================================================== */
    $options[] = array('name' => 'RTL Sidebar Widgets Style', 'icon_name' => $imagepathinc . 'sub.png', 'class' => 'sub_heading', 'type' => 'heading');
    $options[] = array('name' => 'Widget Title Typography', 'id' => 'rtl_widget_title_typography', 'std' => array('size' => '14px', 'face' => 'sourceSans', 'style' => 'Normal', 'color' => '#2a2a2a', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    $options[] = array('name' => 'Widget Text Typography', 'id' => 'rtl_widget_text_typography', 'std' => array('size' => '12px', 'face' => 'sourceSans', 'style' => 'Normal', 'color' => '#5a5a5a', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    /* ========================================================================================================================
    
    			Sitemap Page Style Options
    
    			======================================================================================================================== */
    $options[] = array('name' => 'RTL SiteMap Page ', 'icon_name' => $imagepathinc . 'sub.png', 'class' => 'sub_heading', 'type' => 'heading');
    $options[] = array('name' => 'SiteMap Title Style', 'desc' => '', 'id' => 'rtl_sitemap_title', 'std' => array('size' => '40px', 'face' => 'OpenSansExtrabold', 'style' => 'Normal', 'color' => '#333333', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    $options[] = array('name' => 'SiteMap Text', 'id' => 'rtl_sitemap_text', 'std' => array('size' => '26px', 'face' => 'OpenSansExtrabold', 'style' => 'Normal', 'color' => '#ffffff', 'weight' => 'Normal'), 'type' => 'typography', 'options' => $typography_options);
    /* ========================================================================================================================
    
    Sidebars Tab
    
    ======================================================================================================================== */
    $options[] = array('name' => 'Sidebars', 'icon_name' => $imagepathinc . 'sidebars.png', 'type' => 'heading');
    $options[] = array('name' => 'Custom Sidebars', 'desc' => 'Add/Remove any sidebar and click Save Changes to take effect.', 'std' => '', 'id' => 'sidebars', 'type' => 'cust_sidebars');
    /* ========================================================================================================================
    
    Fonts Tab
    
    ======================================================================================================================== */
    $options[] = array('name' => 'Page Builder Fonts', 'icon_name' => $imagepathinc . 'sidebars.png', 'type' => 'heading');
    $options[] = array('name' => 'Custom Fonts', 'desc' => 'Add/Remove any font and click Save Changes to take effect.', 'std' => '', 'id' => 'cust_font', 'type' => 'cust_font');
    /* ========================================================================================================================
    
    WooCommerce Tab
    
    ======================================================================================================================== */
    $options[] = array('name' => 'WooCommerce settings', 'icon_name' => $imagepathinc . 'pages.png', 'type' => 'heading');
    $options[] = array('name' => 'do you want a masonry shop?', 'desc' => 'check to enable masonry shop', 'id' => 'woocommerce_masonry', 'class' => 'mini', 'std' => '0', 'type' => 'checkbox');
    $options[] = array('name' => 'Enable sidebar in shop page', 'id' => 'woocommerce_shop_sidebar', 'class' => 'mini', 'std' => '1', 'type' => 'checkbox');
    $options[] = array('name' => 'Enable sidebar in product page', 'id' => 'woocommerce_product_sidebar', 'class' => 'mini', 'std' => '0', 'type' => 'checkbox');
    /* ========================================================================================================================
    
    Maintainance Tab
    
    ======================================================================================================================== */
    $options[] = array('name' => 'Maintainance Page', 'icon_name' => $imagepathinc . 'contact.png', 'type' => 'heading');
    $options[] = array('name' => 'Maintainance Logo Uploader', 'desc' => 'Upload your Maintainance Logo here', 'id' => 'maintainance_logo', 'std' => '', 'type' => 'upload');
    $options[] = array('name' => 'Maintainance Background Uploader', 'desc' => 'Upload your Maintainance Background here', 'id' => 'maintainance_background', 'std' => '', 'type' => 'upload');
    $options[] = array('name' => 'Maintainance Page Title', 'desc' => 'Enter the title of the maintanance page', 'std' => 'Our Website is Almost Ready', 'id' => 'maintainance_page_title', 'type' => 'text');
    $options[] = array('name' => 'Maintainance Page Count Down Title', 'desc' => 'Enter the title of the Count Down', 'std' => 'Time left till Launch', 'id' => 'maintainance_page_countdown_title', 'type' => 'text');
    $options[] = array('name' => 'Maintainance Page Facebook Link', 'desc' => 'Enter the link of the facebook page', 'std' => 'http://www.facebook.com', 'id' => 'maintainance_page_facebook_link', 'type' => 'text');
    $options[] = array('name' => 'Maintainance Page Twitter Link', 'desc' => 'Enter the link of the Twitter page', 'std' => 'http://www.twitter.com', 'id' => 'maintainance_page_twitter_link', 'type' => 'text');
    $options[] = array('name' => 'Maintainance Page LinkedIn Link', 'desc' => 'Enter the link of the LinkedIn page', 'std' => 'http://www.linkedin.com', 'id' => 'maintainance_page_linkedin_link', 'type' => 'text');
    $options[] = array('name' => 'Maintainance Page Google Plus Link', 'desc' => 'Enter the link of the Google Plus page', 'std' => 'http://www.plus.google.com', 'id' => 'maintainance_page_google_link', 'type' => 'text');
    $options[] = array('name' => 'Maintainance Page Youtube Link', 'desc' => 'Enter the link of the Youtube page', 'std' => 'http://www.youtube.com', 'id' => 'maintainance_page_youtube_link', 'type' => 'text');
    $options[] = array('name' => 'Maintainance Page Dribbble Link', 'desc' => 'Enter the link of the Dribbble page', 'std' => 'http://www.dribbble.com', 'id' => 'maintainance_page_dribbble_link', 'type' => 'text');
    $options[] = array('name' => 'Maintainance Page Forrst Link', 'desc' => 'Enter the link of the Forrst page', 'std' => 'http://www.forrst.com', 'id' => 'maintainance_page_forrst_link', 'type' => 'text');
    $options[] = array('name' => 'Maintainance Page Behance Link', 'desc' => 'Enter the link of the Behance page', 'std' => 'http://www.behance.com', 'id' => 'maintainance_page_behance_link', 'type' => 'text');
    $options[] = array('name' => 'Maintainance Page Picasa Link', 'desc' => 'Enter the link of the Picasa page', 'std' => 'http://www.picasa.com', 'id' => 'maintainance_page_picasa_link', 'type' => 'text');
    $options[] = array('name' => 'Maintainance Page Pinterest Link', 'desc' => 'Enter the link of the Pinterest page', 'std' => 'http://www.pinterest.com', 'id' => 'maintainance_page_pinterest_link', 'type' => 'text');
    $options[] = array('name' => 'Maintainance Page Flickr Link', 'desc' => 'Enter the link of the Flickr page', 'std' => 'http://www.flickr.com', 'id' => 'maintainance_page_flickr_link', 'type' => 'text');
    $options[] = array('name' => 'Maintainance Page Know More Text', 'desc' => 'Enter the text of the Know More', 'std' => '+ Know More', 'id' => 'maintainance_page_knowmore', 'type' => 'text');
    $options[] = array('name' => 'Maintainance Page Know More Title', 'desc' => 'Enter the Title of the Know More Page', 'std' => 'About CircleFlip', 'id' => 'maintainance_page_knowmore_title', 'type' => 'text');
    $options[] = array('name' => 'Maintainance Page Know More Paragraph', 'desc' => 'Enter the Paragraph of the Know More Page', 'std' => 'Quisque sagittis turpis leo, id tempus elit ullamcorper vitae. Suspendisse iaculis dui a enim fringilla condimentum. Cras id euismod ligula. Aenean hendrerit commodo velit at pulvinar. Praesent vestibulum quam sed pretium placerat. Aenean porttitor a turpis nec dapibus. Pellentesque sodales commodo nibh, id tincidunt magna consectetur venenatis. Curabitur tempor, tellus eu scelerisque dignissim, mauris libero venenatis metus, vitae tincidunt diam lectus quis justo. Vivamus eget massa faucibus, fringilla nisl vel, gravida ipsum. Nunc pharetra sodales urna, sit amet rhoncus sapien malesuada quis. Maecenas augue turpis, luctus sed purus a, lobortis eleifend sapien.', 'id' => 'maintainance_page_knowmore_paragraph', 'type' => 'text');
    $options[] = array('name' => 'Maintainance Page Know More Mail', 'desc' => 'Enter the Mail of the Know More Page', 'std' => '*****@*****.**', 'id' => 'maintainance_page_knowmore_mail', 'type' => 'text');
    $options[] = array('name' => 'Maintainance Page Know More Phone', 'desc' => 'Enter the Phone of the Know More Page', 'std' => '+ 00 123 456 789 0', 'id' => 'maintainance_page_knowmore_phone', 'type' => 'text');
    $options[] = array('name' => 'Maintainance Page Know More Fax', 'desc' => 'Enter the Fax of the Know More Page', 'std' => '+ 00 123 456 789 0', 'id' => 'maintainance_page_knowmore_fax', 'type' => 'text');
    /* ========================================================================================================================
    
    Backup & Restore Tab
    
    ======================================================================================================================== */
    $options[] = array('name' => 'Backup & Restore', 'icon_name' => $imagepathinc . 'importexport.png', 'type' => 'heading');
    $backup = get_option('rojo_backups', array());
    $backup_log = isset($backup['backup_log']) ? $backup['backup_log'] : 'no backup available';
    $options[] = array('id' => 'backup-options', 'text' => 'Backup', 'desc' => "<p id='backup_log'>" . $backup_log . "</p>", 'type' => 'button');
    $options[] = array('id' => 'restore-options', 'text' => 'Restore', 'type' => 'button');
    $options[] = array('name' => 'Export Options', 'id' => 'export_data', 'type' => 'export-options');
    $options[] = array('name' => 'Import Options', 'id' => 'import_data', 'type' => 'import_options');
    return apply_filters('circleflip_theme_options', $options);
}
Beispiel #3
0
        if (circleflip_valid($sidebar) && in_array($sidebar, $sidebars)) {
            dynamic_sidebar($sidebar);
        }
    } else {
        $post_custom_values = get_post_custom_values('_sidebar', $post->ID);
        if (!empty($post_custom_values) && isset($post_custom_values)) {
            $sidebar = array_shift($post_custom_values);
            $sidebars = cr_get_option('sidebars', array());
            if (circleflip_valid($sidebar) && in_array($sidebar, $sidebars)) {
                dynamic_sidebar($sidebar);
            }
        }
    }
    ?>
					</ul>
				</aside>
			</section>
		<?php 
}
if (!circleflip_valid($builder_data) || $position_class == 'left' || $position_class == 'right') {
    ?>
		</div>
		<!-- Page Container -->
	<?php 
}
?>

	<?php 
get_footer();
/* End of file page.php */
/* Location: ./wp-content/themes/circleflip/page.php */
Beispiel #4
0
function circleflip_my_login_logo()
{
    global $rojoOptions;
    if (circleflip_valid('login_image')) {
        ?>
			<style type="text/css">
				body.login div#login h1 a {
					background-image: url(<?php 
        echo esc_url(cr_get_option('login_image'));
        ?>
);
					padding-bottom: 30px;
					background-size: initial;
					width: auto;
				}
			</style>
			<?php 
    }
}
Beispiel #5
0
 * @author		Creiden
 * @package		Circleflip
 * @since		1.0.0	- 05.02.2012
 */
tha_sidebars_before();
?>
<section id="secondary" class="widget-area span4" role="complementary">
	<?php 
tha_sidebar_top();
if (have_posts()) {
    while (have_posts()) {
        the_post();
        $post_custom_values = get_post_custom_values('_sidebar', $post->ID);
        if (!empty($post_custom_values) && isset($post_custom_values)) {
            $sidebar = array_shift($post_custom_values);
            $sidebars = cr_get_option('sidebars', array());
            if (circleflip_valid($sidebar) && circleflip_valid($sidebars)) {
                if (in_array($sidebar, $sidebars)) {
                    dynamic_sidebar($sidebar);
                }
            }
        }
    }
}
tha_sidebar_bottom();
?>
</section><!-- #secondary .widget-area -->
<?php 
tha_sidebars_after();
/* End of file sidebar.php */
/* Location: ./wp-content/themes/circleflip/sidebar.php */
    function render_blocks_view($header_name, $blocks_children = array())
    {
        global $header_registered_blocks;
        if (!circleflip_valid($blocks_children)) {
            $blocks = get_option($header_name, array());
            $blocks = $this->prepare_blocks_array($blocks, $header_name);
        } else {
            $blocks = $blocks_children;
        }
        // circleflip_print_a($blocks);
        $settings = array();
        if (isset($blocks['settings'])) {
            $settings = $blocks['settings'];
            switch ($blocks['settings']['header_type']) {
                case 0:
                    $header_type = 'defaultHeader ';
                    break;
                case 1:
                    $header_type = 'sideHeader ';
                    break;
                case 2:
                    $header_type = 'overlayedHeader ';
                    break;
                default:
                    break;
            }
            switch ($settings['header_content_color']) {
                case 0:
                    $content_color_settings = 'lightContent ';
                    break;
                case 1:
                    $content_color_settings = 'darkContent ';
                    break;
                default:
                    $content_color_settings = 'lightContent ';
                    break;
            }
            $bgColor = $this->hex2RGB($settings['bgColor']);
            $rgba = 'rgba(' . $bgColor['red'] . ',' . $bgColor['green'] . ',' . $bgColor['blue'] . ',' . $settings['opacity'] / 100 . ')';
            ?>
			<header class="<?php 
            echo esc_attr($header_type);
            if (is_user_logged_in()) {
                echo 'adminTop';
            }
            ?>
" <?php 
            echo 'style="background-color: ' . esc_attr($rgba) . '"';
            //if ($settings['header_type'] == 2){echo 'style="background-color: '.$rgba.'"'; };
            ?>
 content-color="<?php 
            echo esc_attr($content_color_settings);
            ?>
">
			<?php 
        }
        if ($blocks) {
            foreach ($blocks as $key => $block) {
                if (isset($block['id_base'])) {
                    // circleflip_print_a($settings);
                    if (!isset($block['is_row'])) {
                        // renders the blocks
                        echo $header_registered_blocks[$block['id_base']]->block($block);
                    } else {
                        // renders the row
                        echo $header_registered_blocks[$block['id_base']]->block($block, $settings);
                    }
                }
            }
        }
        if (isset($blocks['settings'])) {
            ?>
		</header>
		<?php 
        }
    }
    function block($instance)
    {
        extract($instance);
        $titleIconClass;
        switch ($titleIcon) {
            case 0:
                $titleIconClass = 'withoutIcon';
                break;
            case 1:
                $titleIconClass = 'withIcon';
                break;
            default:
                $titleIconClass = 'withoutIcon';
        }
        $titleIconHead = '';
        if ($titleIconClass == 'withIcon') {
            $iconHead;
            if (defined("ICL_LANGUAGE_CODE") && "ar" === ICL_LANGUAGE_CODE) {
                $iconHead = "icon-left-open-mini";
            } else {
                $iconHead = "icon-right-open-mini";
            }
            $titleIconHead = '<div class="headerDot"><span class="' . esc_attr($iconHead) . '"></span></div>';
        }
        $this->imageSlider();
        ?>

			<?php 
        $display = '';
        if ($displayButton == 0) {
            $display = 'noBtn';
        } else {
            $display = 'existBtn';
        }
        ?>
			<div class="imageSlider_carousel <?php 
        echo esc_attr($display);
        ?>
">
				<div class="titleBlock" style="<?php 
        echo circleflip_valid($title_block) ? '' : 'height: 54px;';
        ?>
">
					<?php 
        if (circleflip_valid($title_block)) {
            ?>
						<h3><?php 
            echo $titleIconHead . esc_html($title_block);
            ?>
</h3>
					<?php 
        }
        ?>
					<?php 
        if ($display == 'existBtn') {
            ?>
					<div class="imageSlider right">
						<a class="left carousel-control" href="#" style="display: block ">
							<span class="icon-prev"></span>
						</a>
						<a class="right carousel-control" href="#" style="display: block ">
							<span class="icon-next"></span>
						</a>
					</div>
					<?php 
        }
        ?>
				</div>

				  <!-- Wrapper for slides -->
				  <div class="imgCarouselWrap">
				  	<ul>
					  	<?php 
        $i = 0;
        ?>
					  	<?php 
        foreach ($tabs as $tab) {
            ?>
						<li class="<?php 
            if ($i++ == 0) {
                echo 'active';
            }
            ?>
">
							<?php 
            echo wp_get_attachment_image($tab['imagesrc'], 'full');
            ?>
						</li>
					    <?php 
        }
        ?>
				    </ul>
				  </div>

				  <!-- Controls -->
			</div>
			<?php 
    }
    function block($instance)
    {
        extract($instance);
        $this->masonry_Posts();
        add_filter('circleflip_post_format_gallery_html', 'circleflip_gallery_masonaryformat', 10, 5);
        add_filter('circleflip_post_format_standard_html', 'circleflip_standard_masonaryformat', 10, 5);
        add_filter('circleflip_post_format_video_html', 'circleflip_video_masonaryformat', 10, 5);
        add_filter('circleflip_post_format_audio_html', 'circleflip_audio_masonaryformat', 10, 5);
        add_filter('circleflip_post_format_media_size', 'circleflip_full_video_size', 10, 5);
        add_filter('circleflip_post_format_meta', 'circleflip_gallery_layout', 10, 5);
        /*
         * Latest Posts - Popular - Selected Posts
         * Blog Posts - Portfolio
         * with Latest or Popular (Selected Categories Multiple Select)
         * Order -> Ascending or descending
         * Number of Posts
         */
        switch ($post_type) {
            // Latest
            case '0':
                $args = array('posts_per_page' => $post_number, 'cat' => isset($post_selected_cats) ? implode(',', $post_selected_cats) : '', 'post_type' => 'post', 'orderby' => 'date', 'order' => 'DESC', 'post_status' => 'publish');
                break;
                // Popular
            // Popular
            case '1':
                global $wpdb;
                $args = array('posts_per_page' => $post_number, 'post_type' => 'post', 'orderby' => 'post__in', 'post_status' => 'publish', 'cat' => isset($post_selected_cats) ? implode(',', $post_selected_cats) : '', 'post__in' => $wpdb->get_col("SELECT post_id, COUNT(*) as total FROM views_count WHERE 1 = 1 GROUP BY post_id ORDER BY total {$post_order}"), 'order' => 'DESC');
                break;
                // Selected Posts
            // Selected Posts
            case '2':
                if (circleflip_valid($post_selected_posts)) {
                    $selectedPosts = implode(",", $post_selected_posts);
                } else {
                    $selectedPosts = '';
                }
                $args = array('include' => $selectedPosts, 'orderby' => 'date', 'order' => 'DESC');
                break;
            default:
                break;
        }
        $output = circleflip_query($args);
        switch ($type) {
            case '0':
                $layout = 'span4';
                break;
            case '1':
                $layout = 'span3';
                break;
            default:
                $layout = 'span4';
                break;
        }
        if ($output) {
            ?>
			<div class="masonary">
				<div class="dotHeader"></div>
				<div class="titleBlock"><h3><?php 
            echo esc_html($title);
            ?>
</h3></div>
			</div>
			<div class="row masonryRow">
				<div class="loading_portfolio"></div>
				<div class="masonryContainer clearfix">
					<?php 
            foreach ($output as $post) {
                setup_postdata($post);
                ?>
				  <div class="masonryItem <?php 
                echo esc_attr($layout);
                ?>
">
				  	<div class="masonryItemInner">
						<?php 
                echo circleflip_get_post_format_media($post->ID, 'masonry_post', 'my_unique_masonary_posts');
                ?>
				  	</div>
				  </div>

				<?php 
            }
            echo '</div></div>';
        }
        circleflip_end_query();
    }
                                                                        <option value="PageLayoutsStyle4"><?php 
_e('Two Sidebars Page', 'circleflip-builder');
?>
</option>
                                                                        <option value="PageLayoutsStyle5"><?php 
_e('Two Sidebars on the Same Side Page', 'circleflip-builder');
?>
</option>
                                                                        <option value="PageLayoutsStyle6"><?php 
_e('No Sidebar Page (Full Width)', 'circleflip-builder');
?>
</option>
									<?php 
$blocks = get_option('builderSavedTemp');
foreach ($blocks as $key => $value) {
    if (circleflip_valid($value)) {
        ?>
												<option value="<?php 
        echo esc_attr($key);
        ?>
" class="manuallySaved"><?php 
        echo esc_html($key);
        ?>
</option>
												<?php 
    }
}
?>
								</select>
							</div>
							<a href="#" class="deleteTemplates" id="deleteTemplateBuilder" data-postid="<?php 
    function block($instance)
    {
        $defaults = array('image_shape' => 'square');
        $instance = wp_parse_args($instance, $defaults);
        extract($instance);
        if ($entrance_animation == 'default') {
            $entrance_animation = cr_get_option('block_animations');
        }
        if ($image_shape == 'square' || !isset($image_shape)) {
            $image_cut = wp_get_attachment_image_src($image_uploadid, 'full');
            if ($image_hover_style == 'default') {
                $img_hover_class = !empty($image_hover_uploadid) ? 'hover_exist' : '';
                ?>
				<div class="single_image_block double_image animateCr <?php 
                echo esc_attr($img_hover_class . ' ' . $entrance_animation);
                ?>
" 
					 style="margin-bottom:<?php 
                echo esc_attr($imageMarginBottom);
                ?>
px;">
					<div class="single_image_first">
						<?php 
                if (circleflip_valid($link_target)) {
                    ?>
							<a href="<?php 
                    echo esc_url($link_target);
                    ?>
">
						<?php 
                }
                echo wp_get_attachment_image($image_uploadid, 'full', false, array('class' => "attachment-full"));
                if (circleflip_valid($link_target)) {
                    ?>
							</a>
						<?php 
                }
                ?>
					</div>
					<?php 
                if (!empty($image_hover_uploadid)) {
                    ?>
					<div class="single_image_second">
						<?php 
                    if (circleflip_valid($link_target)) {
                        ?>
							<a href="<?php 
                        echo esc_url($link_target);
                        ?>
">
						<?php 
                    }
                    echo wp_get_attachment_image($image_hover_uploadid, 'full', false, array('class' => "attachment-full"));
                    if (circleflip_valid($link_target)) {
                        ?>
						</a>
						<?php 
                    }
                    ?>
					</div>
					<?php 
                }
                ?>
				</div>
				<?php 
            } elseif ($image_hover_style == 'hover1') {
                $this->square_white_enqueue();
                ?>
				<div class="squarePost single_image_block" style="margin-bottom:<?php 
                echo esc_attr($imageMarginBottom);
                ?>
px;">
					<div class="squarePostImg">
						<?php 
                echo wp_get_attachment_image($image_uploadid, 'full', false, array('class' => "attachment-full animateCr {$entrance_animation}"));
                ?>
						<div class="squarePostCont">
							<div class="squareAlignMid">
								<div class="squareAlignMid2">
									<div class="linkZoomCont">
										<?php 
                if ($pretty == 1) {
                    ?>
											<a href="<?php 
                    echo esc_url($image_cut[0]);
                    ?>
" class="zoomRecent <?php 
                    if (!circleflip_valid($link_target)) {
                        echo "centerIcon";
                    }
                    ?>
" rel="prettyPhoto"></a>
										<?php 
                }
                ?>
										<?php 
                if (circleflip_valid($link_target)) {
                    ?>
											<a href="<?php 
                    echo esc_url($link_target);
                    ?>
" class="linkRecent <?php 
                    if ($pretty == 0) {
                        echo "centerIcon";
                    }
                    ?>
"></a>
										<?php 
                }
                ?>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<?php 
            } elseif ($image_hover_style == 'hover2') {
                $this->square_white_enqueue();
                ?>
				<div class="portfolioHome single_image_block" style="margin-bottom:<?php 
                echo esc_attr($imageMarginBottom);
                ?>
px;">
					<div class="portfolioHomeImg animateCr <?php 
                echo esc_attr($entrance_animation);
                ?>
">
						<?php 
                echo wp_get_attachment_image($image_uploadid, 'full');
                ?>
						<div class="portfolioHomeCont">
							<div class="portfolioHomeCont2">
								<div class="portfolioHomeCont2Inner">
									<div class="ZoomContStyle3">
										<?php 
                if ($pretty == 1) {
                    ?>
											<a href="<?php 
                    echo esc_url($image_cut[0]);
                    ?>
" class="zoomStyle3 <?php 
                    if (!circleflip_valid($link_target)) {
                        echo "centerIcon";
                    }
                    ?>
" rel="prettyPhoto"></a>
										<?php 
                }
                ?>
										<?php 
                if (circleflip_valid($link_target)) {
                    ?>
											<a href="<?php 
                    echo esc_url($link_target);
                    ?>
" class="linkStyle3 <?php 
                    if ($pretty == 0) {
                        echo "centerIcon";
                    }
                    ?>
"></a>
										<?php 
                }
                ?>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<?php 
            }
        } elseif ($image_shape == 'circle') {
            $this->circle_posts_enqueue();
            switch ($animation_number) {
                case '0':
                    $animation = 'animation1';
                    break;
                case '1':
                    $animation = 'animation2';
                    break;
                case '2':
                    $animation = 'animation3';
                    break;
                case '3':
                    $animation = 'animation4';
                    break;
                default:
                    $animation = 'animation1';
                    break;
            }
            $image_attributes = wp_get_attachment_image_src($image_uploadid, 'circle-posts');
            ?>
			<div class="circlePost animate_CF image_block" style="margin-bottom:<?php 
            echo esc_attr($imageMarginBottom);
            ?>
px;">
				<div class="circleAnimation <?php 
            echo esc_attr($animation);
            ?>
" style="height: 370px;">
					<div class="circleAnimationImage" data-image="<?php 
            echo esc_url($image_attributes[0]);
            ?>
" style="height: 370px; background-image: url('<?php 
            echo esc_url($image_attributes[0]);
            ?>
');"></div>
					<div class="circleAnimation <?php 
            echo esc_attr($animation);
            ?>
">
						<div class="circleAnimationArea animationContainer" style="height: 330px; width: 330px;">
							<div class="circleAnimationSingle animationWrap">
								<div class="circleAnimationImage front" style="height: 230px; background-image: url('<?php 
            echo esc_url($image_attributes[0]);
            ?>
');"></div>
								<div class="circleAnimationDetails back circlePostDetails">
									<div class="circleDetailsWrapper">
										<?php 
            if (circleflip_valid($link_target_circle)) {
                ?>
										<a href="<?php 
                echo esc_url($link_target_circle);
                ?>
" class="zoomRecent zoomCircle icon-link <?php 
                echo circleflip_valid($title_circle) ? '' : 'noTitle';
                ?>
"></a>
										<?php 
            }
            ?>
										<?php 
            if (circleflip_valid($title_circle)) {
                ?>
										<h4 class="<?php 
                echo circleflip_valid($link_target_circle) ? '' : 'noZoom';
                ?>
"><a href="<?php 
                echo esc_url($link_target_circle);
                ?>
"><?php 
                echo esc_html($title_circle);
                ?>
</a></h4>
										<?php 
            }
            ?>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		<?php 
        }
    }
Beispiel #11
0
    function magazineStyle4($instance)
    {
        extract($instance);
        $this->magazine_style4_enqueue();
        /*
         * Latest Posts - Popular - Selected Posts
         * Blog Posts - Portfolio
         * with Latest or Popular (Selected Categories Multiple Select)
         * Order -> Ascending or descending
         * Number of Posts
         */
        $post_selected_cats = isset(${"post_selected_cats_{$post_cat_type}"}) ? ${"post_selected_cats_{$post_cat_type}"} : array();
        $output = circleflip_query($this->build_query_args($instance));
        switch ($type_mag) {
            case '0':
                $layout = 'span4';
                $image_size = 'recent_home_posts_two';
                break;
            case '1':
                $layout = 'span3';
                $image_size = 'recent_home_posts';
                break;
            case '2':
                $layout = 'span6';
                $image_size = 'magazine_half';
                break;
            default:
                $layout = 'span4';
                $image_size = 'recent_home_posts_two';
                break;
        }
        $titleIconClass;
        switch ($titleIcon) {
            case 0:
                $titleIconClass = 'withoutIcon';
                break;
            case 1:
                $titleIconClass = 'withIcon';
                break;
            default:
                $titleIconClass = 'withoutIcon';
        }
        $titleIconHead = '';
        if ($titleIconClass == 'withIcon') {
            $iconHead;
            if (defined("ICL_LANGUAGE_CODE") && "ar" === ICL_LANGUAGE_CODE) {
                $iconHead = "icon-left-open-mini";
            } else {
                $iconHead = "icon-right-open-mini";
            }
            $titleIconHead = '<div class="headerDot"><span class="' . esc_attr($iconHead) . '"></span></div>';
        }
        if ($output) {
            ?>
					<div class="magazineStyle magazineStyle4">
						<?php 
            if (circleflip_valid($title) || $post_type != 2 && $reload_section == "enable") {
                ?>
							<div class="titleBlock">
								<?php 
                if (circleflip_valid($title)) {
                    ?>
									<h3 class="alignLeft">
										<?php 
                    echo $titleIconHead . esc_html($title);
                    ?>
									</h3>
								<?php 
                }
                ?>
								<?php 
                if ($post_type != 2 && $reload_section == "enable") {
                    ?>
									<?php 
                    if (!circleflip_valid($title)) {
                        ?>
										<h3 class="alignLeft"></h3>
									<?php 
                    }
                    ?>
									<a class="loadMagazinePosts loadMagazine4Posts"
									   data-pagenumber="2"
									   data-posttype="<?php 
                    echo esc_attr($post_type);
                    ?>
"
									   data-layout="<?php 
                    echo esc_attr($layout);
                    ?>
"
									   data-postsnumber="<?php 
                    echo esc_attr($post_number);
                    ?>
"
									   data-cats="<?php 
                    echo isset($post_selected_cats) ? esc_attr(implode(',', $post_selected_cats)) : '';
                    ?>
"
									   data-post-or-portfolio="<?php 
                    echo esc_attr($post_cat_type);
                    ?>
">
										<span class="icon-spin3"></span> </a>
								<?php 
                }
                ?>
							</div>
						<?php 
            }
            ?>
						<div class="circleFlip row">

							<?php 
            global $post;
            foreach ($output as $post) {
                setup_postdata($post);
                ?>
								<div class="<?php 
                echo esc_attr($layout . ' ' . $entrance_animation);
                ?>
 magazinePost magazinePost4 animateCr">
									<!-- Magazine post Image -->
									<div class="image">
										<?php 
                if (has_post_thumbnail($post->ID)) {
                    ?>
											<?php 
                    echo get_the_post_thumbnail($post->ID, $image_size);
                    ?>
											<?php 
                } else {
                    echo circleflip_get_default_image($image_size);
                    ?>
										<?php 
                }
                ?>

									</div>
									<!-- Magazine post Right part -->
									<div class="magazineData">
										<!-- Magazine post Author -->
										<div class="magazinePostAuthor">
											<?php 
                echo get_avatar($post->post_author);
                ?>
											<a href="<?php 
                echo esc_url(get_author_posts_url($post->post_author));
                ?>
"><p><?php 
                the_author_meta('display_name');
                ?>
 </p></a>
										</div>
										<!-- Magazine post Date -->
										<div class="magazinePostDate">
											<p> /</p>
											<span><?php 
                echo get_the_date('d M Y');
                ?>
</span>
										</div>
										<!-- Magazine post title -->
										<?php 
                $original_title = $post->post_title;
                $mag_post_title = circleflip_string_limit_characters($original_title, '45');
                ?>
										<a  class="magazinePostTitle" href="<?php 
                the_permalink();
                ?>
"><h4><?php 
                echo esc_html($mag_post_title);
                ?>
</h4></a>
										<!-- Magazine post Categories -->
										<div class="magazineCategories">
											<?php 
                $post_categories = wp_get_post_categories(get_the_ID());
                $cats = array();
                for ($i = 0; $i < count($post_categories); $i++) {
                    $cat = get_category($post_categories[$i]);
                    $cat_name = $cat->name;
                    $cat_link = get_category_link($cat->cat_ID);
                    //$cats[] = array( 'name' => $cat->name, 'slug' => $cat->slug );
                    if ($i != count($post_categories) - 1) {
                        echo ' <a href=' . esc_url($cat_link) . '><p>' . esc_html($cat_name) . ' , </p></a>';
                    } else {
                        echo ' <a href=' . esc_url($cat_link) . '><p>' . esc_html($cat_name) . '</p></a>';
                    }
                }
                ?>
										</div>
										<!-- Magazine post excerpt -->
										<?php 
                $original_text = sanitize_text_field($post->post_content);
                $mag_post_text = circleflip_string_limit_characters($original_text, '125');
                ?>
										<p class="magazinePostExcerpt"><?php 
                echo $mag_post_text;
                ?>
</p>
										<!-- Magazine post views & comments number -->
										<div class="magazinePostViews">
											<span class="icon-eye"></span>
											<span class="mag_views_no">
												<?php 
                if (cr_get_option("rtl", '0') == '1') {
                    $standard = array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9");
                    $east_arabic = array("&#1632;", "&#1633;", "&#1634;", "&#1635;", "&#1636;", "&#1637;", "&#1638;", "&#1639;", "&#1640;", "&#1641;");
                    $numOfViews = circleflip_read_number_of_views(get_the_ID());
                    $numOfViews = str_replace($standard, $east_arabic, $numOfViews);
                } else {
                    $numOfViews = circleflip_read_number_of_views(get_the_ID());
                }
                echo esc_html($numOfViews);
                ?>
											</span>
										</div>
										<div class="magazinePostComments">
											<span class="icon-comment-1"></span>
											<span class="mag_comments_no">
												<?php 
                comments_number('0');
                ?>
											</span>
										</div>
										<div class="magazinePostBtn">
												<!-- <a href="<?php 
                the_permalink();
                ?>
"><?php 
                _e('more..', 'circleflip');
                ?>
</a> -->
											<a href="<?php 
                the_permalink();
                ?>
" class="">
												<span><?php 
                _e('Read More..', 'circleflip');
                ?>
</span>
											</a>
										</div>
									</div>
								</div>
							<?php 
            }
            ?>
						</div>
					</div>
					<?php 
            if ($check_element_color == 1) {
                ?>
						<style>
				<?php 
                $id_modified = str_replace('_', '-', $block_id);
                ?>
							#<?php 
                echo $id_modified;
                ?>
 .magazinePost4 .image .magazinePostDate, 
							#<?php 
                echo $id_modified;
                ?>
 .magazinePostViews .mag_views_no, 
							#<?php 
                echo $id_modified;
                ?>
 .magazinePostComments .mag_comments_no, 
							#<?php 
                echo $id_modified;
                ?>
 [class*="btnStyle"].red{
								background-color: <?php 
                echo $elements_color;
                ?>
;
							}
							#<?php 
                echo $id_modified;
                ?>
 .magazinePostTitle h4:hover, 
							#<?php 
                echo $id_modified;
                ?>
 .color, 
							#<?php 
                echo $id_modified;
                ?>
 .magazinePost4 .magazinePostBtn a:hover, 
							#<?php 
                echo $id_modified;
                ?>
 .magazinePost4 .magazinePostAuthor p:hover, 
							#<?php 
                echo $id_modified;
                ?>
 .magazinePost4 .magazineCategories p{
								color: <?php 
                echo $elements_color;
                ?>
!important;
							}
							#<?php 
                echo $id_modified;
                ?>
 .magazinePostViews .mag_views_no, 
							#<?php 
                echo $id_modified;
                ?>
 .magazinePostComments .mag_comments_no, 
							#<?php 
                echo $id_modified;
                ?>
 .magazinePost4 .magazinePostBtn a:hover{
								border-color:  <?php 
                echo $elements_color;
                ?>
;
							}
						</style>
						<?php 
            }
        }
        circleflip_end_query();
    }
    function block($instance)
    {
        extract($instance);
        $this->twitter_method($instance);
        if ($entrance_animation == 'default') {
            $entrance_animation = cr_get_option('block_animations');
        }
        $titleIconClass;
        switch ($titleIcon) {
            case 0:
                $titleIconClass = 'withoutIcon';
                break;
            case 1:
                $titleIconClass = 'withIcon';
                break;
            default:
                $titleIconClass = 'withoutIcon';
        }
        $titleIconHead = '';
        if ($titleIconClass == 'withIcon') {
            $iconHead;
            if (defined("ICL_LANGUAGE_CODE") && "ar" === ICL_LANGUAGE_CODE) {
                $iconHead = "icon-left-open-mini";
            } else {
                $iconHead = "icon-right-open-mini";
            }
            $titleIconHead = '<div class="headerDot"><span class="' . $iconHead . '"></span></div>';
        }
        ?>
		<div class="twitterWrapper animateCr <?php 
        echo esc_attr($entrance_animation);
        ?>
">
			<?php 
        if (circleflip_valid($title)) {
            ?>
			<div class="titleBlock">
				<h3><?php 
            echo $titleIconHead . esc_html($title);
            ?>
</h3>
			</div>
			<?php 
        }
        ?>
			<div class="<?php 
        echo esc_attr($block_id);
        ?>
 twitterBlock"></div>
		</div>
		<?php 
    }
function circleflip_standard_mag4format($media_html, $post_id, $size, $ident, $audiovideo)
{
    $post = get_post($post_id);
    if ('my_unique_mag4_posts' == $ident) {
        $src = '';
        $image_mag = '';
        if (has_post_thumbnail($post_id)) {
            $image_id = get_post_thumbnail_id($post_id);
            $image_mag = wp_get_attachment_image_src($image_id, $size);
            $src = $image_mag[0];
        }
        ob_start();
        ?>
			
			<!-- Magazine post Image -->
			<div class="image">
				<?php 
        if (circleflip_valid($src)) {
            ?>
					<?php 
            echo wp_get_attachment_image($image_id, $size);
            ?>
				<?php 
        } else {
            echo circleflip_get_default_image($size);
            ?>
				<?php 
        }
        ?>
			</div>
			<!-- Magazine post Right part -->
			<div class="magazineData">
				<!-- Magazine post Author -->
				<div class="magazinePostAuthor">
					<?php 
        echo get_avatar($post->post_author);
        ?>
					<a href="<?php 
        echo get_author_posts_url($post->post_author);
        ?>
"><p><?php 
        the_author_meta('display_name', $post->post_author);
        ?>
 </p></a>
				</div>
				<!-- Magazine post Date -->
				<div class="magazinePostDate">
					<p> /</p>
					<span><?php 
        echo get_the_date('d M Y', $post->ID);
        ?>
</span>
				</div>
				<!-- Magazine post title -->
				<?php 
        $original_title = $post->post_title;
        $mag_post_title = circleflip_string_limit_characters($original_title, '45');
        ?>
				<a  class="magazinePostTitle" href="<?php 
        echo get_permalink($post->ID);
        ?>
"><h4><?php 
        echo esc_html($mag_post_title);
        ?>
</h4></a>
				<!-- Magazine post Categories -->
				<div class="magazineCategories">
					<?php 
        $post_categories = wp_get_post_categories($post->ID);
        $cats = array();
        for ($i = 0; $i < count($post_categories); $i++) {
            $cat = get_category($post_categories[$i]);
            $cat_name = $cat->name;
            $cat_link = get_category_link($cat->cat_ID);
            //$cats[] = array( 'name' => $cat->name, 'slug' => $cat->slug );
            if ($i != count($post_categories) - 1) {
                echo ' <a href=' . esc_url($cat_link) . '><p>' . esc_html($cat_name) . ' , </p></a>';
            } else {
                echo ' <a href=' . esc_url($cat_link) . '><p>' . esc_html($cat_name) . '</p></a>';
            }
        }
        ?>
				</div>
				<!-- Magazine post excerpt -->
				<?php 
        $original_text = sanitize_text_field($post->post_content);
        $mag_post_text = circleflip_string_limit_characters($original_text, '125');
        ?>
				<p class="magazinePostExcerpt"><?php 
        echo esc_html($mag_post_text);
        ?>
</p>
				<!-- Magazine post views & comments number -->
				<div class="magazinePostViews">
					<span class="icon-eye"></span>
					<span class="mag_views_no">
						<?php 
        if (cr_get_option("rtl", '0') == '1') {
            $standard = array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9");
            $east_arabic = array("&#1632;", "&#1633;", "&#1634;", "&#1635;", "&#1636;", "&#1637;", "&#1638;", "&#1639;", "&#1640;", "&#1641;");
            $numOfViews = circleflip_read_number_of_views($post->ID);
            $numOfViews = str_replace($standard, $east_arabic, $numOfViews);
        } else {
            $numOfViews = circleflip_read_number_of_views($post->ID);
        }
        echo esc_html($numOfViews);
        ?>
					</span>
				</div>
				<div class="magazinePostComments">
					<span class="icon-comment-1"></span>
					<span class="mag_comments_no">
						<?php 
        comments_number('0');
        ?>
					</span>
				</div>
				<div class="magazinePostBtn">
					<!-- <a href="<?php 
        the_permalink();
        ?>
"><?php 
        _e('more..', 'circleflip');
        ?>
</a> -->
					<a href="<?php 
        echo get_permalink($post->ID);
        ?>
" class="">
						<span><?php 
        _e('Read More..', 'circleflip');
        ?>
</span>
					</a>
				</div>
			</div>
			 <?php 
        $media_html = ob_get_clean();
    }
    return $media_html;
}
                    $relatedNumber = 3;
                }
            }
            ?>
	    		    <div class="<?php 
            echo esc_attr($sidebar_exist);
            ?>
 <?php 
            if ($relatedCount == 1) {
                echo 'portfolioHomeMargin';
            }
            ?>
 portfolioHome">
	    			<div class="portfolioHomeImg">
					<?php 
            if (circleflip_valid($image_recent)) {
                ?>
					    <?php 
                echo wp_get_attachment_image($image_id, 'recent_home_posts');
                ?>
					<?php 
            } else {
                ?>
					    <?php 
                echo circleflip_get_default_image('recent_home_posts');
                ?>
					    <?php 
            }
            echo circleflip_get_post_format_media($post->ID, 'recent_home_posts', 'my_unique_portfolio_posts');
            ?>
	    			</div>
function circleflip_header_after()
{
    switch (cr_get_option('header_style')) {
        case 'style4':
            //Breaking Area start
            if (cr_get_option('breaking_area')) {
                $breakingTitle = circleflip_valid(cr_get_option('breaking_title')) ? cr_get_option('breaking_title') : __('Breaking', 'circleflip');
                switch (cr_get_option('breaking_content')) {
                    case 'posts':
                        $breakNumPosts = circleflip_valid(cr_get_option('number_breaking_posts')) ? cr_get_option('number_breaking_posts') : 10;
                        $cat_ids = circleflip_valid(cr_get_option('breaking_selected_category')) ? implode(',', cr_get_option('breaking_selected_category')) : -1;
                        $args = array('showposts' => $breakNumPosts, 'category' => $cat_ids, 'order' => 'DESC');
                        $args['suppress_filters'] = false;
                        $ticker_posts = get_posts($args);
                        if ($ticker_posts) {
                            ?>

					<div class="slidingText full">
						<div class="container">
							<div class="movingHead left">
								<h2><?php 
                            echo esc_html($breakingTitle);
                            ?>
</h2>
							</div>
							<div class="movingText left">
								<ul id="js-news" class="js-hidden">
				<?php 
                            foreach ($ticker_posts as $post) {
                                setup_postdata($post);
                                ?>
										<li class="news-item"><a href="<?php 
                                echo esc_url($post->guid);
                                ?>
"><h6><?php 
                                echo esc_html($post->post_title);
                                ?>
</h6></a></li>
					<?php 
                            }
                            ?>
								</ul>
							</div>
						</div>
					</div>
				<?php 
                        }
                        break;
                    case 'custom':
                        $custome_breaking = explode(',', cr_get_option('custome_breaking'));
                        ?>

				<div class="slidingText full">
					<div class="container">
						<div class="movingHead left">
							<h2><?php 
                        echo esc_html($breakingTitle);
                        ?>
</h2>
						</div>
						<div class="movingText left">
							<ul id="js-news" class="js-hidden">
			<?php 
                        foreach ($custome_breaking as $key => $text) {
                            ?>
									<li class="news-item"><h6><?php 
                            echo esc_html($text);
                            ?>
</h6></li>
				<?php 
                        }
                        ?>
							</ul>
						</div>
					</div>
				</div>
				<?php 
                        break;
                    default:
                        $breakNumPosts = circleflip_valid(cr_get_option('number_breaking_posts')) ? cr_get_option('number_breaking_posts') : 10;
                        $cat_ids = circleflip_valid(cr_get_option('breaking_selected_category')) ? implode(',', cr_get_option('breaking_selected_category')) : -1;
                        $args = array('showposts' => $breakNumPosts, 'category' => $cat_ids, 'order' => 'DESC');
                        $args['suppress_filters'] = false;
                        $ticker_posts = get_posts($args);
                        if ($ticker_posts) {
                            ?>
					<div class="slidingText full">
						<div class="movingHead left">
							<h2><?php 
                            echo esc_html($breakingTitle);
                            ?>
</h2>
						</div>
						<div class="movingText left">
							<ul id="js-news" class="js-hidden">
					<?php 
                            foreach ($ticker_posts as $post) {
                                setup_postdata($post);
                                ?>
									<li class="news-item"><a href="<?php 
                                the_permalink();
                                ?>
"><h6><?php 
                                echo esc_html($post->post_title);
                                ?>
</h6></a></li>
					<?php 
                            }
                            ?>
							</ul>
						</div>
					</div>
				<?php 
                        }
                        break;
                }
            }
            //Breaking Area End
            break;
        case 'style9':
            //Breaking Area start
            if (cr_get_option('breaking_area')) {
                $breakingTitle = circleflip_valid(cr_get_option('breaking_title')) ? cr_get_option('breaking_title') : 'Breaking';
                switch (cr_get_option('breaking_content')) {
                    case 'posts':
                        $breakNumPosts = circleflip_valid(cr_get_option('number_breaking_posts')) ? cr_get_option('number_breaking_posts') : 10;
                        $cat_ids = circleflip_valid(cr_get_option('breaking_selected_category')) ? implode(',', cr_get_option('breaking_selected_category')) : -1;
                        $args = array('showposts' => $breakNumPosts, 'category' => $cat_ids, 'order' => 'DESC');
                        $args['suppress_filters'] = false;
                        $ticker_posts = get_posts($args);
                        if ($ticker_posts) {
                            ?>

					<div class="slidingText full">
						<div class="container">
							<div class="movingHead left">
								<h2><?php 
                            echo esc_html($breakingTitle);
                            ?>
</h2>
							</div>
							<div class="movingText left">
								<ul id="js-news" class="js-hidden">
				<?php 
                            foreach ($ticker_posts as $post) {
                                setup_postdata($post);
                                ?>
										<li class="news-item"><a href="<?php 
                                echo esc_url($post->guid);
                                ?>
"><h6><?php 
                                echo esc_html($post->post_title);
                                ?>
</h6></a></li>
					<?php 
                            }
                            ?>
								</ul>
							</div>
						</div>
					</div>
				<?php 
                        }
                        break;
                    case 'custom':
                        $custome_breaking = explode(',', cr_get_option('custome_breaking'));
                        ?>

				<div class="slidingText full">
					<div class="container">
						<div class="movingHead left">
							<h2><?php 
                        echo esc_html($breakingTitle);
                        ?>
</h2>
						</div>
						<div class="movingText left">
							<ul id="js-news" class="js-hidden">
			<?php 
                        foreach ($custome_breaking as $key => $text) {
                            ?>
									<li class="news-item"><h6><?php 
                            echo esc_html($text);
                            ?>
</h6></li>
				<?php 
                        }
                        ?>
							</ul>
						</div>
					</div>
				</div>
				<?php 
                        break;
                    default:
                        $breakNumPosts = circleflip_valid(cr_get_option('number_breaking_posts')) ? cr_get_option('number_breaking_posts') : 10;
                        $cat_ids = circleflip_valid(cr_get_option('breaking_selected_category')) ? implode(',', cr_get_option('breaking_selected_category')) : -1;
                        $args = array('showposts' => $breakNumPosts, 'category' => $cat_ids, 'order' => 'DESC');
                        $args['suppress_filters'] = false;
                        $ticker_posts = get_posts($args);
                        if ($ticker_posts) {
                            ?>
					<div class="slidingText full">
						<div class="movingHead left">
							<h2><?php 
                            echo esc_html($breakingTitle);
                            ?>
</h2>
						</div>
						<div class="movingText left">
							<ul id="js-news" class="js-hidden">
					<?php 
                            foreach ($ticker_posts as $post) {
                                setup_postdata($post);
                                ?>
									<li class="news-item"><a href="<?php 
                                the_permalink();
                                ?>
"><h6><?php 
                                echo esc_html($post->post_title);
                                ?>
</h6></a></li>
					<?php 
                            }
                            ?>
							</ul>
						</div>
					</div>
				<?php 
                        }
                        break;
                }
            }
            //Breaking Area End
            break;
        case 'style5':
            ?>
	<div class="mainHeader headerStyle5 headerAfter">
		<div class="container">
			<div <?php 
            circleflip_navbar_class();
            ?>
>
				<div class="navbar-inner">
					<div class="container">
						<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
						<a class="btn btn-navbar">
							<span class="icon-menu"></span>
						</a>
						<div class="navCollapse navCollapse nav-collapse-headerAfter">
							<?php 
            wp_nav_menu(array('theme_location' => 'primary', 'menu_class' => 'nav center', 'depth' => 13, 'fallback_cb' => false, 'walker' => new Circleflip_Nav_Walker()));
            ?>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<?php 
            if (cr_get_option('sticky_header') == 1) {
                echo '</div>';
            }
            ?>
	<?php 
            break;
    }
}
    function block($instance)
    {
        $class = '';
        extract($instance);
        $this->slider_method();
        $counter = 0;
        $sliders_options = array();
        $fullwidth = '';
        if ($fullwidthSlider == 'fullwidth') {
            $class = '';
            $fullwidth = '100%';
        }
        foreach (cr_get_option('create_slider') as $key => $value) {
            $sliders_options[$counter] = $value;
            $counter++;
        }
        $slider_type = cr_get_option(strtolower(str_replace(' ', '_', $sliders_options[$slider])) . 'select_slider', '');
        $sliders_options[$slider] = strtolower(str_replace(' ', '_', $sliders_options[$slider]));
        $options_array = cr_get_option(strtolower($sliders_options[$slider]));
        if (circleflip_valid($sliders_options[$slider])) {
            switch ($slider_type) {
                case 'nivo_slider':
                    $this->nivo_slider_method();
                    ?>
						<div class="slider-wrapper theme-default <?php 
                    echo esc_attr($class);
                    ?>
" style="margin-bottom:<?php 
                    echo esc_attr($margin_bottom);
                    ?>
">
						    <div id="slider" class="nivoSlider">
						    	<?php 
                    for ($i = 0; $i < $options_array['number']; $i++) {
                        if (circleflip_valid($options_array[$i][$sliders_options[$slider] . '_link'])) {
                            ?>
										<a href="<?php 
                            echo esc_url($options_array[$i][$sliders_options[$slider] . '_link']);
                            ?>
">
									<?php 
                        }
                        ?>
											<img src="<?php 
                        echo circleflip_valid($options_array[$i][$sliders_options[$slider] . '_image']) ? esc_url($options_array[$i][$sliders_options[$slider] . '_image']) : '';
                        ?>
" data-thumb="<?php 
                        echo circleflip_valid($options_array[$i][$sliders_options[$slider] . '_thumb']) ? $options_array[$i][$sliders_options[$slider] . '_thumb'] : '';
                        ?>
" alt="" title="<?php 
                        echo circleflip_valid($options_array[$i][$sliders_options[$slider] . '_title']) ? esc_attr($options_array[$i][$sliders_options[$slider] . '_title']) : '';
                        ?>
" />
									<?php 
                        if (circleflip_valid($options_array[$i][$sliders_options[$slider] . '_link'])) {
                            ?>
										</a>
									<?php 
                        }
                    }
                    ?>
						    </div>
						</div>
					<?php 
                    break;
                case 'elastic_slider':
                    $this->elastic_slider_method();
                    ?>
						<div class="wrapper <?php 
                    echo esc_attr($class);
                    ?>
" style="margin-bottom:<?php 
                    echo esc_attr($margin_bottom);
                    ?>
px">
			                <div id="ei-slider" class="ei-slider">
			                    <ul class="ei-slider-large">
			                    	<?php 
                    for ($i = 0; $i < $options_array['number']; $i++) {
                        ?>
							    		<li>
							    			<?php 
                        if (circleflip_valid($options_array[$i][$sliders_options[$slider] . '_link'])) {
                            ?>
											<a href="<?php 
                            echo esc_url($options_array[$i][$sliders_options[$slider] . '_link']);
                            ?>
">
											<?php 
                        }
                        ?>
												<img src="<?php 
                        echo circleflip_valid($options_array[$i][$sliders_options[$slider] . '_image']) ? esc_url($options_array[$i][$sliders_options[$slider] . '_image']) : '';
                        ?>
"  alt="" />
											<?php 
                        if (circleflip_valid($options_array[$i][$sliders_options[$slider] . '_link'])) {
                            ?>
											</a>
											<?php 
                        }
                        ?>
											<div class="ei-title">
				                                <h2 style="font-family: <?php 
                        echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_title']['face']);
                        ?>
;font-size:<?php 
                        echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_title']['size']);
                        ?>
;color:<?php 
                        echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_title']['color']);
                        ?>
;font-weight: <?php 
                        echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_title']['weight']);
                        ?>
 ;"><?php 
                        echo circleflip_valid($options_array[$i][$sliders_options[$slider] . '_title']) ? esc_attr($options_array[$i][$sliders_options[$slider] . '_title']) : '';
                        ?>
</h2>
				                                <h3 style="font-family: <?php 
                        echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_text']['face']);
                        ?>
;font-size:<?php 
                        echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_text']['size']);
                        ?>
;color:<?php 
                        echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_text']['color']);
                        ?>
;font-weight: <?php 
                        echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_text']['weight']);
                        ?>
 ;"><?php 
                        echo circleflip_valid($options_array[$i][$sliders_options[$slider] . '_text']) ? esc_attr($options_array[$i][$sliders_options[$slider] . '_text']) : '';
                        ?>
</h3>
				                            </div>
										</li>
									<?php 
                    }
                    ?>
			                    </ul><!-- ei-slider-large -->
			                    <ul class="ei-slider-thumbs">
			                    	<li class="ei-slider-element">Current</li>
			                    	<?php 
                    for ($i = 0; $i < $options_array['number']; $i++) {
                        ?>
										<li><a href="<?php 
                        echo esc_url($options_array[$i][$sliders_options[$slider] . '_link']);
                        ?>
"></a><img src="<?php 
                        echo circleflip_valid($options_array[$i][$sliders_options[$slider] . '_thumb']) ? esc_url($options_array[$i][$sliders_options[$slider] . '_thumb']) : '';
                        ?>
" /></li>
									<?php 
                    }
                    ?>
			                    </ul><!-- ei-slider-thumbs -->
			                </div><!-- ei-slider -->
			            </div><!-- wrapper -->
					<?php 
                    break;
                case 'threed_slider':
                    $this->threed_slider_method();
                    ?>
						<div class="wrapper <?php 
                    echo esc_attr($class);
                    ?>
" style="position:relative; margin-bottom:<?php 
                    echo esc_attr($margin_bottom);
                    ?>
px">
						<div class="wrapper DSlider <?php 
                    echo esc_attr($class);
                    ?>
">
							<ul id="sb-slider" class="sb-slider">
								<?php 
                    for ($i = 0; $i < $options_array['number']; $i++) {
                        ?>
								<li>
									<?php 
                        if (circleflip_valid($options_array[$i][$sliders_options[$slider] . '_link'])) {
                            ?>
									<a href="<?php 
                            echo esc_url($options_array[$i][$sliders_options[$slider] . '_link']);
                            ?>
" target="_blank"><img src="<?php 
                            echo circleflip_valid($options_array[$i][$sliders_options[$slider] . '_image']) ? esc_url($options_array[$i][$sliders_options[$slider] . '_image']) : '';
                            ?>
" alt="image1"/></a>
									<?php 
                        } else {
                            ?>
									<img src="<?php 
                            echo circleflip_valid($options_array[$i][$sliders_options[$slider] . '_image']) ? esc_url($options_array[$i][$sliders_options[$slider] . '_image']) : '';
                            ?>
" alt="image1"/>
									<?php 
                        }
                        ?>
									<?php 
                        if (circleflip_valid($options_array[$i][$sliders_options[$slider] . '_text'])) {
                            ?>
									<div class="sb-description">
										<h3 style="font-family: <?php 
                            echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_text']['face']);
                            ?>
;font-size:<?php 
                            echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_text']['size']);
                            ?>
;color:<?php 
                            echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_text']['color']);
                            ?>
;font-weight: <?php 
                            echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_text']['weight']);
                            ?>
 ;"><?php 
                            echo circleflip_valid($options_array[$i][$sliders_options[$slider] . '_text']) ? esc_html($options_array[$i][$sliders_options[$slider] . '_text']) : '';
                            ?>
</h3>
									</div>
									<?php 
                        }
                        ?>
								</li>
								<?php 
                    }
                    ?>
							</ul>

							<div id="shadow" class="shadow"></div>

							<div id="nav-arrows" class="nav-arrows">
								<a href="#" class="icon-right-open-big next"></a>
								<a href="#" class="icon-left-open-big prev"></a>
							</div>

							<div id="nav-dots" class="nav-dots">
								<span class="nav-dot-current"></span>
								<?php 
                    for ($i = 0; $i < $options_array['number']; $i++) {
                        ?>
								<span></span>
								<?php 
                    }
                    ?>
							</div>

						</div><!-- /wrapper -->
					<?php 
                    break;
                case 'vertical_accordion_slider':
                    $this->vertical_accordion_slider_method();
                    ?>
					<div id="va-accordion" class="va-container <?php 
                    echo esc_attr($class);
                    ?>
" style="margin-bottom:<?php 
                    echo esc_attr($margin_bottom);
                    ?>
px">
						<div class="va-nav">
							<span class="va-nav-prev icon-up-open-big"></span>
							<span class="va-nav-next icon-down-open-big"></span>
						</div>
						<div class="va-wrapper">
							<?php 
                    for ($i = 0; $i < $options_array['number']; $i++) {
                        ?>
							<div class="va-slice" style="background: #000 url(<?php 
                        echo circleflip_valid($options_array[$i][$sliders_options[$slider] . '_image']) ? esc_url($options_array[$i][$sliders_options[$slider] . '_image']) : '';
                        ?>
) no-repeat center center;">
								<h2 class="va-title" style="font-family: <?php 
                        echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_title']['face']);
                        ?>
;font-size:<?php 
                        echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_title']['size']);
                        ?>
;color:<?php 
                        echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_title']['color']);
                        ?>
;font-weight: <?php 
                        echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_title']['weight']);
                        ?>
 ;"><?php 
                        echo circleflip_valid($options_array[$i][$sliders_options[$slider] . '_title']) ? esc_html($options_array[$i][$sliders_options[$slider] . '_title']) : '';
                        ?>
</h2>
								<div class="va-content">
									<p style="font-family: <?php 
                        echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_text']['face']);
                        ?>
;font-size:<?php 
                        echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_text']['size']);
                        ?>
;color:<?php 
                        echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_text']['color']);
                        ?>
;font-weight: <?php 
                        echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_text']['weight']);
                        ?>
 ;"><?php 
                        echo circleflip_valid($options_array[$i][$sliders_options[$slider] . '_text']) ? esc_html($options_array[$i][$sliders_options[$slider] . '_text']) : '';
                        ?>
</p>
									<ul>
										<?php 
                        if (circleflip_valid($options_array[$i][$sliders_options[$slider] . '_button1link'])) {
                            ?>
										<li>
											<a href="<?php 
                            echo circleflip_valid($options_array[$i][$sliders_options[$slider] . '_button1link']) ? esc_url($options_array[$i][$sliders_options[$slider] . '_button1link']) : '';
                            ?>
"><?php 
                            echo circleflip_valid($options_array[$i][$sliders_options[$slider] . '_button1']) ? esc_html($options_array[$i][$sliders_options[$slider] . '_button1']) : '';
                            ?>
</a>
										</li>
										<?php 
                        }
                        ?>
										<?php 
                        if (circleflip_valid($options_array[$i][$sliders_options[$slider] . '_button2link'])) {
                            ?>
										<li>
											<a href="<?php 
                            echo circleflip_valid($options_array[$i][$sliders_options[$slider] . '_button2link']) ? esc_url($options_array[$i][$sliders_options[$slider] . '_button2link']) : '';
                            ?>
"><?php 
                            echo circleflip_valid($options_array[$i][$sliders_options[$slider] . '_button2']) ? esc_html($options_array[$i][$sliders_options[$slider] . '_button2']) : '';
                            ?>
</a>
										</li>
										<?php 
                        }
                        ?>
										<?php 
                        if (circleflip_valid($options_array[$i][$sliders_options[$slider] . '_button3link'])) {
                            ?>
										<li>
											<a href="<?php 
                            echo circleflip_valid($options_array[$i][$sliders_options[$slider] . '_button3link']) ? esc_url($options_array[$i][$sliders_options[$slider] . '_button3link']) : '';
                            ?>
"><?php 
                            echo circleflip_valid($options_array[$i][$sliders_options[$slider] . '_button3']) ? esc_html($options_array[$i][$sliders_options[$slider] . '_button3']) : '';
                            ?>
</a>
										</li>
										<?php 
                        }
                        ?>
									</ul>
								</div>
							</div>
							<?php 
                    }
                    ?>
						</div>
					</div>
					<?php 
                    break;
                case 'accordion':
                    $this->accordion_slider_method();
                    ?>
					<div id="accordionSlider" class="<?php 
                    echo esc_attr($class);
                    ?>
" style="margin-bottom:<?php 
                    echo esc_attr($margin_bottom);
                    ?>
px">
						<ul id="accordion-slider" class="kwicks-horizontal kwicks">
							<?php 
                    for ($i = 0; $i < $options_array['number']; $i++) {
                        ?>
							<li>
								<?php 
                        if (circleflip_valid($options_array[$i][$sliders_options[$slider] . '_link'])) {
                            ?>
								<a href="<?php 
                            echo esc_url($options_array[$i][$sliders_options[$slider] . '_link']);
                            ?>
">
								<?php 
                        }
                        ?>
									<img src="<?php 
                        echo circleflip_valid($options_array[$i][$sliders_options[$slider] . '_image']) ? esc_url($options_array[$i][$sliders_options[$slider] . '_image']) : '';
                        ?>
" alt="">
								<?php 
                        if (circleflip_valid($options_array[$i][$sliders_options[$slider] . '_link'])) {
                            ?>
								</a>
								<?php 
                        }
                        ?>
								<?php 
                        if (circleflip_valid($options_array[$i][$sliders_options[$slider] . '_title'])) {
                            ?>
								<div class="accTitle" >
									<p style="font-family: <?php 
                            echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_title']['face']);
                            ?>
;font-size:<?php 
                            echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_title']['size']);
                            ?>
;color:<?php 
                            echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_title']['color']);
                            ?>
;font-weight: <?php 
                            echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_title']['weight']);
                            ?>
 ;"><?php 
                            echo circleflip_valid($options_array[$i][$sliders_options[$slider] . '_title']) ? esc_html($options_array[$i][$sliders_options[$slider] . '_title']) : '';
                            ?>
</p>
								</div>
								<?php 
                        }
                        ?>
								<?php 
                        if (circleflip_valid($options_array[$i][$sliders_options[$slider] . '_title']) || circleflip_valid($options_array[$i][$sliders_options[$slider] . '_text'])) {
                            ?>
								<div class="accDetail">
									<?php 
                            if (circleflip_valid($options_array[$i][$sliders_options[$slider] . '_title'])) {
                                ?>
									<p style="font-family: <?php 
                                echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_title']['face']);
                                ?>
;font-size:<?php 
                                echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_title']['size']);
                                ?>
;color:<?php 
                                echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_title']['color']);
                                ?>
;font-weight: <?php 
                                echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_title']['weight']);
                                ?>
 ;"><?php 
                                echo circleflip_valid($options_array[$i][$sliders_options[$slider] . '_title']) ? esc_html($options_array[$i][$sliders_options[$slider] . '_title']) : '';
                                ?>
</p>
									<?php 
                            }
                            ?>
									<h3 style="font-family: <?php 
                            echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_text']['face']);
                            ?>
;font-size:<?php 
                            echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_text']['size']);
                            ?>
;color:<?php 
                            echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_text']['color']);
                            ?>
;font-weight: <?php 
                            echo esc_attr($options_array[$i][$sliders_options[$slider] . '_font_text']['weight']);
                            ?>
 ;"><?php 
                            echo circleflip_valid($options_array[$i][$sliders_options[$slider] . '_text']) ? esc_html($options_array[$i][$sliders_options[$slider] . '_text']) : '';
                            ?>
</h3>
								</div>
								<?php 
                        }
                        ?>
							</li>
							<?php 
                    }
                    ?>
						</ul>
					</div>
					<?php 
                    break;
                default:
                    break;
            }
        }
    }
Beispiel #17
0
function content_builder_save_history()
{
    if (circleflip_valid($_POST['history'])) {
        parse_str($_POST['history'], $output);
        if (isset($output['aq_blocks']) && !empty($output['aq_blocks'])) {
            $all = $output['aq_blocks'];
            foreach ($all as $key => $block) {
                if (substr($key, 0, 9) == 'aq_block_' && substr($key, 8, 14) != '___i__') {
                    $block_instance = $all[$key];
                    //get_post_meta($template_id, $key);
                    if (is_array($block_instance)) {
                        $blocks[$key] = $block_instance;
                    }
                }
            }
            //sort by order
            $sort = array();
            foreach ($blocks as $block) {
                $sort[] = $block['order'];
            }
            array_multisort($sort, SORT_NUMERIC, $blocks);
        }
        $historyData = base64_encode(serialize($blocks));
        $historyNumber = get_post_meta($_POST['postID'], '_cr_history_number', true);
        $historyTotalNumber = get_post_meta($_POST['postID'], '_cr_history_total_number', true);
        if (empty($historyNumber)) {
            $historyNumber = 0;
            if (empty($historyTotalNumber)) {
                $historyTotalNumber = 0;
            }
            update_post_meta($_POST['postID'], '_cr_history_number', $historyNumber);
            update_post_meta($_POST['postID'], '_cr_history_total_number', $historyTotalNumber);
        }
        if ($historyTotalNumber >= 10) {
            $historyTotalNumber = 10;
        } else {
            $historyTotalNumber++;
            update_post_meta($_POST['postID'], '_cr_history_total_number', $historyTotalNumber);
        }
        update_post_meta($_POST['postID'], '_cr_history_' . $historyNumber, $historyData);
        $historyNumber++;
        update_post_meta($_POST['postID'], '_cr_history_number', $historyNumber);
    }
    die;
}
 function build_query_args($instance)
 {
     global $wpdb;
     extract($instance);
     $args = array();
     $post_selected_cats = isset(${"post_selected_cats_{$post_cat_type}"}) ? ${"post_selected_cats_{$post_cat_type}"} : array();
     $post_selected_posts = isset(${"post_selected_posts_{$post_cat_type}"}) ? ${"post_selected_posts_{$post_cat_type}"} : array();
     $cat_key = 'tax_query';
     $tax_query = array(array('taxonomy' => 'circleflip-offer-category', 'field' => 'id', 'terms' => isset($post_selected_cats) ? $post_selected_cats : array()));
     switch ($post_type) {
         // Latest
         case 'latest':
             $args = array('posts_per_page' => $post_number, $cat_key => $tax_query, 'post_type' => 'circleflip-offer', 'orderby' => 'date', 'order' => 'DESC', 'paged' => get_query_var('paged') ? get_query_var('paged') : 1, 'post_status' => 'publish');
             break;
             // Selected Posts
         // Selected Posts
         case 'selected':
             if (circleflip_valid($post_selected_posts)) {
                 $selectedPosts = implode(",", $post_selected_posts);
             } else {
                 $selectedPosts = '';
             }
             $post_selected_cats = '';
             $args = array('post_type' => 'circleflip-offer', 'include' => $selectedPosts, 'orderby' => 'date', 'paged' => get_query_var('paged') ? get_query_var('paged') : 1, 'order' => 'DESC');
             break;
         default:
             $args = array('posts_per_page' => $post_number, $cat_key => $tax_query, 'post_type' => 'circleflip-offer', 'orderby' => 'date', 'order' => 'DESC', 'paged' => get_query_var('paged') ? get_query_var('paged') : 1, 'post_status' => 'publish');
             break;
     }
     if (empty($post_selected_cats)) {
         unset($args[$cat_key]);
     }
     $args['suppress_filters'] = false;
     return $args;
 }
        function block($instance)
        {
            extract($instance);
            $titleIconClass;
            switch ($titleIcon) {
                case 0:
                    $titleIconClass = 'withoutIcon';
                    break;
                case 1:
                    $titleIconClass = 'withIcon';
                    break;
                default:
                    $titleIconClass = 'withoutIcon';
            }
            $titleIconHead = '';
            if ($titleIconClass == 'withIcon') {
                $iconHead;
                if (defined("ICL_LANGUAGE_CODE") && "ar" === ICL_LANGUAGE_CODE) {
                    $iconHead = "icon-left-open-mini";
                } else {
                    $iconHead = "icon-right-open-mini";
                }
                $titleIconHead = '<div class="headerDot"><span class="' . $iconHead . '"></span></div>';
            }
            if ($entrance_animation == 'default') {
                $entrance_animation = cr_get_option('block_animations');
            }
            $none = $arrows == 2 ? 'no_bullets_arrows' : '';
            $bullets_case = $arrows == 1 ? 'bullets_case' : '';
            $arrows_html = '';
            $bullets_html = '';
            $classStyle = '';
            $titleStyle = '';
            if ($testmonial_type == 0) {
                $classStyle = 'TestmonialStyle2';
                $titleStyle = 'testmonialStyle2Title';
            }
            $title_html = circleflip_valid($title) || $arrows == 0 ? '<div class="titleBlock"><h3 class="' . esc_attr($titleStyle) . '">' . $titleIconHead . esc_html($title) . '</h3></div>' : '';
            switch ($arrows) {
                case 0:
                    $arrows_html = '<a class="left carousel-control" href="#myCarousel" data-slide="prev"></a><a class="right carousel-control" href="#myCarousel" data-slide="next"></a>';
                    break;
                case 1:
                    $bullets_html = '<ol class="carousel-linked-nav pagination carousel-indicators">';
                    $i = 1;
                    $j = 0;
                    foreach ($tabs as $tab) {
                        $bullets_html .= $i == 1 ? '<li class="active" data-slide-to="' . $j . '"></li>' : '<li data-slide-to="' . $j . '"></li>';
                        $i++;
                        $j++;
                    }
                    $bullets_html .= '</ol>';
                    break;
                case 2:
                    break;
            }
            $this->testimonials_method();
            $output = '';
            $i = 0;
            $output .= '<div id="myCarousel_testimonials" class="' . $none . ' ' . $bullets_case . ' ' . $classStyle . ' carousel slide testimonialsSection carousel-fade animateCr ' . $entrance_animation . '">
					' . $title_html . '
					' . $arrows_html . '
					<div class="carousel-inner">';
            foreach ($tabs as $tab) {
                $active = $i == 0 ? 'active' : '';
                if ($testmonial_type == 1) {
                    $output .= '
							<div class="item ' . $active . '">
								<div class="TContainer clearfix">
									<div class="TTextContent">
										<p class="TText">' . $tab['text'] . '</p>
									</div>
									<div class="testimonialsRight">
										<div class="image">' . wp_get_attachment_image($tab['imagesrc'], 'thumbnail') . '</div>
										<div class="testimonialspersonnal">
											<p class="TName">' . $tab['name'] . '</p>
											<p class="TJob">' . $tab['job'] . '</p>
										</div>
									</div>
								</div>
							</div>
							';
                } else {
                    if ($testmonial_type == 0) {
                        $image_cut = wp_get_attachment_image_src($tab['imagesrc'], 'thumbnail2');
                        $output .= '
							<div class="item ' . $active . '">
								<div class="TContainer clearfix">
									<p>' . $tab['text'] . '</p>
									<div class="testmoialImage">
										' . wp_get_attachment_image($tab['imagesrc'], 'thumbnail2') . '
									</div>
									<div class="testimonialName"><p>' . $tab['name'] . ' - ' . $tab['job'] . '</p></div>
								</div>
							</div>';
                    }
                }
                $i++;
            }
            $output .= '</div>' . $bullets_html . '</div>';
            echo $output;
        }