Skip to content

Commit

Permalink
Fix: publish time input option in the Date/Time field, is not working,
Browse files Browse the repository at this point in the history
  • Loading branch information
rokibulislam committed Feb 22, 2019
1 parent 4989095 commit 4a5f468
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/class-frontend-form-post.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ function submit_post() {
if ( isset( $_POST['wpuf_is_publish_time'] ) ) {
if ( isset( $_POST[$_POST['wpuf_is_publish_time']] ) && !empty( $_POST[$_POST['wpuf_is_publish_time']] ) ) {
// $postarr['post_date'] = date( 'Y-m-d H:i:s', strtotime( str_replace( array( ':', '/' ), '-', $_POST[$_POST['wpuf_is_publish_time']] ) ) );
$date_time = explode(" ", $_POST[$_POST['wpuf_is_publish_time']] );
$date_time = explode(" ", trim($_POST[$_POST['wpuf_is_publish_time']]) );
if ( !empty ( $date_time[0] ) ) {
$timestamp = strtotime( str_replace( array( '/' ), '-', $date_time[0] ) );
}
Expand Down

0 comments on commit 4a5f468

Please sign in to comment.