=')): add_theme_support('title-tag'); endif; register_nav_menus(array( 'main' => __('Main Navigation', 'cafe-bistro'), 'footer' => __('Bottom Navigation', 'cafe-bistro') )); $cb_bg_defaults = array( 'default-color' => 'ffffff', 'default-image' => '', 'wp-head-callback' => 'cb_bg_callback', ); add_theme_support('custom-background', $cb_bg_defaults); $cb_header_defaults = array( 'default-image' => '', 'random-default' => false, 'width' => '1920', 'height' => '820', 'flex-height' => false, 'flex-width' => false, 'default-text-color' => '', 'header-text' => false, 'uploads' => true, 'wp-head-callback' => '', 'admin-head-callback' => '', 'admin-preview-callback' => '', ); add_theme_support( 'custom-logo', array( 'height' => 50, 'width' => 150, 'flex-width' => true, ) ); add_theme_support('custom-header', $cb_header_defaults); add_theme_support('post-thumbnails'); add_image_size('slider-image', 1920, 850, true); // slider image size. add_image_size('smaller-slider-image', 1300, 650, true); // slider image size. add_image_size('boxed-9', 847, 385, true); // slider image size. add_image_size('boxed-12', 1170, 550, true); // Single post type image (boxed 3/4 layout) add_image_size('fullwidth', 1920, 700, true); // Single post type image (fulwidth) add_image_size('blog-section-image',380,380,true); } endif; /* * 3. Fallback Functions */ if (!function_exists('cb_bg_callback')): function cb_bg_callback() { $background = set_url_scheme(get_background_image()); $color = get_theme_mod('background_color', get_theme_support('custom-background', 'default-color')); if (!$background && !$color) return; $style = $color ? "background-color: #$color;" : ''; if ($background) { $image = " background-image: url('$background');"; $repeat = get_theme_mod('background_repeat', get_theme_support('custom-background', 'default-repeat')); if (!in_array($repeat, array('no-repeat', 'repeat-x', 'repeat-y', 'repeat'))) $repeat = 'repeat'; $repeat = " background-repeat: $repeat;"; $position = get_theme_mod('background_position_x', get_theme_support('custom-background', 'default-position-x')); if (!in_array($position, array('center', 'right', 'left'))) $position = 'left'; $position = " background-position: top $position;"; $attachment = get_theme_mod('background_attachment', get_theme_support('custom-background', 'default-attachment')); if (!in_array($attachment, array('fixed', 'scroll'))) $attachment = 'scroll'; $attachment = " background-attachment: $attachment;"; $style .= $image . $repeat . $position . $attachment; } ?> '; echo ''; echo ''; } function cb_customizer_preview() { wp_enqueue_script('cb-customizer-js', get_template_directory_uri().'/assets/js/customizer.js', array('jquery', 'customize-preview'), '', true); } add_action('customize_preview_init', 'cb_customizer_preview'); /* * 5. Comments */ if (!function_exists('cb_comment')): function cb_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; extract($args, EXTR_SKIP); if ('div' == $args['style']) { $tag = 'div'; $add_below = 'comment'; } else { $tag = 'li'; $add_below = 'div-comment'; } ?> < id="comment-">
comment_approved == '0') : ?>
%s','cafe-bistro'), get_comment_author_link()); ?>
$add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?>
__('Sidebar', 'cafe-bistro'), 'id' => 'sidebar', 'description' => __('This is the main sidebar.It is in every page - post. However you can override this setting from within each post.', 'cafe-bistro'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); /**== Footer Sidebar 1 ==**/ register_sidebar(array( 'name' => __('Footer Sidebar 1', 'cafe-bistro'), 'id' => 'cb-footer-1', 'description' => __('This is the sidebar in the footer, on the left', 'cafe-bistro'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

' )); /**== Footer Sidebar 2 ==**/ register_sidebar(array( 'name' => __('Footer Sidebar 2', 'cafe-bistro'), 'id' => 'cb-footer-2', 'description' => __('This is the sidebar in the footer, the second on the left', 'cafe-bistro'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

' )); /**== Footer Sidebar 3 ==**/ register_sidebar(array( 'name' => __('Footer Sidebar 3', 'cafe-bistro'), 'id' => 'cb-footer-3', 'description' => __('This is the sidebar in the footer, the second on the right', 'cafe-bistro'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

' )); /**== Footer Sidebar 4 ==**/ register_sidebar(array( 'name' => __('Footer Sidebar 4', 'cafe-bistro'), 'id' => 'cb-footer-4', 'description' => __('This is the sidebar in the footer, on the right', 'cafe-bistro'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

' )); } /* * Misc Functions that apply to this file */ if (version_compare($GLOBALS['wp_version'], '4.1', '<')) : function cb_wp_title($title, $sep) { if (is_feed()) { return $title; } global $page, $paged; $title .= get_bloginfo('name', 'display'); $site_description = get_bloginfo('description', 'display'); if ($site_description && (is_home() || is_front_page())) { $title .= " $sep $site_description"; } if (($paged >= 2 || $page >= 2) && !is_404()) { $title .= " $sep " . sprintf(__('Page %s', 'cafe-bistro'), max($paged, $page)); } return $title; } add_filter('wp_title', 'cb_wp_title', 10, 2); endif; /* * . Required Files */ require_once(CB_FRAMEWORK_REQUIRED_PATH . 'base-init.php');