Last active
April 25, 2019 20:56
-
-
Save Garconis/2234cc238ba4d0fab27644b1741ac995 to your computer and use it in GitHub Desktop.
WP All Export | Ensure post dates are pulled from actual time and not GMT date
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** In WP All Export, add a new ID field and give it a custom Column Name, then... | |
* set the field to "Export the value returned by a PHP function"... | |
* where the function name is fs_format_get_date ... | |
* then add this function to the Function Editor, so that... | |
* the column in the export will use the proper date timezone and post time, rather than the "post_date_gmt" value | |
*/ | |
function fs_format_get_date ($id) { | |
$new_date = get_the_date($d = 'Y-m-d H:i:s', $id); | |
return $new_date; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment