urlencode( implode( '|', $font_families ) ), 'subset' => urlencode( 'latin,latin-ext' ), ); // Create Fonts URL $fonts_url = add_query_arg( $query_args, '//fonts.googleapis.com/css' ); endif; return apply_filters( 'smartline_google_fonts_url', $fonts_url ); } // Setup Function: Registers support for various WordPress features add_action( 'after_setup_theme', 'smartline_setup' ); if ( ! function_exists( 'smartline_setup' ) ): function smartline_setup() { // Set Content Width global $content_width; if ( ! isset( $content_width ) ) $content_width = 860; // init Localization load_theme_textdomain('smartline-lite', get_template_directory() . '/languages' ); // Add Theme Support add_theme_support('post-thumbnails'); add_theme_support('automatic-feed-links'); add_theme_support('title-tag'); add_editor_style(); // Add Custom Background add_theme_support('custom-background', array( 'default-color' => 'e5e5e5', 'default-image' => get_template_directory_uri() . '/images/background.png')); // Add Custom Header add_theme_support('custom-header', array( 'header-text' => false, 'width' => 1340, 'height' => 250, 'flex-height' => true)); // Add Theme Support for Smartline Pro Plugin add_theme_support( 'smartline-pro' ); // Register Navigation Menus register_nav_menu( 'primary', __('Main Navigation', 'smartline-lite') ); register_nav_menu( 'secondary', __('Top Navigation', 'smartline-lite') ); register_nav_menu( 'footer', __('Footer Navigation', 'smartline-lite') ); // Register Social Icons Menu register_nav_menu( 'social', __('Social Icons', 'smartline-lite') ); } endif; // Add custom Image Sizes add_action( 'after_setup_theme', 'smartline_add_image_sizes' ); if ( ! function_exists( 'smartline_add_image_sizes' ) ): function smartline_add_image_sizes() { // Add Custom Header Image Size add_image_size( 'custom_header_image', 1340, 250, true); // Add Featured Image Size add_image_size( 'featured_image', 300, 200, true); // Add Slider Image Size add_image_size( 'slider_image', 880, 350, true); // Add Frontpage Thumbnail Sizes add_image_size( 'category_posts_wide_thumb', 600, 240, true); add_image_size( 'category_posts_small_thumb', 90, 90, true); add_image_size( 'category_posts_single', 880, 260, true); // Add Widget Post Thumbnail Size add_image_size( 'widget_post_thumb', 75, 75, true); } endif; // Register Sidebars add_action( 'widgets_init', 'smartline_register_sidebars' ); if ( ! function_exists( 'smartline_register_sidebars' ) ): function smartline_register_sidebars() { // Register Sidebars register_sidebar( array( 'name' => __( 'Sidebar', 'smartline-lite' ), 'id' => 'sidebar', 'description' => __( 'Appears on posts and pages except front page and fullwidth template.', 'smartline-lite' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', )); register_sidebar( array( 'name' => __( 'Magazine Front Page', 'smartline-lite' ), 'id' => 'frontpage-magazine', 'description' => __( 'Appears on Magazine Front Page page template only. You can use the Category Posts widgets here.', 'smartline-lite' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); } endif; // Add title tag for older WordPress versions if ( ! function_exists( '_wp_render_title_tag' ) ) : add_action( 'wp_head', 'smartline_wp_title' ); function smartline_wp_title() { ?> <?php wp_title( '|', true, 'right' ); ?> '. wp_list_pages('title_li=&echo=0') .''; } // Get Featured Posts function smartline_get_featured_content() { return apply_filters( 'smartline_get_featured_content', false ); } // Change Excerpt Length add_filter('excerpt_length', 'smartline_excerpt_length'); function smartline_excerpt_length($length) { return 60; } // Slideshow Excerpt Length function smartline_slideshow_excerpt_length($length) { return 15; } // Frontpage Category Excerpt Length function smartline_frontpage_category_excerpt_length($length) { return 25; } // Change Excerpt More add_filter('excerpt_more', 'smartline_excerpt_more'); function smartline_excerpt_more($more) { // Get Theme Options from Database $theme_options = smartline_theme_options(); // Return Excerpt Text if ( isset($theme_options['excerpt_text']) and $theme_options['excerpt_text'] == true ) : return ' [...]'; else : return ''; endif; } // Custom Template for comments and pingbacks. if ( ! function_exists( 'smartline_list_comments' ) ): function smartline_list_comments($comment, $args, $depth) { $GLOBALS['comment'] = $comment; if( $comment->comment_type == 'pingback' or $comment->comment_type == 'trackback' ) : ?>
  • id="comment-">

    ', '' ); ?>

  • id="comment-">
    %s', 'smartline-lite'), get_comment_author_link()) ?>
    comment_approved == '0') : ?>

    $depth, 'max_depth' => $args['max_depth']))) ?>