You appear to be a bot. Output may be restricted
Description
Returns the modified date archive crumb.
Usage
$array = Breadcrumbs_Generator::get_date_archive_crumb( $crumb );
Parameters
- $crumb
- ( array ) required – The crumb.
Returns
array The crumb.
Source
File name: wordpress-seo/src/generators/breadcrumbs-generator.php
Lines:
1 to 22 of 22
protected function get_date_archive_crumb( $crumb ) { $home_url = $this->url_helper->home(); $prefix = $this->options->get( 'breadcrumbs-archiveprefix' ); if ( \is_day() ) { $day = \esc_html( \get_the_date() ); $crumb['url'] = $home_url . \get_the_date( 'Y/m/d' ) . '/'; $crumb['text'] = $prefix . ' ' . $day; } elseif ( \is_month() ) { $month = \esc_html( \trim( \single_month_title( ' ', false ) ) ); $crumb['url'] = $home_url . \get_the_date( 'Y/m' ) . '/'; $crumb['text'] = $prefix . ' ' . $month; } elseif ( \is_year() ) { $year = \get_the_date( 'Y' ); $crumb['url'] = $home_url . $year . '/'; $crumb['text'] = $prefix . ' ' . $year; } return $crumb; }