Skip to content

Instantly share code, notes, and snippets.

View codex-m's full-sized avatar

Emerson Maningo codex-m

View GitHub Profile
@codex-m
codex-m / unix_time_datefix
Created September 17, 2014 01:30
Code to fix 01.01.1970 date problem in Types plugin (starting version 1.6.2+)
/** START OF CODE
* Patch to correct wrong date format in dB in Types fields
* Add this code to your functions.php
* AUTHOR: wp-types.com
*/
add_action('wp_loaded','mass_update_date_fields_typesfunc');
function mass_update_date_fields_typesfunc() {
//Make sure $types_field_name is the exact field name as saved in database.
$types_field_name_in_db='wpcf-data-ogloszenia';