WC_Breadcrumb::add_crumbs_date()protectedWC 1.0

Add crumbs for date based archives.

Method of the class: WC_Breadcrumb{}

No Hooks.

Return

null. Nothing (null).

Usage

// protected - for code of main (parent) or child class
$result = $this->add_crumbs_date();

WC_Breadcrumb::add_crumbs_date() code WC 8.7.0

protected function add_crumbs_date() {
	if ( is_year() || is_month() || is_day() ) {
		$this->add_crumb( get_the_time( 'Y' ), get_year_link( get_the_time( 'Y' ) ) );
	}
	if ( is_month() || is_day() ) {
		$this->add_crumb( get_the_time( 'F' ), get_month_link( get_the_time( 'Y' ), get_the_time( 'm' ) ) );
	}
	if ( is_day() ) {
		$this->add_crumb( get_the_time( 'd' ) );
	}
}