| @@ 213-225 (lines=13) @@ | ||
| 210 | } |
|
| 211 | } |
|
| 212 | ||
| 213 | public function set_date( $postid, $value) { |
|
| 214 | ||
| 215 | if( $value ) { |
|
| 216 | $time = current_time('mysql'); |
|
| 217 | wp_update_post( |
|
| 218 | array ( |
|
| 219 | 'ID' => $postid, // ID of the post to update |
|
| 220 | 'post_date' => date( 'Y-m-d H:i:s', strtotime($value) ), |
|
| 221 | 'post_date_gmt' => gmdate( 'Y-m-d H:i:s', strtotime($value) ), |
|
| 222 | ) |
|
| 223 | ); |
|
| 224 | } |
|
| 225 | } |
|
| 226 | ||
| 227 | /** |
|
| 228 | * Determines if the given value has multiple terms by checking to see |
|
| @@ 506-517 (lines=12) @@ | ||
| 503 | ||
| 504 | ||
| 505 | ||
| 506 | public function set_date( $postid, $value) { |
|
| 507 | if( $value ) { |
|
| 508 | $value = self::getEnglishMonthName($value); |
|
| 509 | wp_update_post( |
|
| 510 | array ( |
|
| 511 | 'ID' => $postid, // ID of the post to update |
|
| 512 | 'post_date' => date( 'Y-m-d H:i:s', strtotime($value) ), |
|
| 513 | 'post_date_gmt' => gmdate( 'Y-m-d H:i:s', strtotime($value) ), |
|
| 514 | ) |
|
| 515 | ); |
|
| 516 | } |
|
| 517 | } |
|
| 518 | } |
|
| 519 | ||