Danilo Rodrigues
Forum Replies Created
-
Forum: Plugins
In reply to: [All-in-One WP Migration and Backup] Import not workingI’m having the same problem
Forum: Plugins
In reply to: [All-in-One WP Migration and Backup] Import not workingAny solution found?
Forum: Plugins
In reply to: [Archives Calendar Widget] Colocar data no jquery.archivesCW.min.jsYour plugin inserts in the calendar the date of posting, and I wanted to put a expecifica date.
So I did the following way.
I’m using CPT UI plugin with Advanced Custom Post Type.
Perfect your plugin.
Thanks so much for your collaboration. 🙂if (!function_exists(‘unigradu_insert_date_event’)) {
/**
* Função para iserir a data do evento;
* No plugin Archive Calendar
* @param type $data
* @param type $postarr
* @return type
*/
function unigradu_isert_date_event($data, $postarr) {if ($data[‘post_type’] === ‘evento’) {
// Time zone
date_default_timezone_set(‘America/Sao_Paulo’);// Pega a data do evento ex: 20151005
$date_event = get_field(‘data’, $postarr[‘ID’]);// Coloca no formato 2015-10-05
$date_format = date(‘Y-m-d’, strtotime($date_event));// Coloca em um array
$date_out = explode(‘-‘, $date_format);// Pega a hora atual
$time = date(‘H:i:s’);// Colocar a hora atual em um array
$time_out = explode(‘:’, $time);// Instancia de DateTime
$date_time = new DateTime();//$date_out[0] ano
//$date_out[1] mes
//$date_out[2] dia
$date_time->setDate($date_out[0], $date_out[1], $date_out[2]);//$time_out[0] Hora
//$time_out[1] minutos
//$time_out[2] segundos
$date_time->setTime($time_out[0], $time_out[1], $time_out[2]);$d = $date_time->format(‘Y-m-d H:i:s’);
// Seta no post_date do php
$data[‘post_date’] = $d;}
return $data;
}add_filter(‘wp_insert_post_data’, ‘unigradu_isert_date_event’, 99, 2);
}Forum: Plugins
In reply to: [Archives Calendar Widget] Colocar data no jquery.archivesCW.min.jsOk.
The calendar appears the date of publication, but I wanted to change that date and place another. There is such a possibility?https://drive.google.com/folderview?id=0B6A0OysztWfFNVhwd1R6S2N5Nk0&usp=sharing
For example change the date 29 to 14 or 13 or 11/13/2015 etc.
Thanks for your attention.