Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




the_weekday_date [ WordPress Function ]

the_weekday_date ( $before = '', $after = '' )
Parameters:
  • (string) $before Optional Output before the date.
  • (string) $after Optional Output after the date.
Defined at:



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.

Source


<?php
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_datefalse));
        
$the_weekday_date .= $after;
        
$previousweekday $currentday;
    }
    
$the_weekday_date apply_filters('the_weekday_date'$the_weekday_date$before$after);
    echo 
$the_weekday_date;
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics