WC_Breadcrumb::add_crumbs_date() protected WC 1.0
Add crumbs for date based archives.
{} Это метод класса: WC_Breadcrumb{}
Хуков нет.
Возвращает
Null. Ничего.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->add_crumbs_date();
Код WC_Breadcrumb::add_crumbs_date() WC Breadcrumb::add crumbs date WC 5.0.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' ) );
}
}