GithubHelp home page GithubHelp logo

jasgreen / contact-form-submissions Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 4.0 31 KB

Mirror of my WordPress plugin

Home Page: https://wordpress.org/plugins/contact-form-submissions/

PHP 99.29% CSS 0.71%

contact-form-submissions's People

Contributors

archie22is avatar jasgreen avatar

Stargazers

 avatar

Watchers

 avatar

contact-form-submissions's Issues

CF7 Specific Form Submission Report uses wrong $date time

Hi,

Regarding:
https://wordpress.org/support/topic/cf-specific-form-submission-report-uses-wrong-date-time/

Apparently the date presented on a specific form details is different than the one presented on the table of lines of all submissions.

While the date on the forms submissions table is correct and uses the offset for region as defined on server, the specific date on a specific form submission report shown a date at default UTC time without the offset.

Possibly there is a usage of two different $dates on contact-form-submissions / Admin.php file.

On line 336 there is a usage of: " $date = date_i18n($datef, strtotime($post->post_date)); ?>"

/**
 * Output for the actions metabox
 */
public function actions_meta_box($post)
{
    $datef = __('M j, Y @ H:i');
    $date = date_i18n($datef, strtotime($post->post_date)); ?>
    <div id="minor-publishing">

        <div id="misc-publishing-actions">
            <div class="misc-pub-section curtime misc-pub-curtime">
                <span id="timestamp"><?php _e('Submitted', 'contact-form-submissions'); ?> : <b><?php echo $date; ?></b></span>
            </div>
        </div>
        <div class="clear"></div>
    </div>
    <?php

}

While on Line 356 usage of "wpcf7s_posted_values"

/**
 * Get the posted data for a form
 *
 * @param  integer $post_id the form post ID
 *
 * @return array            the form values
 */
public function get_mail_posted_fields($post_id = 0)
{
    $posted = array();
    $post_meta = get_post_meta($post_id);
    $posted = array_intersect_key(
        $post_meta,
        array_flip(array_filter(array_keys($post_meta), function ($key) {
            return preg_match('/^wpcf7s_posted-/', $key);
        }))
    );

    $posted = apply_filters('wpcf7s_posted_values', $posted);

    return $posted;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.