WordPress.org

Make WordPress Core

Ticket #24781: 24781.diff

File 24781.diff, 3.0 KB (added by DrewAPicture, 9 months ago)
  • wp-includes/deprecated.php

     
    33783378 
    33793379        return $size . $unit; 
    33803380} 
     3381 
     3382/** 
     3383 * Display the weekday on which the post was written. 
     3384 * 
     3385 * @since 0.71 
     3386 * @deprecated 3.6.0 
     3387 * @deprecated Use the_date() 
     3388 * 
     3389 * @uses $wp_locale 
     3390 * @uses $post 
     3391 */ 
     3392function the_weekday() { 
     3393        _deprecated_function( __FUNCTION__, '3.6', 'the_date()' ); 
     3394        global $wp_locale; 
     3395        $the_weekday = $wp_locale->get_weekday( mysql2date( 'w', get_post()->post_date, false ) ); 
     3396        $the_weekday = apply_filters('the_weekday', $the_weekday); 
     3397        echo $the_weekday; 
     3398} 
     3399 
     3400/** 
     3401 * Display the weekday on which the post was written. 
     3402 * 
     3403 * Will only output the weekday if the current post's weekday is different from 
     3404 * the previous one output. 
     3405 * 
     3406 * @since 0.71 
     3407 * @deprecated 3.6.0 
     3408 * @deprecated Use the_date() 
     3409 * 
     3410 * @param string $before Optional Output before the date. 
     3411 * @param string $after Optional Output after the date. 
     3412 */ 
     3413function the_weekday_date($before='',$after='') { 
     3414        _deprecated_function( __FUNCTION__, '3.6', 'the_date()' ); 
     3415 
     3416        global $wp_locale, $currentday, $previousweekday; 
     3417        $the_weekday_date = ''; 
     3418        if ( $currentday != $previousweekday ) { 
     3419                $the_weekday_date .= $before; 
     3420                $the_weekday_date .= $wp_locale->get_weekday( mysql2date( 'w', get_post()->post_date, false ) ); 
     3421                $the_weekday_date .= $after; 
     3422                $previousweekday = $currentday; 
     3423        } 
     3424        $the_weekday_date = apply_filters('the_weekday_date', $the_weekday_date, $before, $after); 
     3425        echo $the_weekday_date; 
     3426} 
  • wp-includes/general-template.php

     
    15601560} 
    15611561 
    15621562/** 
    1563  * Display the weekday on which the post was written. 
    1564  * 
    1565  * @since 0.71 
    1566  * @uses $wp_locale 
    1567  * @uses $post 
    1568  */ 
    1569 function the_weekday() { 
    1570         global $wp_locale; 
    1571         $the_weekday = $wp_locale->get_weekday( mysql2date( 'w', get_post()->post_date, false ) ); 
    1572         $the_weekday = apply_filters('the_weekday', $the_weekday); 
    1573         echo $the_weekday; 
    1574 } 
    1575  
    1576 /** 
    1577  * Display the weekday on which the post was written. 
    1578  * 
    1579  * Will only output the weekday if the current post's weekday is different from 
    1580  * the previous one output. 
    1581  * 
    1582  * @since 0.71 
    1583  * 
    1584  * @param string $before Optional Output before the date. 
    1585  * @param string $after Optional Output after the date. 
    1586  */ 
    1587 function the_weekday_date($before='',$after='') { 
    1588         global $wp_locale, $currentday, $previousweekday; 
    1589         $the_weekday_date = ''; 
    1590         if ( $currentday != $previousweekday ) { 
    1591                 $the_weekday_date .= $before; 
    1592                 $the_weekday_date .= $wp_locale->get_weekday( mysql2date( 'w', get_post()->post_date, false ) ); 
    1593                 $the_weekday_date .= $after; 
    1594                 $previousweekday = $currentday; 
    1595         } 
    1596         $the_weekday_date = apply_filters('the_weekday_date', $the_weekday_date, $before, $after); 
    1597         echo $the_weekday_date; 
    1598 } 
    1599  
    1600 /** 
    16011563 * Fire the wp_head action 
    16021564 * 
    16031565 * @since 1.2.0