Ticket #24781: 24781.diff
| File 24781.diff, 3.0 KB (added by , 12 years ago) |
|---|
-
wp-includes/deprecated.php
3378 3378 3379 3379 return $size . $unit; 3380 3380 } 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 */ 3392 function 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 */ 3413 function 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
1560 1560 } 1561 1561 1562 1562 /** 1563 * Display the weekday on which the post was written.1564 *1565 * @since 0.711566 * @uses $wp_locale1567 * @uses $post1568 */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 from1580 * the previous one output.1581 *1582 * @since 0.711583 *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 /**1601 1563 * Fire the wp_head action 1602 1564 * 1603 1565 * @since 1.2.0