=')): 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-">
', 'before_title' => '
%s','cafe-bistro'), get_comment_author_link()); ?>