WordPress.org

Ready to get started?Download WordPress

Forums

YOP Poll
[resolved] Start & end date problem (2 posts)

  1. imamo
    Member
    Posted 7 months ago #

    Hi,

    Probably a bug but I'm not 100% sure. In creation of new pool I have start and end date problem.

    Image will tell everything: http://note.io/19WKpd3

    Start date: I expect it will be at least current server time not a date from previous year?
    End date: 9999-... as for start date at least current server time not that some fictional date.

    Is it possible to correct that?

    Thanks!

    Best regards

    http://wordpress.org/plugins/yop-poll/

  2. YOP
    Member
    Plugin Author

    Posted 7 months ago #

    Hi imamo,

    The Start Date is the one you see in Options (from the main menu) and by default, it's set as the date when you installed the plugin.

    To set the current server time as start date edit inc/admin.php and in
    the view_edit_add_new_poll function (approximately on line 6400), replace

    value="<?php echo '' == $default_options['start_date'] ? current_time('mysql') : $default_options['start_date']; ?>"

    with

    value="<?php echo ( 'edit' != $action ) ? current_time( 'mysql' ) : ( '' == $default_options['start_date'] ) ? current_time( 'mysql' ) : $default_options['start_date']; ?>"

    In regards to the end date, 9999-12-31 23:59:59, it allows us to verify if you've set an end date for your poll or not.

    Regards,

    YOP Team

Reply

You must log in to post.

About this Plugin

About this Topic