| @@ 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 |
|
| @@ 487-497 (lines=11) @@ | ||
| 484 | } |
|
| 485 | } |
|
| 486 | ||
| 487 | public function set_date( $postid, $value) { |
|
| 488 | if( $value ) { |
|
| 489 | wp_update_post( |
|
| 490 | array ( |
|
| 491 | 'ID' => $postid, // ID of the post to update |
|
| 492 | 'post_date' => date( 'Y-m-d H:i:s', strtotime($value) ), |
|
| 493 | 'post_date_gmt' => gmdate( 'Y-m-d H:i:s', strtotime($value) ), |
|
| 494 | ) |
|
| 495 | ); |
|
| 496 | } |
|
| 497 | } |
|
| 498 | } |
|
| 499 | ||