# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: /Users/ungratefulbiped/Sites/wp-svn/wp-includes
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
|
|
|
|
| 1207 | 1207 | } |
| 1208 | 1208 | |
| 1209 | 1209 | /** |
| 1210 | | * Display or Retrieve the date the post was written. |
| | 1210 | * Display or Retrieve the date the current $post was written (once per date) |
| 1211 | 1211 | * |
| 1212 | 1212 | * Will only output the date if the current post's date is different from the |
| 1213 | 1213 | * previous one output. |
| | 1214 | |
| | 1215 | * i.e. Only one date listing will show per day worth of posts shown in the loop, even if the |
| | 1216 | * function is called several times for each post. |
| 1214 | 1217 | * |
| 1215 | | * @since 0.71 |
| | 1218 | * HTML output can be filtered with 'the_date'. |
| | 1219 | * Date string output can be filtered with 'get_the_date'. |
| 1216 | 1220 | * |
| | 1221 | * @since 0.71 |
| | 1222 | * @uses get_the_date() |
| 1217 | 1223 | * @param string $d Optional. PHP date format defaults to the date_format option if not specified. |
| 1218 | 1224 | * @param string $before Optional. Output before the date. |
| 1219 | 1225 | * @param string $after Optional. Output after the date. |
| … |
… |
|
| 1221 | 1227 | * @return string|null Null if displaying, string if retrieving. |
| 1222 | 1228 | */ |
| 1223 | 1229 | function the_date($d='', $before='', $after='', $echo = true) { |
| 1224 | | global $post, $day, $previousday; |
| | 1230 | global $day, $previousday; |
| 1225 | 1231 | $the_date = ''; |
| 1226 | 1232 | if ( $day != $previousday ) { |
| 1227 | 1233 | $the_date .= $before; |
| 1228 | | if ( $d=='' ) |
| 1229 | | $the_date .= mysql2date(get_option('date_format'), $post->post_date); |
| 1230 | | else |
| 1231 | | $the_date .= mysql2date($d, $post->post_date); |
| | 1234 | $the_date .= get_the_date( $d ); |
| 1232 | 1235 | $the_date .= $after; |
| 1233 | 1236 | $previousday = $day; |
| 1234 | 1237 | |
| … |
… |
|
| 1241 | 1244 | } |
| 1242 | 1245 | |
| 1243 | 1246 | /** |
| | 1247 | * Retrieve the date the current $post was written. |
| | 1248 | * |
| | 1249 | * Unlike the_date() this function will always return the date. |
| | 1250 | * Modify output with 'get_the_date' filter. |
| | 1251 | * |
| | 1252 | * @since 2.9 |
| | 1253 | * |
| | 1254 | * @param string $d Optional. PHP date format defaults to the date_format option if not specified. |
| | 1255 | * @return string|null Null if displaying, string if retrieving. |
| | 1256 | */ |
| | 1257 | function get_the_date($d='') { |
| | 1258 | global $post, $day; |
| | 1259 | $the_date = ''; |
| | 1260 | |
| | 1261 | if ( '' == $d ) |
| | 1262 | $the_date .= mysql2date(get_option('date_format'), $post->post_date); |
| | 1263 | else |
| | 1264 | $the_date .= mysql2date($d, $post->post_date); |
| | 1265 | |
| | 1266 | return apply_filters('get_the_date', $the_date, $d); |
| | 1267 | } |
| | 1268 | |
| | 1269 | /** |
| | 1270 | No newline at end of file |
| 1244 | 1271 | * Display the date on which the post was last modified. |
| 1245 | 1272 | * |
| 1246 | 1273 | * @since 2.1.0 |