the_weekday()WP 0.71

Displays the weekday on which the post was written.

Хуки из функции

Возвращает

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

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

the_weekday();

Заметки

  • Global. WP_Locale. $wp_locale WordPress date and time locale object.

Список изменений

С версии 0.71 Введена.

Код the_weekday() WP 6.5.2

function the_weekday() {
	global $wp_locale;

	$post = get_post();

	if ( ! $post ) {
		return;
	}

	$the_weekday = $wp_locale->get_weekday( get_post_time( 'w', false, $post ) );

	/**
	 * Filters the weekday on which the post was written, for display.
	 *
	 * @since 0.71
	 *
	 * @param string $the_weekday
	 */
	echo apply_filters( 'the_weekday', $the_weekday );
}