wpseek.com
WordPress开发者和主题制作者的搜索引擎



the_weekday › WordPress Function

Since0.71
已弃用n/a
› the_weekday ( 没有参数 )
定义在:
文档:
Change Log:
  • 7.2.0

Displays the localized weekday for the post.



源码

function the_weekday() {
	global $wp_locale;

	$post = get_post();

	if ( ! $post ) {
		return;
	}

	$the_weekday    = '';
	$weekday_number = get_post_time( 'w', false, $post );

	if ( false !== $weekday_number ) {
		$the_weekday = $wp_locale->get_weekday( (int) $weekday_number );
	}

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