WC_Breadcrumb::add_crumbs_dateprotectedWC 1.0

Add crumbs for date based archives.

Method of the class: WC_Breadcrumb{}

No Hooks.

Returns

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 10.8.1

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' ) );
	}
}