false, 'mainbar_class' => 'col-md-12' ); if ( ! empty( $layout ) ) { /* Choose layout class */ switch ( $layout ) { case 'full': $mainbar = 'col-md-12'; $sidebar = false; break; case 'right': $mainbar = 'col-md-9'; $sidebar = 'col-md-3'; break; case 'left': $mainbar = 'col-md-9 col-md-push-3'; $sidebar = 'sidebar-left col-md-3 col-md-pull-9'; break; default: $mainbar = 'col-md-12'; $sidebar = false; break; } $data['sidebar_class'] = $sidebar; $data['mainbar_class'] = $mainbar; } return apply_filters( 'mino_set_bar_class', $data ); } } /** * Set custom mino pagination links * @param array $args Arguments about pagination configurations * @return - */ if ( ! function_exists( 'mino_paginate_links' ) ) { function mino_paginate_links( $args ) { global $wp_query, $wp_rewrite; $max_pages = $wp_query->max_num_pages; /* Custom WP_Query */ if ( isset( $args['used_query'] ) ) { $max_pages = $args['used_query']->max_num_pages; } if ( $max_pages < 2 ) { return; } /** * Get current URI page */ if ( get_query_var( 'paged' ) ) { $paged = get_query_var( 'paged' ); } elseif ( get_query_var( 'page' ) ) { $paged = get_query_var( 'page' ); } else { $paged = 1; } $big = 999999999; // need an unlikely integer $paginate_link_data = apply_filters( 'mino_set_paginate_link', array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?paged=%#%', 'current' => max( 1, $paged ), 'total' => $max_pages, 'type' => 'array', 'prev_text' => '', 'next_text' => '', ) ); $paginate_links = paginate_links( $paginate_link_data ); $paginate = $next_prev = null; foreach ( $paginate_links as $links => $value ) { $next_prev_a = null; /* Current number */ if ( strpos( $value, 'current' ) ) { $value = str_replace( 'span', 'a', $value ); } /* Next Prev */ if ( strpos( $value, 'prev' ) || strpos( $value, 'next' ) ) { $next_prev_a = $value; $value = null; } $paginate .= ( ! empty( $value ) ) ? '
  • ' . $value . '
  • ' : null; $next_prev .= $next_prev_a; } $output = ''; echo apply_filters( 'mino_paginate_output', $output ); } } /** * Custom category list * @param int $id Post ID * @return - */ if ( ! function_exists( 'mino_category_list' ) ) { function mino_category_list( $id, $pre_text = '' ) { if ( $pre_text == '' ) { $pre_text = __( 'Posted in', 'mino' ); } $categories = get_the_category( $id ); if ( ! empty( $categories ) ) { echo $pre_text . ' ' . get_the_category_list( ', ' ); } } } /** * Custom tag list * @param int $id Post ID * @return - */ if ( ! function_exists( 'mino_tag_list' ) ) { function mino_tag_list( $id = false ) { $tags = get_the_tags( $id ); $tag_list = null; if ( ! empty( $tags ) ) { foreach ( $tags as $tag ) { $tag_list .= '' . $tag->name . ''; } echo '' . $tag_list . ''; } } } /** * Mino_Walker_Comment * Extended Walker_Comment class * * @package Mino * @since Mino 1.0.1 */ /** * HTML comment custom list class and layouts * * @uses Walker_Comment * @since 4.1 */ class Mino_Walker_Comment extends Walker_Comment { var $tree_type = 'comment'; var $db_fields = array( 'parent' => 'comment_parent', 'id' => 'comment_ID' ); function __construct() { /* Empty consctruct */ } /* Start Comment List for children list */ function start_lvl( &$output, $depth = 0, $args = array() ) { $GLOBALS['comment_depth'] = $depth + 1; echo ''; } /* Start Comment List */ function start_el( &$output, $comment, $depth = 0, $args = array(), $id = 0 ) { $depth++; $GLOBALS['comment_depth'] = $depth; $GLOBALS['comment'] = $comment; $parent_class = ( empty( $args['has_children'] ) ? '' : 'parent' ); ?>
  • id="comment-">
    comment_approved ) : ?>
    get_lapse_of_time( get_comment_date( 'Y-m-d' ), get_comment_time( 'H:i:s' ) ); ?>
    'comment', 'depth' => $depth, 'max_depth' => $args['max_depth'] ); comment_reply_link( array_merge( $args, $reply_args ) ); ?>
  • __( 'year', 'mino' ), 'm' => __( 'month', 'mino' ), 'd' => __( 'day', 'mino' ), 'h' => __( 'hour', 'mino' ), 'i' => __( 'minute', 'mino' ) ); $diff = date_diff( $comment_time, $current_time ); foreach ( $diff as $key => $value ) { if ( $value != 0 ) { if ( $key == 's' ) { echo __( 'Just now', 'mino' ); return false; } $format = $time_format[$key]; $format = ( $value > 1 ) ? $format . 's' : $format; echo sprintf( __( '%1$s %2$s ago', 'mino' ), $value, $format ); return false; } } } /** DESTRUCTOR * I'm just using this since we needed to use the constructor to reach the top * of the comments list, just seems to balance out nicely:) */ function __destruct() { echo ''; } } /** * Dimox Breadcrumbs * @see http://dimox.net/wordpress-breadcrumbs-without-a-plugin/ * @since 1.0 * * Add this to any template file by calling mino_dimox_breadcrumbs() * * Changes: * - MC added taxonomy support * - Add settings to check the breadcrumb is enabled or not * - Replace get_query_var( 'cat' ) with get_queried_object_id() */ if ( ! function_exists( 'mino_dimox_breadcrumbs' ) ) { function mino_dimox_breadcrumbs(){ $enable_breadcrumb = get_theme_mod( 'mino_breadcrumb_customizer_set', 'all' ); if ( (array) $enable_breadcrumb == $enable_breadcrumb ) { /* Check one by one */ if ( is_single() ) { if ( ! in_array( 'post', $enable_breadcrumb ) ) { return; } } elseif ( is_page() ) { if ( ! in_array( 'page', $enable_breadcrumb ) ) { return; } } elseif ( is_attachment() ) { if ( ! in_array( 'attachment', $enable_breadcrumb ) ) { return; } } elseif ( is_search() ) { if ( ! in_array( 'search', $enable_breadcrumb ) ) { return; } } elseif ( is_category() ) { if ( ! in_array( 'category', $enable_breadcrumb ) ) { return; } } elseif ( is_author() ) { if ( ! in_array( 'author', $enable_breadcrumb ) ) { return; } } elseif ( is_archive() ) { if ( ! in_array( 'archive', $enable_breadcrumb ) ) { return; } } } /* === OPTIONS === */ $text['home'] = __( 'Home', 'mino' ); // text for the 'Home' link $text['category'] = __( 'Archive by Category "%s"', 'mino' ); // text for a category page $text['tax'] = __( 'Archive for "%s"', 'mino' ); // text for a taxonomy page $text['search'] = __( 'Search Results for "%s" Query', 'mino' ); // text for a search results page $text['tag'] = __( 'Posts Tagged "%s"', 'mino' ); // text for a tag page $text['author'] = __( 'Articles Posted by %s', 'mino' ); // text for an author page $text['404'] = __( 'Error 404', 'mino' ); // text for the 404 page $showCurrent = 1; // 1 - show current post/page title in breadcrumbs, 0 - don't show $showOnHome = 0; // 1 - show breadcrumbs on the homepage, 0 - don't show $delimiter = ''; // delimiter between crumbs $before = '
  • '; // tag before the current crumb $after = '
  • '; // tag after the current crumb /* === END OF OPTIONS === */ global $post; $output = ''; $homeLink = esc_url( home_url() ); $linkBefore = '
  • '; $linkAfter = '
  • '; $linkAttr = ' rel="v:url" property="v:title"'; $link = $linkBefore . '%2$s' . $linkAfter; if (is_home() || is_front_page()) { if ($showOnHome == 1) $output .= '