/** * Custom breadcrumbs. * * @package Bloghash * @author Peregrine Themes * @since 1.0.0 */ /** * Do not allow direct script access. */ if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! function_exists( 'bloghash_breadcrumb_trail' ) ) { /** * Show a breadcrumb. * * @since 1.0.0 * @param array $args Arguments to pass. */ function bloghash_breadcrumb_trail( $args = array() ) { // Check if breadcrumb is turned on from WPSEO option. $breadcrumb_enable = is_callable( 'WPSEO_Options::get' ) ? WPSEO_Options::get( 'breadcrumbs-enable' ) : false; $wpseo_option = get_option( 'wpseo_internallinks' ) ? get_option( 'wpseo_internallinks' ) : $breadcrumb_enable; if ( ! is_array( $wpseo_option ) ) { unset( $wpseo_option ); $wpseo_option = array( 'breadcrumbs-enable' => $breadcrumb_enable, ); } if ( function_exists( 'yoast_breadcrumb' ) && $wpseo_option && true === $wpseo_option['breadcrumbs-enable'] ) { // Yoast breadcrumb. return yoast_breadcrumb(); } elseif ( function_exists( 'seopress_display_breadcrumbs' ) ) { // SEOPress breadcrumb. return seopress_display_breadcrumbs(); } elseif ( function_exists( 'rank_math_the_breadcrumbs' ) ) { // Rank Math breadcrumbs. return rank_math_the_breadcrumbs(); } // Bloghash breadcrumb trail. $breadcrumb = apply_filters( 'bloghash_breadcrumb_trail_object', null, $args ); if ( ! is_object( $breadcrumb ) ) { $breadcrumb = new Bloghash_Breadcrumb_Trail( $args ); } return $breadcrumb->trail(); } /** * Before HTML for SEOPress breadcrumbs. * * @since 1.0.0 */ function bloghash_seopress_breadcrumbs_before_html() { echo '
'; } add_action( 'seopress_breadcrumbs_before_html', 'bloghash_seopress_breadcrumbs_before_html' ); /** * After HTML for SEOPress breadcrumbs. * * @since 1.0.0 */ function bloghash_seopress_breadcrumbs_after_html() { echo '
'; } add_action( 'seopress_breadcrumbs_after_html', 'bloghash_seopress_breadcrumbs_after_html' ); /** * Overwrite the items for the breadcrumb trail. * * @since 1.0.0 * * @param array $items Array of items belonging to the current breadcrumb trail. * @param array $args Arguments used to build the breadcrumb trail. */ function bloghash_breadcrumb_trail_items( $items, $args ) { // Add link to the Blog page. if ( is_singular( 'post' ) ) { $page_for_posts = get_option( 'page_for_posts' ); $front_page = get_option( 'page_on_front' ); if ( $page_for_posts && $front_page ) { $posts_page_url = sprintf( '%s', esc_url( get_permalink( $page_for_posts ) ), esc_html( get_the_title( $page_for_posts ) ) ); array_splice( $items, 1, 0, $posts_page_url ); } } return $items; } add_filter( 'bloghash_breadcrumb_trail_items', 'bloghash_breadcrumb_trail_items', 10, 2 ); } /** * Creates a breadcrumbs menu for the site based on the current page that's being viewed by the user. * * @since 1.0.0 * @access public */ class Bloghash_Breadcrumb_Trail { /** * Array of items belonging to the current breadcrumb trail. * * @since 1.0.0 * @access public * @var array */ public $items = array(); /** * Arguments used to build the breadcrumb trail. * * @since 1.0.0 * @access public * @var array */ public $args = array(); /** * Array of text labels. * * @since 1.0.0 * @access public * @var array */ public $labels = array(); /** * Array of post types (key) and taxonomies (value) to use for single post views. * * @since 1.0.0 * @access public * @var array */ public $post_taxonomy = array(); /* ====== Magic Methods ====== */ /** * Magic method to use in case someone tries to output the layout object as a string. * We'll just return the trail HTML. * * @since 1.0.0 * @access public * @return string */ public function __toString() { return $this->trail(); } /** * Sets up the breadcrumb trail properties. Calls the `Breadcrumb_Trail::add_items()` method * to creat the array of breadcrumb items. * * @since 1.0.0 * @access public * @param array $args Optional. * @type string $container Container HTML element. nav|div. * @type string $before String to output before breadcrumb menu. * @type string $after String to output after breadcrumb menu. * @type string $browse_tag The HTML tag to use to wrap the "Browse" header text. * @type string $list_tag The HTML tag to use for the list wrapper. * @type string $item_tag The HTML tag to use for the item wrapper. * @type bool $show_on_front Whether to show when `is_front_page()`. * @type bool $network Whether to link to the network main site (multisite only). * @type bool $show_title Whether to show the title (last item) in the trail. * @type bool $show_browse Whether to show the breadcrumb menu header. * @type array $labels Text labels. @see Breadcrumb_Trail::set_labels() * @type array $post_taxonomy Taxonomies to use for post types. @see Breadcrumb_Trail::set_post_taxonomy() * @type bool $echo Whether to print or return the breadcrumbs. * @return void */ public function __construct( $args = array() ) { $defaults = array( 'container' => 'nav', 'before' => '', 'after' => '', 'browse_tag' => 'h2', 'list_tag' => 'ul', 'item_tag' => 'li', 'show_on_front' => true, 'network' => false, 'show_title' => true, 'show_browse' => true, 'labels' => array(), 'post_taxonomy' => array(), 'echo' => true, ); // Parse the arguments with the deaults. $this->args = apply_filters( 'bloghash_breadcrumb_trail_args', wp_parse_args( $args, $defaults ) ); // Set the labels and post taxonomy properties. $this->set_labels(); $this->set_post_taxonomy(); // Let's find some items to add to the trail! $this->add_items(); } /* ====== Public Methods ====== */ /** * Formats the HTML output for the breadcrumb trail. * * @since 1.0.0 * @access public * @return string */ public function trail() { // Set up variables that we'll need. $breadcrumb = ''; $item_count = count( $this->items ); $item_position = 0; // Connect the breadcrumb trail if there are items in the trail. if ( 0 < $item_count ) { // Add 'browse' label if it should be shown. if ( true === $this->args['show_browse'] ) { $breadcrumb .= sprintf( '<%1$s class="trail-browse">%2$s', tag_escape( $this->args['browse_tag'] ), $this->labels['browse'] ); } // Open the unordered list. $breadcrumb .= sprintf( '<%s class="trail-items" itemscope itemtype="http://schema.org/BreadcrumbList">', tag_escape( $this->args['list_tag'] ) ); // Add the number of items and item list order schema. $breadcrumb .= sprintf( '', absint( $item_count ) ); $breadcrumb .= ''; // Loop through the items and add them to the list. foreach ( $this->items as $item ) { // Iterate the item position. ++$item_position; // Check if the item is linked. preg_match( '/()(.*?)(<\/a>)/i', $item, $matches ); // Wrap the item text with appropriate itemprop. $item = ! empty( $matches ) ? sprintf( '%s%s%s', $matches[1], $matches[2], $matches[3] ) : sprintf( '%s', $item ); // Wrap the item with its itemprop. $item = ! empty( $matches ) ? preg_replace( '/(/i', '$1$2 itemprop=$2item$2>', $item ) : sprintf( '%s', $item ); // Add list item classes. $item_class = 'trail-item'; if ( 1 === $item_position && 1 < $item_count ) { $item_class .= ' trail-begin'; } elseif ( $item_count === $item_position ) { $item_class .= ' trail-end'; } // Create list item attributes. $attributes = 'itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem" class="' . $item_class . '"'; // Build the meta position HTML. $meta = sprintf( '', absint( $item_position ) ); // Build the list item. $breadcrumb .= sprintf( '<%1$s %2$s>%3$s%4$s', tag_escape( $this->args['item_tag'] ), $attributes, $item, $meta ); } // Close the unordered list. $breadcrumb .= sprintf( '', tag_escape( $this->args['list_tag'] ) ); // Wrap the breadcrumb trail. $breadcrumb = sprintf( '<%1$s role="navigation" aria-label="%2$s" class="breadcrumb-trail breadcrumbs" itemprop="breadcrumb">%3$s%4$s%5$s', tag_escape( $this->args['container'] ), esc_attr( $this->labels['aria_label'] ), $this->args['before'], $breadcrumb, $this->args['after'] ); } // Allow developers to filter the breadcrumb trail HTML. $breadcrumb = apply_filters( 'bloghash_breadcrumb_trail', $breadcrumb, $this->args ); if ( false === $this->args['echo'] ) { return $breadcrumb; } echo $breadcrumb; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } /* ====== Protected Methods ====== */ /** * Sets the labels property. Parses the inputted labels array with the defaults. * * @since 1.0.0 * @access protected * @return void */ protected function set_labels() { $defaults = array( 'browse' => esc_html__( 'Browse:', 'bloghash' ), 'aria_label' => esc_attr_x( 'Breadcrumbs', 'breadcrumbs aria label', 'bloghash' ), 'home' => esc_html__( 'Home', 'bloghash' ), 'error_404' => esc_html__( '404 Not Found', 'bloghash' ), 'archives' => esc_html__( 'Archives', 'bloghash' ), // Translators: %s is the search query. 'search' => esc_html__( 'Search results for: %s', 'bloghash' ), // Translators: %s is the page number. 'paged' => esc_html__( 'Page %s', 'bloghash' ), // Translators: %s is the page number. 'paged_comments' => esc_html__( 'Comment Page %s', 'bloghash' ), // Translators: Minute archive title. %s is the minute time format. 'archive_minute' => esc_html__( 'Minute %s', 'bloghash' ), // Translators: Weekly archive title. %s is the week date format. 'archive_week' => esc_html__( 'Week %s', 'bloghash' ), // "%s" is replaced with the translated date/time format. 'archive_minute_hour' => '%s', 'archive_hour' => '%s', 'archive_day' => '%s', 'archive_month' => '%s', 'archive_year' => '%s', ); $this->labels = apply_filters( 'bloghash_breadcrumb_trail_labels', wp_parse_args( $this->args['labels'], $defaults ) ); } /** * Sets the `$post_taxonomy` property. This is an array of post types (key) and taxonomies (value). * The taxonomy's terms are shown on the singular post view if set. * * @since 1.0.0 * @access protected * @return void */ protected function set_post_taxonomy() { $defaults = array(); // If post permalink is set to `%postname%`, use the `category` taxonomy. if ( '%postname%' === trim( get_option( 'permalink_structure' ), '/' ) ) { $defaults['post'] = 'category'; } $this->post_taxonomy = apply_filters( 'bloghash_breadcrumb_trail_post_taxonomy', wp_parse_args( $this->args['post_taxonomy'], $defaults ) ); } /** * Runs through the various WordPress conditional tags to check the current page being viewed. Once * a condition is met, a specific method is launched to add items to the `$items` array. * * @since 1.0.0 * @access protected * @return void */ protected function add_items() { if ( is_front_page() ) { $this->add_front_page_items(); } else { // Add the network and site home links. $this->add_network_home_link(); $this->add_site_home_link(); if ( is_home() ) { $this->add_blog_items(); } elseif ( is_singular() ) { $this->add_singular_items(); } elseif ( is_archive() ) { if ( is_post_type_archive() ) { $this->add_post_type_archive_items(); } elseif ( is_category() || is_tag() || is_tax() ) { $this->add_term_archive_items(); } elseif ( is_author() ) { $this->add_user_archive_items(); } elseif ( get_query_var( 'minute' ) && get_query_var( 'hour' ) ) { $this->add_minute_hour_archive_items(); } elseif ( get_query_var( 'minute' ) ) { $this->add_minute_archive_items(); } elseif ( get_query_var( 'hour' ) ) { $this->add_hour_archive_items(); } elseif ( is_day() ) { $this->add_day_archive_items(); } elseif ( get_query_var( 'w' ) ) { $this->add_week_archive_items(); } elseif ( is_month() ) { $this->add_month_archive_items(); } elseif ( is_year() ) { $this->add_year_archive_items(); } else { $this->add_default_archive_items(); } } elseif ( is_search() ) { $this->add_search_items(); } elseif ( is_404() ) { $this->add_404_items(); } } // Add paged items if they exist. $this->add_paged_items(); // Allow developers to overwrite the items for the breadcrumb trail. $this->items = array_unique( apply_filters( 'bloghash_breadcrumb_trail_items', $this->items, $this->args ) ); } /** * Gets front items based on $wp_rewrite->front. * * @since 1.0.0 * @access protected * @return void */ protected function add_rewrite_front_items() { global $wp_rewrite; if ( $wp_rewrite->front ) { $this->add_path_parents( $wp_rewrite->front ); } } /** * Adds the page/paged number to the items array. * * @since 1.0.0 * @access protected * @return void */ protected function add_paged_items() { if ( is_singular() && 1 < get_query_var( 'page' ) && true === $this->args['show_title'] ) { // If viewing a paged singular post. $this->items[] = sprintf( $this->labels['paged'], number_format_i18n( absint( get_query_var( 'page' ) ) ) ); } elseif ( is_singular() && get_option( 'page_comments' ) && 1 < get_query_var( 'cpage' ) ) { // If viewing a singular post with paged comments. $this->items[] = sprintf( $this->labels['paged_comments'], number_format_i18n( absint( get_query_var( 'cpage' ) ) ) ); } elseif ( is_paged() && true === $this->args['show_title'] ) { // If viewing a paged archive-type page. $this->items[] = sprintf( $this->labels['paged'], number_format_i18n( absint( get_query_var( 'paged' ) ) ) ); } } /** * Adds the network (all sites) home page link to the items array. * * @since 1.0.0 * @access protected * @return void */ protected function add_network_home_link() { if ( is_multisite() && ! is_main_site() && true === $this->args['network'] ) { $this->items[] = sprintf( '%s', esc_url( network_home_url() ), $this->labels['home'] ); } } /** * Adds the current site's home page link to the items array. * * @since 1.0.0 * @access protected * @return void */ protected function add_site_home_link() { $network = is_multisite() && ! is_main_site() && true === $this->args['network']; $label = $network ? get_bloginfo( 'name' ) : $this->labels['home']; $rel = $network ? '' : ' rel="home"'; $this->items[] = sprintf( '%s', esc_url( user_trailingslashit( home_url() ) ), $rel, $label ); } /** * Adds items for the front page to the items array. * * @since 1.0.0 * @access protected * @return void */ protected function add_front_page_items() { // Only show front items if the 'show_on_front' argument is set to 'true'. if ( true === $this->args['show_on_front'] || is_paged() || ( is_singular() && 1 < get_query_var( 'page' ) ) ) { // Add network home link. $this->add_network_home_link(); if ( is_paged() ) { // If on a paged view, add the site home link. $this->add_site_home_link(); } elseif ( true === $this->args['show_title'] ) { // If on the main front page, add the network home title. $this->items[] = is_multisite() && true === $this->args['network'] ? get_bloginfo( 'name' ) : $this->labels['home']; } } } /** * Adds items for the posts page (i.e., is_home()) to the items array. * * @since 1.0.0 * @access protected * @return void */ protected function add_blog_items() { // Get the post ID and post. $post_id = get_queried_object_id(); $post = get_post( $post_id ); // If the post has parents, add them to the trail. if ( 0 < $post->post_parent ) { $this->add_post_parents( $post->post_parent ); } // Get the page title. $title = get_the_title( $post_id ); // Add the posts page item. if ( is_paged() ) { $this->items[] = sprintf( '%s', esc_url( get_permalink( $post_id ) ), $title ); } elseif ( $title && true === $this->args['show_title'] ) { $this->items[] = $title; } } /** * Adds singular post items to the items array. * * @since 1.0.0 * @access protected * @return void */ protected function add_singular_items() { // Get the queried post. $post = get_queried_object(); $post_id = get_queried_object_id(); if ( 0 < $post->post_parent ) { // If the post has a parent, follow the parent trail. $this->add_post_parents( $post->post_parent ); } else { // If the post doesn't have a parent, get its hierarchy based off the post type. $this->add_post_hierarchy( $post_id ); } // Display terms for specific post type taxonomy if requested. if ( ! empty( $this->post_taxonomy[ $post->post_type ] ) ) { $this->add_post_terms( $post_id, $this->post_taxonomy[ $post->post_type ] ); } // End with the post title. $post_title = single_post_title( '', false ); if ( $post_title ) { if ( ( 1 < get_query_var( 'page' ) || is_paged() ) || ( get_option( 'page_comments' ) && 1 < absint( get_query_var( 'cpage' ) ) ) ) { $this->items[] = sprintf( '%s', esc_url( get_permalink( $post_id ) ), $post_title ); } elseif ( true === $this->args['show_title'] ) { $this->items[] = $post_title; } } } /** * Adds the items to the trail items array for taxonomy term archives. * * @since 1.0.0 * @access protected * @global object $wp_rewrite * @return void */ protected function add_term_archive_items() { global $wp_rewrite; // Get some taxonomy and term variables. $term = get_queried_object(); $taxonomy = get_taxonomy( $term->taxonomy ); $done_post_type = false; // If there are rewrite rules for the taxonomy. if ( false !== $taxonomy->rewrite ) { // If 'with_front' is true, dd $wp_rewrite->front to the trail. if ( $taxonomy->rewrite['with_front'] && $wp_rewrite->front ) { $this->add_rewrite_front_items(); } // Get parent pages by path if they exist. $this->add_path_parents( $taxonomy->rewrite['slug'] ); // Add post type archive if its 'has_archive' matches the taxonomy rewrite 'slug'. if ( $taxonomy->rewrite['slug'] ) { $slug = trim( $taxonomy->rewrite['slug'], '/' ); // Deals with the situation if the slug has a '/' between multiple // strings. For example, "movies/genres" where "movies" is the post // type archive. $matches = explode( '/', $slug ); // If matches are found for the path. if ( isset( $matches ) ) { // Reverse the array of matches to search for posts in the proper order. $matches = array_reverse( $matches ); // Loop through each of the path matches. foreach ( $matches as $match ) { // Get public post types that match the rewrite slug. $post_types = $this->get_post_types_by_slug( $match ); if ( ! empty( $post_types ) ) { $post_type_object = $post_types[0]; // Add support for a non-standard label of 'archive_title' (special use case). $label = ! empty( $post_type_object->labels->archive_title ) ? $post_type_object->labels->archive_title : $post_type_object->labels->name; // Core filter hook. $label = apply_filters( 'bloghash_post_type_archive_title', $label, $post_type_object->name ); // Add the post type archive link to the trail. $this->items[] = sprintf( '%s', esc_url( get_post_type_archive_link( $post_type_object->name ) ), $label ); $done_post_type = true; // Break out of the loop. break; } } } } } // If there's a single post type for the taxonomy, use it. if ( false === $done_post_type && 1 === count( $taxonomy->object_type ) && post_type_exists( $taxonomy->object_type[0] ) ) { // If the post type is 'post'. if ( 'post' === $taxonomy->object_type[0] ) { $post_id = get_option( 'page_for_posts' ); if ( 'posts' !== get_option( 'show_on_front' ) && 0 < $post_id ) { $this->items[] = sprintf( '%s', esc_url( get_permalink( $post_id ) ), get_the_title( $post_id ) ); } // If the post type is not 'post'. } else { $post_type_object = get_post_type_object( $taxonomy->object_type[0] ); $label = ! empty( $post_type_object->labels->archive_title ) ? $post_type_object->labels->archive_title : $post_type_object->labels->name; // Core filter hook. $label = apply_filters( 'bloghash_post_type_archive_title', $label, $post_type_object->name ); $this->items[] = sprintf( '%s', esc_url( get_post_type_archive_link( $post_type_object->name ) ), $label ); } } // If the taxonomy is hierarchical, list its parent terms. if ( is_taxonomy_hierarchical( $term->taxonomy ) && $term->parent ) { $this->add_term_parents( $term->parent, $term->taxonomy ); } // Add the term name to the trail end. if ( is_paged() ) { $this->items[] = sprintf( '%s', esc_url( get_term_link( $term, $term->taxonomy ) ), single_term_title( '', false ) ); } elseif ( true === $this->args['show_title'] ) { $this->items[] = single_term_title( '', false ); } } /** * Adds the items to the trail items array for post type archives. * * @since 1.0.0 * @access protected * @return void */ protected function add_post_type_archive_items() { // Get the post type object. $post_type_object = get_post_type_object( get_query_var( 'post_type' ) ); if ( false !== $post_type_object->rewrite ) { // If 'with_front' is true, add $wp_rewrite->front to the trail. if ( $post_type_object->rewrite['with_front'] ) { $this->add_rewrite_front_items(); } // If there's a rewrite slug, check for parents. if ( ! empty( $post_type_object->rewrite['slug'] ) ) { $this->add_path_parents( $post_type_object->rewrite['slug'] ); } } // Add the post type [plural] name to the trail end. if ( is_paged() || is_author() ) { $this->items[] = sprintf( '%s', esc_url( get_post_type_archive_link( $post_type_object->name ) ), post_type_archive_title( '', false ) ); } elseif ( true === $this->args['show_title'] ) { $this->items[] = post_type_archive_title( '', false ); } // If viewing a post type archive by author. if ( is_author() ) { $this->add_user_archive_items(); } } /** * Adds the items to the trail items array for user (author) archives. * * @since 1.0.0 * @access protected * @global object $wp_rewrite * @return void */ protected function add_user_archive_items() { global $wp_rewrite; // Add $wp_rewrite->front to the trail. $this->add_rewrite_front_items(); // Get the user ID. $user_id = get_query_var( 'author' ); // If $author_base exists, check for parent pages. if ( ! empty( $wp_rewrite->author_base ) && ! is_post_type_archive() ) { $this->add_path_parents( $wp_rewrite->author_base ); } // Add the author's display name to the trail end. if ( is_paged() ) { $this->items[] = sprintf( '%s', esc_url( get_author_posts_url( $user_id ) ), get_the_author_meta( 'display_name', $user_id ) ); } elseif ( true === $this->args['show_title'] ) { $this->items[] = get_the_author_meta( 'display_name', $user_id ); } } /** * Adds the items to the trail items array for minute + hour archives. * * @since 1.0.0 * @access protected * @return void */ protected function add_minute_hour_archive_items() { // Add $wp_rewrite->front to the trail. $this->add_rewrite_front_items(); // Add the minute + hour item. if ( true === $this->args['show_title'] ) { $this->items[] = sprintf( $this->labels['archive_minute_hour'], get_the_time( esc_html_x( 'g:i a', 'minute and hour archives time format', 'bloghash' ) ) ); } } /** * Adds the items to the trail items array for minute archives. * * @since 1.0.0 * @access protected * @return void */ protected function add_minute_archive_items() { // Add $wp_rewrite->front to the trail. $this->add_rewrite_front_items(); // Add the minute item. if ( true === $this->args['show_title'] ) { $this->items[] = sprintf( $this->labels['archive_minute'], get_the_time( esc_html_x( 'i', 'minute archives time format', 'bloghash' ) ) ); } } /** * Adds the items to the trail items array for hour archives. * * @since 1.0.0 * @access protected * @return void */ protected function add_hour_archive_items() { // Add $wp_rewrite->front to the trail. $this->add_rewrite_front_items(); // Add the hour item. if ( true === $this->args['show_title'] ) { $this->items[] = sprintf( $this->labels['archive_hour'], get_the_time( esc_html_x( 'g a', 'hour archives time format', 'bloghash' ) ) ); } } /** * Adds the items to the trail items array for day archives. * * @since 1.0.0 * @access protected * @return void */ protected function add_day_archive_items() { // Add $wp_rewrite->front to the trail. $this->add_rewrite_front_items(); // Get year, month, and day. $year = sprintf( $this->labels['archive_year'], get_the_time( esc_html_x( 'Y', 'yearly archives date format', 'bloghash' ) ) ); $month = sprintf( $this->labels['archive_month'], get_the_time( esc_html_x( 'F', 'monthly archives date format', 'bloghash' ) ) ); $day = sprintf( $this->labels['archive_day'], get_the_time( esc_html_x( 'j', 'daily archives date format', 'bloghash' ) ) ); // Add the year and month items. $this->items[] = sprintf( '%s', esc_url( get_year_link( get_the_time( 'Y' ) ) ), $year ); $this->items[] = sprintf( '%s', esc_url( get_month_link( get_the_time( 'Y' ), get_the_time( 'm' ) ) ), $month ); // Add the day item. if ( is_paged() ) { $this->items[] = sprintf( '%s', esc_url( get_day_link( get_the_time( 'Y' ) ), get_the_time( 'm' ), get_the_time( 'd' ) ), $day ); } elseif ( true === $this->args['show_title'] ) { $this->items[] = $day; } } /** * Adds the items to the trail items array for week archives. * * @since 1.0.0 * @access protected * @return void */ protected function add_week_archive_items() { // Add $wp_rewrite->front to the trail. $this->add_rewrite_front_items(); // Get the year and week. $year = sprintf( $this->labels['archive_year'], get_the_time( esc_html_x( 'Y', 'yearly archives date format', 'bloghash' ) ) ); $week = sprintf( $this->labels['archive_week'], get_the_time( esc_html_x( 'W', 'weekly archives date format', 'bloghash' ) ) ); // Add the year item. $this->items[] = sprintf( '%s', esc_url( get_year_link( get_the_time( 'Y' ) ) ), $year ); // Add the week item. if ( is_paged() ) { $this->items[] = esc_url( get_archives_link( add_query_arg( array( 'm' => get_the_time( 'Y' ), 'w' => get_the_time( 'W' ), ), home_url() ), $week, false ) ); } elseif ( true === $this->args['show_title'] ) { $this->items[] = $week; } } /** * Adds the items to the trail items array for month archives. * * @since 1.0.0 * @access protected * @return void */ protected function add_month_archive_items() { // Add $wp_rewrite->front to the trail. $this->add_rewrite_front_items(); // Get the year and month. $year = sprintf( $this->labels['archive_year'], get_the_time( esc_html_x( 'Y', 'yearly archives date format', 'bloghash' ) ) ); $month = sprintf( $this->labels['archive_month'], get_the_time( esc_html_x( 'F', 'monthly archives date format', 'bloghash' ) ) ); // Add the year item. $this->items[] = sprintf( '%s', esc_url( get_year_link( get_the_time( 'Y' ) ) ), $year ); // Add the month item. if ( is_paged() ) { $this->items[] = sprintf( '%s', esc_url( get_month_link( get_the_time( 'Y' ), get_the_time( 'm' ) ) ), $month ); } elseif ( true === $this->args['show_title'] ) { $this->items[] = $month; } } /** * Adds the items to the trail items array for year archives. * * @since 1.0.0 * @access protected * @return void */ protected function add_year_archive_items() { // Add $wp_rewrite->front to the trail. $this->add_rewrite_front_items(); // Get the year. $year = sprintf( $this->labels['archive_year'], get_the_time( esc_html_x( 'Y', 'yearly archives date format', 'bloghash' ) ) ); // Add the year item. if ( is_paged() ) { $this->items[] = sprintf( '%s', esc_url( get_year_link( get_the_time( 'Y' ) ) ), $year ); } elseif ( true === $this->args['show_title'] ) { $this->items[] = $year; } } /** * Adds the items to the trail items array for archives that don't have a more specific method * defined in this class. * * @since 1.0.0 * @access protected * @return void */ protected function add_default_archive_items() { // If this is a date-/time-based archive, add $wp_rewrite->front to the trail. if ( is_date() || is_time() ) { $this->add_rewrite_front_items(); } if ( true === $this->args['show_title'] ) { $this->items[] = $this->labels['archives']; } } /** * Adds the items to the trail items array for search results. * * @since 1.0.0 * @access protected * @return void */ protected function add_search_items() { if ( is_paged() ) { $this->items[] = sprintf( '%s', esc_url( get_search_link() ), sprintf( $this->labels['search'], get_search_query() ) ); } elseif ( true === $this->args['show_title'] ) { $this->items[] = sprintf( $this->labels['search'], get_search_query() ); } } /** * Adds the items to the trail items array for 404 pages. * * @since 1.0.0 * @access protected * @return void */ protected function add_404_items() { if ( true === $this->args['show_title'] ) { $this->items[] = $this->labels['error_404']; } } /** * Adds a specific post's parents to the items array. * * @since 1.0.0 * @access protected * @param int $post_id Post ID. * @return void */ protected function add_post_parents( $post_id ) { $parents = array(); while ( $post_id ) { // Get the post by ID. $post = get_post( $post_id ); // If we hit a page that's set as the front page, bail. if ( 'page' === $post->post_type && 'page' === get_option( 'show_on_front' ) && get_option( 'page_on_front' ) === $post_id ) { break; } // Add the formatted post link to the array of parents. $parents[] = sprintf( '%s', esc_url( get_permalink( $post_id ) ), get_the_title( $post_id ) ); // If there's no longer a post parent, break out of the loop. if ( 0 >= $post->post_parent ) { break; } // Change the post ID to the parent post to continue looping. $post_id = $post->post_parent; } // Get the post hierarchy based off the final parent post. $this->add_post_hierarchy( $post_id ); // Display terms for specific post type taxonomy if requested. if ( ! empty( $this->post_taxonomy[ $post->post_type ] ) ) { $this->add_post_terms( $post_id, $this->post_taxonomy[ $post->post_type ] ); } // Merge the parent items into the items array. $this->items = array_merge( $this->items, array_reverse( $parents ) ); } /** * Adds a specific post's hierarchy to the items array. The hierarchy is determined by post type's * rewrite arguments and whether it has an archive page. * * @since 1.0.0 * @access protected * @param int $post_id Post ID. * @return void */ protected function add_post_hierarchy( $post_id ) { // Get the post type. $post_type = get_post_type( $post_id ); $post_type_object = get_post_type_object( $post_type ); if ( 'post' === $post_type ) { // If this is the 'post' post type, get the rewrite front items and map the rewrite tags. // Add $wp_rewrite->front to the trail. $this->add_rewrite_front_items(); // Map the rewrite tags. $this->map_rewrite_tags( $post_id, get_option( 'permalink_structure' ) ); } elseif ( false !== $post_type_object->rewrite ) { // If the post type has rewrite rules. // If 'with_front' is true, add $wp_rewrite->front to the trail. if ( $post_type_object->rewrite['with_front'] ) { $this->add_rewrite_front_items(); } // If there's a path, check for parents. if ( ! empty( $post_type_object->rewrite['slug'] ) ) { $this->add_path_parents( $post_type_object->rewrite['slug'] ); } } // If there's an archive page, add it to the trail. if ( $post_type_object->has_archive ) { // Add support for a non-standard label of 'archive_title' (special use case). $label = ! empty( $post_type_object->labels->archive_title ) ? $post_type_object->labels->archive_title : $post_type_object->labels->name; // Core filter hook. $label = apply_filters( 'bloghash_post_type_archive_title', $label, $post_type_object->name ); $this->items[] = sprintf( '%s', esc_url( get_post_type_archive_link( $post_type ) ), $label ); } // Map the rewrite tags if there's a `%` in the slug. if ( 'post' !== $post_type && ! empty( $post_type_object->rewrite['slug'] ) && false !== strpos( $post_type_object->rewrite['slug'], '%' ) ) { $this->map_rewrite_tags( $post_id, $post_type_object->rewrite['slug'] ); } } /** * Gets post types by slug. This is needed because the get_post_types() function doesn't exactly * match the 'has_archive' argument when it's set as a string instead of a boolean. * * @since 1.0.0 * @access protected * @param int $slug The post type archive slug to search for. * @return array */ protected function get_post_types_by_slug( $slug ) { $return = array(); $post_types = get_post_types( array(), 'objects' ); foreach ( $post_types as $type ) { if ( $slug === $type->has_archive || ( true === $type->has_archive && $slug === $type->rewrite['slug'] ) ) { $return[] = $type; } } return $return; } /** * Adds a post's terms from a specific taxonomy to the items array. * * @since 1.0.0 * @access protected * @param int $post_id The ID of the post to get the terms for. * @param string $taxonomy The taxonomy to get the terms from. * @return void */ protected function add_post_terms( $post_id, $taxonomy ) { // Get the post categories. $terms = get_the_terms( $post_id, $taxonomy ); // Check that categories were returned. if ( $terms && ! is_wp_error( $terms ) ) { // Sort the terms by ID and get the first category. if ( function_exists( 'wp_list_sort' ) ) { $terms = wp_list_sort( $terms, 'term_id' ); } else { usort( $terms, '_usort_terms_by_ID' ); } $term = get_term( $terms[0], $taxonomy ); // If the category has a parent, add the hierarchy to the trail. if ( 0 < $term->parent ) { $this->add_term_parents( $term->parent, $taxonomy ); } // Add the category archive link to the trail. $this->items[] = sprintf( '%s', esc_url( get_term_link( $term, $taxonomy ) ), $term->name ); } } /** * Get parent posts by path. Currently, this method only supports getting parents of the 'page' * post type. The goal of this function is to create a clear path back to home given what would * normally be a "ghost" directory. If any page matches the given path, it'll be added. * * @since 1.0.0 * @access protected * @param string $path The path (slug) to search for posts by. * @return void */ protected function add_path_parents( $path ) { // Trim '/' off $path in case we just got a simple '/' instead of a real path. $path = trim( $path, '/' ); // If there's no path, return. if ( empty( $path ) ) { return; } // Get parent post by the path. $post = get_page_by_path( $path ); if ( ! empty( $post ) ) { $this->add_post_parents( $post->ID ); } elseif ( is_null( $post ) ) { // Separate post names into separate paths by '/'. $path = trim( $path, '/' ); preg_match_all( '/\/.*?\z/', $path, $matches ); // If matches are found for the path. if ( isset( $matches ) ) { // Reverse the array of matches to search for posts in the proper order. $matches = array_reverse( $matches ); // Loop through each of the path matches. foreach ( $matches as $match ) { // If a match is found. if ( isset( $match[0] ) ) { // Get the parent post by the given path. $path = str_replace( $match[0], '', $path ); $post = get_page_by_path( trim( $path, '/' ) ); // If a parent post is found, set the $post_id and break out of the loop. if ( ! empty( $post ) && 0 < $post->ID ) { $this->add_post_parents( $post->ID ); break; } } } } } } /** * Searches for term parents of hierarchical taxonomies. This function is similar to the WordPress * function get_category_parents() but handles any type of taxonomy. * * @since 1.0.0 * @param int $term_id ID of the term to get the parents of. * @param string $taxonomy Name of the taxonomy for the given term. * @return void */ protected function add_term_parents( $term_id, $taxonomy ) { // Set up some default arrays. $parents = array(); // While there is a parent ID, add the parent term link to the $parents array. while ( $term_id ) { // Get the parent term. $term = get_term( $term_id, $taxonomy ); // Add the formatted term link to the array of parent terms. $parents[] = sprintf( '%s', esc_url( get_term_link( $term, $taxonomy ) ), $term->name ); // Set the parent term's parent as the parent ID. $term_id = $term->parent; } // If we have parent terms, reverse the array to put them in the proper order for the trail. if ( ! empty( $parents ) ) { $this->items = array_merge( $this->items, array_reverse( $parents ) ); } } /** * Turns %tag% from permalink structures into usable links for the breadcrumb trail. This feels kind of * hackish for now because we're checking for specific %tag% examples and only doing it for the 'post' * post type. In the future, maybe it'll handle a wider variety of possibilities, especially for custom post * types. * * @since 1.0.0 * @access protected * @param int $post_id ID of the post whose parents we want. * @param string $path Path of a potential parent page. * @return void */ protected function map_rewrite_tags( $post_id, $path ) { $post = get_post( $post_id ); // Trim '/' from both sides of the $path. $path = trim( $path, '/' ); // Split the $path into an array of strings. $matches = explode( '/', $path ); // If matches are found for the path. if ( is_array( $matches ) ) { // Loop through each of the matches, adding each to the $trail array. foreach ( $matches as $match ) { // Trim any '/' from the $match. $tag = trim( $match, '/' ); if ( '%year%' === $tag ) { // If using the %year% tag, add a link to the yearly archive. $this->items[] = sprintf( '%s', esc_url( get_year_link( get_the_time( 'Y', $post_id ) ) ), sprintf( $this->labels['archive_year'], get_the_time( esc_html_x( 'Y', 'yearly archives date format', 'bloghash' ) ) ) ); } elseif ( '%monthnum%' === $tag ) { // If using the %monthnum% tag, add a link to the monthly archive. $this->items[] = sprintf( '%s', esc_url( get_month_link( get_the_time( 'Y', $post_id ), get_the_time( 'm', $post_id ) ) ), sprintf( $this->labels['archive_month'], get_the_time( esc_html_x( 'F', 'monthly archives date format', 'bloghash' ) ) ) ); } elseif ( '%day%' === $tag ) { // If using the %day% tag, add a link to the daily archive. $this->items[] = sprintf( '%s', esc_url( get_day_link( get_the_time( 'Y', $post_id ), get_the_time( 'm', $post_id ), get_the_time( 'd', $post_id ) ) ), sprintf( $this->labels['archive_day'], get_the_time( esc_html_x( 'j', 'daily archives date format', 'bloghash' ) ) ) ); } elseif ( '%author%' === $tag ) { // If using the %author% tag, add a link to the post author archive. $this->items[] = sprintf( '%s', esc_url( get_author_posts_url( $post->post_author ) ), get_the_author_meta( 'display_name', $post->post_author ) ); } elseif ( taxonomy_exists( trim( $tag, '%' ) ) ) { // If using the %category% tag, add a link to the first category archive to match permalinks. // Force override terms in this post type. $this->post_taxonomy[ $post->post_type ] = false; // Add the post categories. $this->add_post_terms( $post_id, trim( $tag, '%' ) ); } } } } } -
Skip to content

  • IPL
  • Sports
  • Cricket
    • World Cup
  • Football
  • NFL
  • IPL
  • NBA
  • Tennis
  • facebook.com
  • twitter.com
  • t.me
  • instagram.com
  • youtube.com
Subscribe
Top Stories
Mohit Sharma picks his all-time IPL XI, no place for Rohit Sharma
August 13, 2025
Lucknow Super Giants set to part ways with Zaheer Khan ahead of IPL 2026
August 13, 2025
‘Can you share Virat Kohli’s number?’ – R Ashwin reveals scam attempt by fake ‘Devon Conway’ after IPL 2025
August 13, 2025
Sanjiv Goenka fires yet another Indian Cricket Hero from LSG in IPL Trade Window
August 13, 2025
Dewald Brevis joined CSK despite MS Dhoni’s resistance? Shocking story out now
August 13, 2025
MS Dhoni’s fan, who breached IPL security, dies mysteriously
August 13, 2025
Sanju Samson’s trade swap partner FIXED between CSK and Rajasthan Royals
August 13, 2025
Virat Kohli’s teammate denied Adult Industry exposure
August 13, 2025
Sanju Samson picked as captain amid heavy CSK interest
August 13, 2025
Suresh Raina in boiling legal betting trouble, Enforcement Directorate involved
August 13, 2025
Ravichandran Ashwin responds to the speculation of leaving CSK ahead of IPL 2026 retention
August 12, 2025
Priyansh Arya blind ranks Punjab Kings’ legends in DPL 2025, places Shreyas Iyer at number 2
August 12, 2025
Ravichandran Ashwin predicts most expensive picks for the IPL 2026 mini-auction
August 12, 2025
AUS vs SA 2025: ‘CSK got very lucky’ – AB de Villiers on Dewald Brevis after scintillating 56-ball 125
August 12, 2025
IPL 2026: ‘Ashwin adds value to CSK but not at INR 10 crore’
August 12, 2025
Karnataka govt bans Chinnaswamy Stadium; Women’s World Cup matches shifted out of Bengaluru
August 12, 2025
AB de Villiers shames MI, RCB for ignoring Dewald Brevis, calls CSK signing ‘Biggest masterstroke in IPL history’
August 12, 2025
Rajasthan Royals break silence on Sanju Samson’s exit ahead of IPL 2026
August 12, 2025
Harshit Rana slapped with massive sanction before Asia Cup 2025
August 12, 2025
Today’s Free Revolves & Coins Every day Money Master Advantages
August 12, 2025
MS Dhoni in IPL betting scandal!! High Court opens proceedings
August 12, 2025
Shubman Gill assaulted by Gautam Gambhir’s biggest disciple on MS Dhoni
August 12, 2025
RCB’s biggest asset in IPL title win joins another team
August 12, 2025
Revealed- Why Sanju Samson Is Leaving Rajasthan Royals Before IPL 2026?
August 12, 2025
Ravichandran Ashwin spills the beans on the biggest IPL auction buy after Sanju Samson interview
August 12, 2025
Bollywood superstar Salman Khan shares the truth behind his decision not to own an IPL franchise
August 11, 2025
Ashwin in for retention talks with CSK ahead of mini auction
August 11, 2025
Ravichandran Ashwin gives MS Dhoni ultimatum, threatens shock CSK exit before IPL 2026
August 11, 2025
WATCH: CSK legend MS Dhoni’s funny comeback to a fan’s plea for IPL 2026 breaks the internet
August 11, 2025
Salman Khan set to own IPL franchise? Bollywood Superstar’s remark goes viral on social media
August 11, 2025
Vaibhav Suryavanshi handpicked for elite BCCI training to fill Virat Kohli-Rohit Sharma void
August 11, 2025
Vaibhav Suryavanshi, Ayush Mhatre namedropped as Rohit Sharma’s coach opens on Prithvi Shaw spoiling his career
August 11, 2025
MS Dhoni breaks silence on IPL future with Chennai Super Kings; Legend to announce retirement on…
August 11, 2025
IPL 2025: ‘He’s 14 years old?’ – Ashwin, Samson admire 14-year-old Vaibhav Suryavanshi’s debut season
August 10, 2025
Yash Dayal banned from UP T20 League amid sexual exploitation allegations
August 10, 2025
Reports: Chhattisgarh boy receives calls from Virat Kohli, AB de Villiers after being assigned Rajat Patidar’s old phone number
August 10, 2025
Rahul Dravid dragged as Sanju Samson finally breaks silence on rumored Rajasthan Royals exit
August 10, 2025
CSK’s “Super Move” to throw Ravichandran Ashwin out revealed by Ex-BCCI selector
August 10, 2025
Lasith Malinga rebels against MS Dhoni, orders Matheesha Pathirana to play Test cricket
August 10, 2025
World Cup winner drops bomb amid Riyan Parag’s captaincy push
August 10, 2025
Sanju Samson kicks aside MS Dhoni as he names his cricketing idol
August 10, 2025
CSK star exposes Vaibhav Suryavanshi’s role in Jos Buttler’s savage taunt at Jofra Archer
August 10, 2025
Sanju Samson exposes Rajasthan Royals star’s indiscipline: "Match is at 8 PM, he wakes up at 5 PM"
August 10, 2025
After Yash Dayal, Rajat Patidar gets involved in police case; Virat Kohli, AB de Villiers dragged in
August 10, 2025
Not Vaibhav Suryavanshi! Riyan Parag blamed for Sanju Samson’s RR exit as IPL 2025 dispute exposed
August 9, 2025
Bengaluru’s Chinnaswamy legacy to be bulldozed by Karnataka as 80,000-capacity cricket stadium approved
August 9, 2025
Sanju Samson set to replace Ruturaj Gaikwad as CSK captain? Franchise drops bombshell post
August 9, 2025
10 100 percent free No-deposit Gambling enterprises In the united kingdom To possess 2024
August 9, 2025
Sanju Samson finally reacts to RR-to-CSK move reports after Ravichandran Ashwin’s provocation
August 9, 2025
Ex-cricketer exposes LSG’s dirty mindset after KL Rahul’s snub from Anderson-Tendulkar Trophy celebration post
August 9, 2025
CSK plan shock overhaul as MS Dhoni’s IPL 2026 fate sealed; Sanju Samson, R Ashwin verdicts out
August 9, 2025
Rajasthan Royals announce new captain after Sanju Samson requests exit
August 9, 2025
3 reasons Why Sanju Samson will be an ideal buy for CSK ahead of IPL 2026
August 8, 2025
Aakash Chopra names franchises likely to target Sanju Samson in trading window for IPL 2026
August 8, 2025
Ravichandran Ashwin teases upcoming interview with Sanju Samson
August 8, 2025
Virat Kohli breaks silence on ODI future after white beard pic breaks the internet
August 8, 2025
Ravichandran Ashwin shockingly leaves CSK and breaks news straight to MS Dhoni
August 8, 2025
IPL 2026: ‘KKR can release Venkatesh Iyer to sign Sanju Samson’ – Aakash Chopra
August 8, 2025
Not CSK! Shock IPL team goes all-in to steal Sanju Samson from Rajasthan Royals
August 8, 2025
MS Dhoni’s CSK teammates waited for signal to start ugly on-field fight in IPL, reveals Ambati Rayudu
August 8, 2025
Rajasthan Royals issue big statement on star keeper after Sanju Samson requests his release
August 8, 2025
MS Dhoni trade? Rajasthan Royals aim to snatch top CSK stars in big Sanju Samson deal
August 8, 2025
MS Dhoni drops major hint about his future with Chennai Super Kings in IPL 2026
August 7, 2025
Sanju Samson requests Rajasthan Royals to release him ahead of IPL 2026
August 7, 2025
Vaibhav Suryavanshi nearly kills someone with brutal shot
August 7, 2025
Sanju Samson leaves Rajasthan Royals after ‘serious differences’ with Rahul Dravid
August 7, 2025
The Hundred identified as IPL’s biggest competitor by London Spirit co-owner
August 7, 2025
Yashasvi Jaiswal wanted to quit team Mid-IPL! Rohit Sharma blocked his exit
August 7, 2025
MS Dhoni reveals Virat Kohli’s hidden talents off the field; Video breaks internet
August 7, 2025
MS Dhoni to part ways with CSK? Legendary captain drops bombshell
August 7, 2025
Will Sanju Samson part ways with Rajasthan Royals? The franchise clears air on IPL 2026 Trade Window rumour
August 7, 2025
Delhi Capitals’ all-rounder accepts spot-fixing like crime in front of Virat Kohli
August 6, 2025
Priyansh Arya builds the perfect batsman, Sachin Tendulkar ignored
August 6, 2025
Sanju Samson punished brutally by Indian cricket the same day he rejects CSK contract
August 6, 2025
IPL 2026- RCB’s Chris Gayle announces Virat Kohli, AB de Villiers reunion
August 6, 2025
Digvesh Rathi manhandled openly in Delhi Premier League
August 6, 2025
Asia Cup 2025- BCCI lifts the lid on Suryakumar Yadav’s fate
August 6, 2025
IPL 2026: Sanju Samson set to stay with Rajasthan Royals
August 6, 2025
Sanju Samson gives MS Dhoni the biggest setback, tears CSK contract
August 6, 2025
‘I work a lot harder’: AB de Villiers playfully shares why he chose not to follow MS Dhoni’s IPL path
August 4, 2025
Virat Kohli, Rohit Sharma’s teammate Tymal Mills becomes OnlyFans star in shocking career move
August 4, 2025
AB de Villiers brutally cooks MS Dhoni
August 3, 2025
Dale Steyn insults Jos Buttler, Nicholas Pooran & other IPL internationals
August 3, 2025
IPL 2026: MS Dhoni to leave captaincy, might play as specialist keeper-batter
August 3, 2025
My relationship with Chennai started even before I joined CSK: MS Dhoni
August 3, 2025
AB de Villiers hints at IPL comeback for RCB after WCL title
August 3, 2025
AB de Villiers announces his all time IPL XI; 3 CSK players and 4 players each from RCB and Mumbai Indians
August 3, 2025
MS Dhoni all set for IPL retirement!! CSK veteran sends shockwaves
August 3, 2025
MS Dhoni all but confirms Sanju Samson’s CSK entry
August 3, 2025
RCB’s Chinnaswamy Stadium banned by Indian Board
August 2, 2025
CSK procure India star in trade window
August 2, 2025
Matthew Hayden accuses BCCI of his murder during IPL 2025
August 2, 2025
IPL 2026 trade war heats up: CSK, KKR and RR battle for KL Rahul’s signature
August 1, 2025
KSCA awaits police clearance to host Maharaja T20 at Chinnaswamy
August 1, 2025
CSK dump Sanju Samson plans, pick KL Rahul as MS Dhoni’s successor ahead of IPL 2026
August 1, 2025
Yuzvendra Chahal gives belt treatment to Gautam Gambhir, labels Shreyas Iyer the difference maker
August 1, 2025
Sanju Samson issues 1st statement on joining CSK for IPL 2026
August 1, 2025
“The last time Virat Kohli cried was..”- Yuzvendra Chahal’s bombshell revelation
August 1, 2025
Emotional father slams Indian team, drags Karun Nair
July 31, 2025
IPL 2026: KKR interested in trading KL Rahul
July 31, 2025
Mohit Sharma picks his all-time IPL XI, no place for Rohit Sharma
August 13, 2025
Lucknow Super Giants set to part ways with Zaheer Khan ahead of IPL 2026
August 13, 2025
‘Can you share Virat Kohli’s number?’ – R Ashwin reveals scam attempt by fake ‘Devon Conway’ after IPL 2025
August 13, 2025
Sanjiv Goenka fires yet another Indian Cricket Hero from LSG in IPL Trade Window
August 13, 2025
Dewald Brevis joined CSK despite MS Dhoni’s resistance? Shocking story out now
August 13, 2025
MS Dhoni’s fan, who breached IPL security, dies mysteriously
August 13, 2025
Sanju Samson’s trade swap partner FIXED between CSK and Rajasthan Royals
August 13, 2025
Virat Kohli’s teammate denied Adult Industry exposure
August 13, 2025
Sanju Samson picked as captain amid heavy CSK interest
August 13, 2025
Suresh Raina in boiling legal betting trouble, Enforcement Directorate involved
August 13, 2025
Ravichandran Ashwin responds to the speculation of leaving CSK ahead of IPL 2026 retention
August 12, 2025
Priyansh Arya blind ranks Punjab Kings’ legends in DPL 2025, places Shreyas Iyer at number 2
August 12, 2025
Ravichandran Ashwin predicts most expensive picks for the IPL 2026 mini-auction
August 12, 2025
AUS vs SA 2025: ‘CSK got very lucky’ – AB de Villiers on Dewald Brevis after scintillating 56-ball 125
August 12, 2025
IPL 2026: ‘Ashwin adds value to CSK but not at INR 10 crore’
August 12, 2025
Karnataka govt bans Chinnaswamy Stadium; Women’s World Cup matches shifted out of Bengaluru
August 12, 2025
AB de Villiers shames MI, RCB for ignoring Dewald Brevis, calls CSK signing ‘Biggest masterstroke in IPL history’
August 12, 2025
Rajasthan Royals break silence on Sanju Samson’s exit ahead of IPL 2026
August 12, 2025
Harshit Rana slapped with massive sanction before Asia Cup 2025
August 12, 2025
Today’s Free Revolves & Coins Every day Money Master Advantages
August 12, 2025
MS Dhoni in IPL betting scandal!! High Court opens proceedings
August 12, 2025
Shubman Gill assaulted by Gautam Gambhir’s biggest disciple on MS Dhoni
August 12, 2025
RCB’s biggest asset in IPL title win joins another team
August 12, 2025
Revealed- Why Sanju Samson Is Leaving Rajasthan Royals Before IPL 2026?
August 12, 2025
Ravichandran Ashwin spills the beans on the biggest IPL auction buy after Sanju Samson interview
August 12, 2025
Bollywood superstar Salman Khan shares the truth behind his decision not to own an IPL franchise
August 11, 2025
Ashwin in for retention talks with CSK ahead of mini auction
August 11, 2025
Ravichandran Ashwin gives MS Dhoni ultimatum, threatens shock CSK exit before IPL 2026
August 11, 2025
WATCH: CSK legend MS Dhoni’s funny comeback to a fan’s plea for IPL 2026 breaks the internet
August 11, 2025
Salman Khan set to own IPL franchise? Bollywood Superstar’s remark goes viral on social media
August 11, 2025
Vaibhav Suryavanshi handpicked for elite BCCI training to fill Virat Kohli-Rohit Sharma void
August 11, 2025
Vaibhav Suryavanshi, Ayush Mhatre namedropped as Rohit Sharma’s coach opens on Prithvi Shaw spoiling his career
August 11, 2025
MS Dhoni breaks silence on IPL future with Chennai Super Kings; Legend to announce retirement on…
August 11, 2025
IPL 2025: ‘He’s 14 years old?’ – Ashwin, Samson admire 14-year-old Vaibhav Suryavanshi’s debut season
August 10, 2025
Yash Dayal banned from UP T20 League amid sexual exploitation allegations
August 10, 2025
Reports: Chhattisgarh boy receives calls from Virat Kohli, AB de Villiers after being assigned Rajat Patidar’s old phone number
August 10, 2025
Rahul Dravid dragged as Sanju Samson finally breaks silence on rumored Rajasthan Royals exit
August 10, 2025
CSK’s “Super Move” to throw Ravichandran Ashwin out revealed by Ex-BCCI selector
August 10, 2025
Lasith Malinga rebels against MS Dhoni, orders Matheesha Pathirana to play Test cricket
August 10, 2025
World Cup winner drops bomb amid Riyan Parag’s captaincy push
August 10, 2025
Sanju Samson kicks aside MS Dhoni as he names his cricketing idol
August 10, 2025
CSK star exposes Vaibhav Suryavanshi’s role in Jos Buttler’s savage taunt at Jofra Archer
August 10, 2025
Sanju Samson exposes Rajasthan Royals star’s indiscipline: "Match is at 8 PM, he wakes up at 5 PM"
August 10, 2025
After Yash Dayal, Rajat Patidar gets involved in police case; Virat Kohli, AB de Villiers dragged in
August 10, 2025
Not Vaibhav Suryavanshi! Riyan Parag blamed for Sanju Samson’s RR exit as IPL 2025 dispute exposed
August 9, 2025
Bengaluru’s Chinnaswamy legacy to be bulldozed by Karnataka as 80,000-capacity cricket stadium approved
August 9, 2025
Sanju Samson set to replace Ruturaj Gaikwad as CSK captain? Franchise drops bombshell post
August 9, 2025
10 100 percent free No-deposit Gambling enterprises In the united kingdom To possess 2024
August 9, 2025
Sanju Samson finally reacts to RR-to-CSK move reports after Ravichandran Ashwin’s provocation
August 9, 2025
Ex-cricketer exposes LSG’s dirty mindset after KL Rahul’s snub from Anderson-Tendulkar Trophy celebration post
August 9, 2025
CSK plan shock overhaul as MS Dhoni’s IPL 2026 fate sealed; Sanju Samson, R Ashwin verdicts out
August 9, 2025
Rajasthan Royals announce new captain after Sanju Samson requests exit
August 9, 2025
3 reasons Why Sanju Samson will be an ideal buy for CSK ahead of IPL 2026
August 8, 2025
Aakash Chopra names franchises likely to target Sanju Samson in trading window for IPL 2026
August 8, 2025
Ravichandran Ashwin teases upcoming interview with Sanju Samson
August 8, 2025
Virat Kohli breaks silence on ODI future after white beard pic breaks the internet
August 8, 2025
Ravichandran Ashwin shockingly leaves CSK and breaks news straight to MS Dhoni
August 8, 2025
IPL 2026: ‘KKR can release Venkatesh Iyer to sign Sanju Samson’ – Aakash Chopra
August 8, 2025
Not CSK! Shock IPL team goes all-in to steal Sanju Samson from Rajasthan Royals
August 8, 2025
MS Dhoni’s CSK teammates waited for signal to start ugly on-field fight in IPL, reveals Ambati Rayudu
August 8, 2025
Rajasthan Royals issue big statement on star keeper after Sanju Samson requests his release
August 8, 2025
MS Dhoni trade? Rajasthan Royals aim to snatch top CSK stars in big Sanju Samson deal
August 8, 2025
MS Dhoni drops major hint about his future with Chennai Super Kings in IPL 2026
August 7, 2025
Sanju Samson requests Rajasthan Royals to release him ahead of IPL 2026
August 7, 2025
Vaibhav Suryavanshi nearly kills someone with brutal shot
August 7, 2025
Sanju Samson leaves Rajasthan Royals after ‘serious differences’ with Rahul Dravid
August 7, 2025
The Hundred identified as IPL’s biggest competitor by London Spirit co-owner
August 7, 2025
Yashasvi Jaiswal wanted to quit team Mid-IPL! Rohit Sharma blocked his exit
August 7, 2025
MS Dhoni reveals Virat Kohli’s hidden talents off the field; Video breaks internet
August 7, 2025
MS Dhoni to part ways with CSK? Legendary captain drops bombshell
August 7, 2025
Will Sanju Samson part ways with Rajasthan Royals? The franchise clears air on IPL 2026 Trade Window rumour
August 7, 2025
Delhi Capitals’ all-rounder accepts spot-fixing like crime in front of Virat Kohli
August 6, 2025
Priyansh Arya builds the perfect batsman, Sachin Tendulkar ignored
August 6, 2025
Sanju Samson punished brutally by Indian cricket the same day he rejects CSK contract
August 6, 2025
IPL 2026- RCB’s Chris Gayle announces Virat Kohli, AB de Villiers reunion
August 6, 2025
Digvesh Rathi manhandled openly in Delhi Premier League
August 6, 2025
Asia Cup 2025- BCCI lifts the lid on Suryakumar Yadav’s fate
August 6, 2025
IPL 2026: Sanju Samson set to stay with Rajasthan Royals
August 6, 2025
Sanju Samson gives MS Dhoni the biggest setback, tears CSK contract
August 6, 2025
‘I work a lot harder’: AB de Villiers playfully shares why he chose not to follow MS Dhoni’s IPL path
August 4, 2025
Virat Kohli, Rohit Sharma’s teammate Tymal Mills becomes OnlyFans star in shocking career move
August 4, 2025
AB de Villiers brutally cooks MS Dhoni
August 3, 2025
Dale Steyn insults Jos Buttler, Nicholas Pooran & other IPL internationals
August 3, 2025
IPL 2026: MS Dhoni to leave captaincy, might play as specialist keeper-batter
August 3, 2025
My relationship with Chennai started even before I joined CSK: MS Dhoni
August 3, 2025
AB de Villiers hints at IPL comeback for RCB after WCL title
August 3, 2025
AB de Villiers announces his all time IPL XI; 3 CSK players and 4 players each from RCB and Mumbai Indians
August 3, 2025
MS Dhoni all set for IPL retirement!! CSK veteran sends shockwaves
August 3, 2025
MS Dhoni all but confirms Sanju Samson’s CSK entry
August 3, 2025
RCB’s Chinnaswamy Stadium banned by Indian Board
August 2, 2025
CSK procure India star in trade window
August 2, 2025
Matthew Hayden accuses BCCI of his murder during IPL 2025
August 2, 2025
IPL 2026 trade war heats up: CSK, KKR and RR battle for KL Rahul’s signature
August 1, 2025
KSCA awaits police clearance to host Maharaja T20 at Chinnaswamy
August 1, 2025
CSK dump Sanju Samson plans, pick KL Rahul as MS Dhoni’s successor ahead of IPL 2026
August 1, 2025
Yuzvendra Chahal gives belt treatment to Gautam Gambhir, labels Shreyas Iyer the difference maker
August 1, 2025
Sanju Samson issues 1st statement on joining CSK for IPL 2026
August 1, 2025
“The last time Virat Kohli cried was..”- Yuzvendra Chahal’s bombshell revelation
August 1, 2025
Emotional father slams Indian team, drags Karun Nair
July 31, 2025
IPL 2026: KKR interested in trading KL Rahul
July 31, 2025
Posted inIPL

Mohit Sharma picks his all-time IPL XI, no place for Rohit Sharma

Mohit Sharma, the seasoned Indian pacer who has played 120 IPL matches, recently revealed his all-time Indian Premier League (IPL) XI in an interview with CricTracker. His dream team features…
Continue Reading
Posted by Admin August 13, 2025
Posted inIPL

Lucknow Super Giants set to part ways with Zaheer Khan ahead of IPL 2026

Lucknow Super Giants (LSG) are poised for a significant change in their coaching and mentorship setup as they prepare for the Indian Premier League (IPL) 2026 season. The franchise is…
Continue Reading
Posted by Admin August 13, 2025
Posted inIPL

‘Can you share Virat Kohli’s number?’ – R Ashwin reveals scam attempt by fake ‘Devon Conway’ after IPL 2025

Former Indian cricketer Ravichandran Ashwin recently recalled being scammed into sharing Virat Kohli’s number after the IPL 2025. The incident came to light following a hilarious story involving a man…
Continue Reading
Posted by Admin August 13, 2025
Posted inIPL

Sanjiv Goenka fires yet another Indian Cricket Hero from LSG in IPL Trade Window

Lucknow Super Giants (LSG) are expected to part ways with mentor Zaheer Khan following the completion of his one-year contract. According to a report in The Times of India, the…
Continue Reading
Posted by Admin August 13, 2025
Posted inIPL

Dewald Brevis joined CSK despite MS Dhoni’s resistance? Shocking story out now

Chennai Super Kings (CSK) signed South African batter Dewald Brevis as an injury replacement midway through the IPL 2025 season. According to The Times of India, England cricketer Jonny Bairstow…
Continue Reading
Posted by Admin August 13, 2025
Posted inIPL

MS Dhoni’s fan, who breached IPL security, dies mysteriously

The incident dates back two years to 2024, when an MS Dhoni fan breached security to enter the ground to meet his icon during a match between the Chennai Super…
Continue Reading
Posted by Admin August 13, 2025
Mohit Sharma picks his all-time IPL XI, no place for Rohit Sharma
Posted inIPL

Mohit Sharma picks his all-time IPL XI, no place for Rohit Sharma

Mohit Sharma, the seasoned Indian pacer who has played 120 IPL matches, recently revealed his all-time Indian Premier League (IPL) XI in an interview with CricTracker. His dream team features…
Posted by Admin August 13, 2025
Lucknow Super Giants set to part ways with Zaheer Khan ahead of IPL 2026
Posted inIPL

Lucknow Super Giants set to part ways with Zaheer Khan ahead of IPL 2026

Lucknow Super Giants (LSG) are poised for a significant change in their coaching and mentorship setup as they prepare for the Indian Premier League (IPL) 2026 season. The franchise is…
Posted by Admin August 13, 2025
‘Can you share Virat Kohli’s number?’ – R Ashwin reveals scam attempt by fake ‘Devon Conway’ after IPL 2025
Posted inIPL

‘Can you share Virat Kohli’s number?’ – R Ashwin reveals scam attempt by fake ‘Devon Conway’ after IPL 2025

Former Indian cricketer Ravichandran Ashwin recently recalled being scammed into sharing Virat Kohli’s number after the IPL 2025. The incident came to light following a hilarious story involving a man…
Posted by Admin August 13, 2025
Sanjiv Goenka fires yet another Indian Cricket Hero from LSG in IPL Trade Window
Posted inIPL

Sanjiv Goenka fires yet another Indian Cricket Hero from LSG in IPL Trade Window

Lucknow Super Giants (LSG) are expected to part ways with mentor Zaheer Khan following the completion of his one-year contract. According to a report in The Times of India, the…
Posted by Admin August 13, 2025
Dewald Brevis joined CSK despite MS Dhoni’s resistance? Shocking story out now
Posted inIPL

Dewald Brevis joined CSK despite MS Dhoni’s resistance? Shocking story out now

Chennai Super Kings (CSK) signed South African batter Dewald Brevis as an injury replacement midway through the IPL 2025 season. According to The Times of India, England cricketer Jonny Bairstow…
Posted by Admin August 13, 2025
MS Dhoni’s fan, who breached IPL security, dies mysteriously
Posted inIPL

MS Dhoni’s fan, who breached IPL security, dies mysteriously

The incident dates back two years to 2024, when an MS Dhoni fan breached security to enter the ground to meet his icon during a match between the Chennai Super…
Posted by Admin August 13, 2025
Sanju Samson’s trade swap partner FIXED between CSK and Rajasthan Royals
Posted inIPL

Sanju Samson’s trade swap partner FIXED between CSK and Rajasthan Royals

Former CSK star Robin Uthappa has given a one-stop solution to Chennai Super Kings to acquire the likes of Sanju Samson by trading off the likes of Ravichandran Ashwin and…
Posted by Admin August 13, 2025
Virat Kohli’s teammate denied Adult Industry exposure
Posted inIPL

Virat Kohli’s teammate denied Adult Industry exposure

The ECB rejects the plea of Virat Kohli's former RCB teammate Tymal Mills to display the OnlyFans logo on his bat, citing family concerns. The move by the English pacer…
Posted by Admin August 13, 2025
Sanju Samson picked as captain amid heavy CSK interest
Posted inIPL

Sanju Samson picked as captain amid heavy CSK interest

Two Kerala star cricketers, Sanju Samson and Sachin Baby, are set to lead teams in a friendly T20 match, set to take place on Friday, August 15, at the Greenfield…
Posted by Admin August 13, 2025
Suresh Raina in boiling legal betting trouble, Enforcement Directorate involved
Posted inIPL

Suresh Raina in boiling legal betting trouble, Enforcement Directorate involved

The Enforcement Directorate (ED) has summoned former Team India cricketer Suresh Raina to its Delhi office on Wednesday, August 13, for questioning in a money laundering case. The investigation is…
Posted by Admin August 13, 2025

Posts pagination

1 2 3 … 211 Next page

Recent Posts

  • Mohit Sharma picks his all-time IPL XI, no place for Rohit Sharma
  • Lucknow Super Giants set to part ways with Zaheer Khan ahead of IPL 2026
  • ‘Can you share Virat Kohli’s number?’ – R Ashwin reveals scam attempt by fake ‘Devon Conway’ after IPL 2025
  • Sanjiv Goenka fires yet another Indian Cricket Hero from LSG in IPL Trade Window
  • Dewald Brevis joined CSK despite MS Dhoni’s resistance? Shocking story out now
  • MS Dhoni’s fan, who breached IPL security, dies mysteriously
  • Sanju Samson’s trade swap partner FIXED between CSK and Rajasthan Royals
  • Virat Kohli’s teammate denied Adult Industry exposure
  • Sanju Samson picked as captain amid heavy CSK interest
  • Suresh Raina in boiling legal betting trouble, Enforcement Directorate involved
Browse by Category
  • About us
  • Contact Us
  • Disclaimer
  • Cookies policy
  • Privacy policy
  • Terms and conditions
You May Have Missed
Posted inIPL

Mohit Sharma picks his all-time IPL XI, no place for Rohit Sharma

Posted by Admin August 13, 2025
Posted inIPL

Lucknow Super Giants set to part ways with Zaheer Khan ahead of IPL 2026

Posted by Admin August 13, 2025
Posted inIPL

‘Can you share Virat Kohli’s number?’ – R Ashwin reveals scam attempt by fake ‘Devon Conway’ after IPL 2025

Posted by Admin August 13, 2025
Posted inIPL

Sanjiv Goenka fires yet another Indian Cricket Hero from LSG in IPL Trade Window

Posted by Admin August 13, 2025

Copyright 2025 — All rights reserved. ZtyIndia

Scroll to Top