| @@ -9,9 +9,10 @@ | ||
| 9 | 9 | declare(strict_types=1); |
| 10 | 10 | |
| 11 | 11 | namespace Parsely\Metadata; |
| 12 | 12 | |
| 13 | -use Parsely\Utils\Utils; | |
| 13 | +use function Parsely\Utils\get_date_format; | |
| 14 | +use function Parsely\Utils\get_time_format; | |
| 14 | 15 | |
| 15 | 16 | /** |
| 16 | 17 | * Implements abstract Metadata Builder class to generate the metadata array |
| 17 | 18 | * for a date page. |
| @@ -40,9 +41,9 @@ | ||
| 40 | 41 | * |
| 41 | 42 | * @since 3.4.0 |
| 42 | 43 | */ |
| 43 | 44 | private function build_headline(): void { |
| 44 | - $site_date_format = Utils::get_date_format(); | |
| 45 | + $site_date_format = get_date_format(); | |
| 45 | 46 | |
| 46 | 47 | if ( is_year() ) { |
| 47 | 48 | /* translators: %s: Archive year */ |
| 48 | 49 | $this->metadata['headline'] = sprintf( __( 'Yearly Archive - %s', 'wp-parsely' ), get_the_time( 'Y' ) ); |
| @@ -52,9 +53,9 @@ | ||
| 52 | 53 | } elseif ( is_day() ) { |
| 53 | 54 | /* translators: %s: Archive day, formatted as F jS, Y */ |
| 54 | 55 | $this->metadata['headline'] = sprintf( __( 'Daily Archive - %s', 'wp-parsely' ), get_the_time( $site_date_format ) ); |
| 55 | 56 | } elseif ( is_time() ) { |
| 56 | - $site_time_format = Utils::get_time_format(); | |
| 57 | + $site_time_format = get_time_format(); | |
| 57 | 58 | /* translators: %s: Archive time, formatted as F jS g:i:s A */ |
| 58 | 59 | $this->metadata['headline'] = sprintf( __( 'Hourly, Minutely, or Secondly Archive - %s', 'wp-parsely' ), get_the_time( "{$site_date_format} {$site_time_format}" ) ); |
| 59 | 60 | } |
| 60 | 61 | } |