' . __( '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' ); /** * 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 ); /** * Generate favicon in header page * * @since Orbit 1.0.0 */ function orbit_favicon() { $options = orbit_get_theme_options(); if ( $options['favicon'] != '' ) echo ''; } add_action('wp_head', 'orbit_favicon'); /** * 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 .= '
  • '; $content .= '' . esc_attr( $social_text ) . ' '; $content .= '
  • '; } } if ( !empty( $content ) ) { $output = apply_filters( 'orbit_render_social_items', $content ); $output = $before . $output . $after; echo $output; } } /** * Add class "first-menu-item" in first element in menu * * @since Orbit 1.1.0 */ function add_markup_pages($output) { $output= preg_replace('/class="menu-item/', 'class="first-menu-item menu-item', $output, 1); return $output; } add_filter('wp_nav_menu', 'add_markup_pages'); /** * Menu custom orbit. Delete exceed class in ul list menu * * @since Orbit 1.0.0 */ function orbit_custom_menu( $theme_location, $menu_classes, $ul_class, $depth ) { $str_classes = implode( " ", $menu_classes ); $str_menu = wp_nav_menu( array( 'container' => 'div', 'container_class' => $str_classes, 'menu_class' => $str_classes, 'theme_location' => $theme_location, 'depth' => $depth, 'echo' => FALSE ) ); $str_menu = str_replace( array( '" class="' . $str_classes . '">', '