Advertisements

the_weekday_date

Definition:
function the_weekday_date($before='',$after='') {}

Display the weekday on which the post was written.
Will only output the weekday if the current post’s weekday is different from the previous one output.

Parameters

  • string $before: Optional Output before the date.
  • string $after: Optional Output after the date.

Defined filters

  • the_weekday_date
    apply_filters('the_weekday_date', $the_weekday_date, $before, $after)

Source code

function the_weekday_date($before='',$after='') {

	global $wp_locale, $post, $day, $previousweekday;

	$the_weekday_date = '';

	if ( $currentday != $previousweekday ) {

		$the_weekday_date .= $before;

		$the_weekday_date .= $wp_locale->get_weekday(mysql2date('w', $post->post_date, false));

		$the_weekday_date .= $after;

		$previousweekday = $currentday;

	}

	$the_weekday_date = apply_filters('the_weekday_date', $the_weekday_date, $before, $after);

	echo $the_weekday_date;

}

3059

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: