' . __( 'Read more ›', 'orbit' ) . '

'; } add_filter( 'excerpt_more', 'orbit_remove_ellipsis_excerpts' ); /** * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link. * * @since Orbit 1.0.0 */ function orbit_add_home_link_menu( $args ) { $args['show_home'] = true; return $args; } add_filter( 'wp_page_menu_args', 'orbit_add_home_link_menu' ); if ( ! function_exists( '_wp_render_title_tag' ) ) { /** * Creates a nicely formatted and more specific title element text * for output in head of document, based on current view. * * @since Orbit 1.0.0 */ function orbit_wp_title( $title, $sep ) { 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; return $title; } add_filter( 'wp_title', 'orbit_wp_title', 10, 2 ); } /** * Filter the separator for the document title. * * @since Orbit 1.2.0 */ function orbit_title_separator( $sep ){ $sep = '|'; return $sep; } add_filter( 'document_title_separator', 'orbit_title_separator', 10 ); /** * Template for comments and pingbacks. * * To override this walker in a child theme without modifying the comments template * simply create your own orbit_render_list_comments(), and that function will be used instead. * * Used as a callback by wp_list_comments() for displaying the comments. * * @since Orbit 1.0.0 */ function orbit_render_list_comments( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; if ( $comment->comment_approved == '1' ): ?>
  • id="li-comment-">
    comment_type == 'pingback' || $comment->comment_type == 'trackback' ): ?>

    | ', '' ); ?>

    %2$s %3$s %4$s', get_comment_time( 'c' ), get_comment_date(), __( 'at', 'orbit' ), get_comment_time() ); ?> | ', '' ); ?> __( 'Reply ', 'orbit' ), 'depth' => $depth, 'max_depth' => $args['max_depth'], 'before' => ' | ', 'after' => '' ) ) ); ?>

    current ) { $GLOBALS['orbit_current_menu_title'] = $menu_item->title; break; } } return $sorted_menu_items; } add_filter( 'wp_nav_menu_objects', 'orbit_capture_title_page_for_breadcrumb' ); /** * Render Breadcrumb (Child Theme Support) * * @since Orbit 1.1.0 */ if ( function_exists('childorbit_render_breadcrumb' ) ) { /** * Render Breadcrumb from child Theme * * @since Orbit 1.1.0 */ function orbit_render_breadcrumb() { childorbit_render_breadcrumb(); } } else { /** * Render Breadcrumb. * * @since Orbit 1.0.0 */ function orbit_render_breadcrumb() { global $post; $content = ''; $chevron = ''; $before = ''; } else { $after = '

    '; } if ( !is_front_page() || ( 'posts' == get_option( 'show_on_front' ) && is_front_page() ) ){ if ( is_search() ) { $content = sprintf( __( 'Search Results for: "%s"', 'orbit' ), get_search_query() ); } elseif ( is_home() ) { // Name of page used to show post blog (Can you use News, Last news...) if ( isset( $GLOBALS['orbit_current_menu_title'] ) ) $content = $GLOBALS['orbit_current_menu_title']; else $content = 'Blog'; } elseif ( is_page() && !$post->post_parent ) { $content = get_the_title(); } elseif ( is_page() && $post->post_parent ) { $parent_id = $post->post_parent; $breadcrumbs = array(); while ( $parent_id ) { $page = get_page( $parent_id ); $breadcrumbs[] = '' . get_the_title( $page->ID ) . ''; $parent_id = $page->post_parent; } $breadcrumbs = array_reverse( $breadcrumbs ); foreach ($breadcrumbs as $crumb) $content .= $crumb . ' ' . $chevron . ' '; $content .= get_the_title(); } elseif ( is_single() && !is_attachment() ) { if ( get_post_type() != 'post' ) { $post_type = get_post_type_object( get_post_type() ); $slug = $post_type->rewrite; $content = '' . $post_type->labels->singular_name . ' ' . $chevron . ' ' . get_the_title(); } else { $cat = get_the_category(); $cat = $cat[0]; $content = get_category_parents( $cat, TRUE, ' ' . $chevron . ' ' ) . get_the_title(); } } elseif ( is_category() ) { global $wp_query; $cat_obj = $wp_query->get_queried_object(); $thisCat = $cat_obj->term_id; $thisCat = get_category( $thisCat ); $parentCat = get_category( $thisCat->parent ); $content = __( 'Category: ', 'orbit' ); if ($thisCat->parent != 0) $content .= get_category_parents( $parentCat, TRUE, ' ' . $chevron . ' ' ); $content .= single_cat_title( '', false ); } elseif ( is_tag() ) { $content = sprintf( __( 'Tag: %s', 'orbit' ), single_tag_title( '', false ) ); } elseif ( is_author() ) { global $author; $userdata = get_userdata( $author ); $content = sprintf( __( 'All posts by %s', 'orbit' ), $userdata->display_name ); } elseif ( is_404() ) { $content = __( 'Error 404 ','orbit' ); } elseif ( is_day() ) { $content = __( 'Daily Archives: ', 'orbit' ); $content .= '' . get_the_time( 'Y' ) . ' ' . $chevron . ' '; $content .= '' . get_the_time( 'F' ) . ' ' . $chevron . ' '; $content .= get_the_time( 'd' ); } elseif ( is_month() ) { $content = __( 'Monthly Archives: ', 'orbit' ); $content .= '' . get_the_time( 'Y' ) . ' ' . $chevron . ' '; $content .= get_the_time( 'F' ); } elseif ( is_year() ) { $content = __( 'Yearly Archives: ', 'orbit' ) . get_the_time( 'Y' ); } } $output = array( 'content' => $content , 'before' => $before, 'after' => $after ); $output = apply_filters( 'orbit_render_breadcrumb', $output ); $outputlast = $output['before'] . $output['content'] . $output['after']; echo $outputlast; } } /** * Render social items * * @since Orbit 1.0.0 */ function orbit_render_social_items(){ $options = orbit_get_theme_options(); $before = '
    '; $content = ''; foreach ( orbit_get_social_theme_options() as $social => $social_text) { if ( !empty( $options[ $social ] ) ) { $content .= '
  • '; } } if ( !empty( $content ) ) { $output = apply_filters( 'orbit_render_social_items', $content ); $output = $before . $output . $after; echo $output; } } /** * Render sidebar * * @since Orbit 1.0.0 */ function orbit_get_sidebar( $location ){ $options = orbit_get_theme_options(); if ( is_page_template( 'full-width-page.php' ) && is_front_page() ){ return; } $sidebar = ''; if ( is_page_template( 'second-page.php' ) ){ $sidebar = 'two'; } if ( ( $location == 'rigth' ) && ( $options['theme_layout'] == 'content-sidebar' ) ) { get_sidebar( $sidebar ); } if ( ( $location == 'left' ) && ( $options['theme_layout'] == 'sidebar-content' ) ) { get_sidebar( $sidebar ); } } /** * Render pagination * * @since Orbit 1.0.0 */ function orbit_navigatin_pages( $wp_query ){ $big = 999999999; echo paginate_links(array( 'base' => str_replace( $big, '%#%', get_pagenum_link( $big ) ), 'format' => '/page/%#%/', 'current' => max( 1, get_query_var( 'paged' ) ), 'total' => $wp_query->max_num_pages, 'prev_text' => ' ‹ ' . __( 'Previous Page', 'orbit' ) . ' ', 'next_text' => ' ' . __( 'Next Page', 'orbit' ) . ' ›' ) ); } /** * Check if all images for slider are empty * * @since Orbit 1.1.0 */ function orbit_slider_image_field_empty() { $options = orbit_get_theme_options(); for ( $i=1; $i <= orbit_get_setting( 'orbit_slide_images' ) ; $i++ ) { if ( isset( $options[ 'slide_image_' . $i ] ) ) { if ( $options[ 'slide_image_' . $i ] != '' ) return false; } } return true; } /** * Render slider in front page * * @since Orbit 1.1.0 */ function orbit_render_front_boxes(){ $show = TRUE; $show = apply_filters('orbit_show_front_boxes', $show); if ( $show ) { $text_boxes = array( __( 'Responsive Design', 'orbit' ) => __( 'Design site adjusts to any mobile device including the iOS and Android devices.
    Widget Area "Front Box 1"', 'orbit' ), __( 'Feature Slider', 'orbit' ) => __( 'Orbit get a Responsive Slider that displays images on any device.
    Widget Area "Front Box 2"', 'orbit' ), __( 'Free Support', 'orbit' ) => sprintf( __( 'If you need help, visit our %s or %s
    Widget Area "Front Box 3"', 'orbit' ), '' . __( 'Documentation', 'orbit' ) . '', '' . __( 'Support Forum', 'orbit' ) . '')); $num_box = 1; foreach ($text_boxes as $title => $desc) { $widget_box = 'front-box-' . $num_box; ?>

    Orbit'; $cr = $cr . ' & WordPress.'; echo $cr; } add_action( 'bit_footer_credit', 'orbit_credit', 10 ); /** * Add responsive container to embeds * * @since Orbit 1.1.5 */ function orbit_embed_html( $html ) { return '
    ' . $html . '
    '; } add_filter( 'embed_oembed_html', 'orbit_embed_html', 10, 3 ); add_filter( 'video_embed_html', 'orbit_embed_html' ); // Jetpack ?>