WC_Breadcrumb::add_crumbs_date()protectedWC 1.0

Add crumbs for date based archives.

Метод класса: WC_Breadcrumb{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->add_crumbs_date();

Код WC_Breadcrumb::add_crumbs_date() 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' ) );
	}
}