\n\n"; echo $output; } } /** * Creates a nicely formatted and more specific title element text * for output in head of document, based on current view. * @since 1.0 * */ function terrifico_wp_title( $title, $sep ) { global $paged, $page; if ( is_feed() ) return $title; // Add the site name. $title .= get_bloginfo( 'name' ); // Add the site description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) $title = "$title $sep $site_description"; // Add a page number if necessary. if ( $paged >= 2 || $page >= 2 ) $title = "$title $sep " . sprintf( __( 'Page %s', 'terrifico' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'terrifico_wp_title', 10, 2 ); /** * Add scripts function * @since 1.0 */ add_action('wp_enqueue_scripts','terrifico_add_script_function'); function terrifico_add_script_function() { /** * Load Styles * @since 1.0 */ wp_enqueue_style('terrifico', get_stylesheet_uri()); wp_enqueue_style ('reset', get_stylesheet_directory_uri() . '/css/reset.css'); wp_enqueue_style ('basic', get_stylesheet_directory_uri() . '/css/basic.css'); wp_enqueue_style ('top-panel', get_stylesheet_directory_uri() . '/css/top-panel.css'); wp_enqueue_style ('menu', get_stylesheet_directory_uri() . '/css/menu.css'); wp_enqueue_style ('layout', get_stylesheet_directory_uri() . '/css/layout.css'); wp_enqueue_style ('blog', get_stylesheet_directory_uri() . '/css/blog.css'); wp_enqueue_style ('footer', get_stylesheet_directory_uri() . '/css/footer.css'); wp_enqueue_style ('image-sliders', get_stylesheet_directory_uri() . '/css/image-sliders.css'); wp_enqueue_style ('font-awesome', get_stylesheet_directory_uri() . '/css/font-awesome.css'); wp_enqueue_style ('elements', get_stylesheet_directory_uri() . '/css/elements.css'); wp_enqueue_style ('sidebar', get_stylesheet_directory_uri() . '/css/sidebar.css'); wp_enqueue_style ('comments', get_stylesheet_directory_uri() . '/css/comments.css'); wp_enqueue_style ('woocommerce', get_stylesheet_directory_uri() . '/css/woocommerce.css'); global $data; if($data['google_font_body'] != 'None'): wp_enqueue_style ('body-font', 'http://fonts.googleapis.com/css?family='. urlencode($data['google_font_body']) .':400,400italic,700,700italic&subset=latin,greek-ext,cyrillic,latin-ext,greek,cyrillic-ext,vietnamese'); endif; if($data['google_font_menu'] != 'None'): wp_enqueue_style ('body-font', 'http://fonts.googleapis.com/css?family='. urlencode($data['google_font_menu']) .':400,400italic,700,700italic&subset=latin,greek-ext,cyrillic,latin-ext,greek,cyrillic-ext,vietnamese'); endif; if($data['google_font_logo'] != 'None'): wp_enqueue_style ('body-font', 'http://fonts.googleapis.com/css?family='. urlencode($data['google_font_logo']) .':400,400italic,700,700italic&subset=latin,greek-ext,cyrillic,latin-ext,greek,cyrillic-ext,vietnamese'); endif; /** * Load Scripts * @since 1.0 */ wp_enqueue_script('jquery'); wp_enqueue_script('superfish', get_stylesheet_directory_uri() . '/js/superfish.js'); wp_enqueue_script('supersubs', get_stylesheet_directory_uri() . '/js/supersubs.js'); wp_enqueue_script('flexslider', get_stylesheet_directory_uri() . '/js/jquery.flexslider.js'); wp_enqueue_script('modernizr', get_stylesheet_directory_uri() . '/js/modernizr.js'); wp_enqueue_script('easing', get_stylesheet_directory_uri() . '/js/jquery.easing.js'); wp_enqueue_script('hoverintent', get_stylesheet_directory_uri() . '/js/jquery.hoverIntent.js'); wp_enqueue_script('carousel', get_stylesheet_directory_uri() . '/js/jquery.carouFredSel-6.2.1.js'); wp_enqueue_script('mosaic', get_stylesheet_directory_uri() . '/js/mosaic.1.0.1.js'); wp_enqueue_script('custom', get_stylesheet_directory_uri() . '/js/custom.js'); wp_enqueue_script('smoothscroll', get_stylesheet_directory_uri() . '/js/jquery.smooth-scroll.min.js'); wp_enqueue_script('cycle', get_stylesheet_directory_uri() . '/js/jquery.cycle.lite.js'); wp_enqueue_script('tinynav', get_stylesheet_directory_uri() . '/js/tinynav.min.js'); wp_enqueue_script('refineslide', get_stylesheet_directory_uri() . '/js/jquery.refineslide.js'); wp_enqueue_script('respond', get_stylesheet_directory_uri() . '/js/respond.min.js'); } /** * Register widgetized locations * @since 1.0 */ register_sidebar(array( 'name' => __( 'Main Sidebar', 'terrifico' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => __( 'Footer Widget 1', 'terrifico' ), 'id' => 'footer-widget-1', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => __( 'Footer Widget 2', 'terrifico' ), 'id' => 'footer-widget-2', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => __( 'Footer Widget 3', 'terrifico' ), 'id' => 'footer-widget-3', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => __( 'Footer Widget 4', 'terrifico' ), 'id' => 'footer-widget-4', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', )); /** * Load function to change excerpt length * @since 1.0 */ function terrifico_excerpt_length( $length ) { global $data; if(isset($data['blog_excerpt'])) { return $data['blog_excerpt']; } } add_filter('excerpt_length', 'terrifico_excerpt_length', 999); /** * Displays navigation to next/previous pages * @since 1.0 */ function terrifico_pagination($pages = '', $range = 4) { $showitems = ($range * 2)+1; global $paged; if(empty($paged)) $paged = 1; if($pages == '') { global $wp_query; $pages = $wp_query->max_num_pages; if(!$pages) { $pages = 1; } } if(1 != $pages) { echo "
Page ".$paged." of ".$pages.""; if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "« First"; if($paged > 1 && $showitems < $pages) echo "‹ Previous"; for ($i=1; $i <= $pages; $i++) { if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems )) { echo ($paged == $i)? "".$i."":"".$i.""; } } if ($paged < $pages && $showitems < $pages) echo "Next ›"; if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "Last »"; echo "
\n"; } } /** * Load Comments Support * @since 1.0 */ function terrifico_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case 'pingback' : case 'trackback' : ?>
  • ', '' ); ?>

  • id="li-comment-">
    on
    %s says:'), get_comment_author_link()) ?> ', '' ); ?>
    comment_approved == '0' ) : ?>
    __( 'Reply ', 'terrifico' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>

    featured icon

    featured icon

    featured icon

    featured icon

    1col

    1col

    1col