Skip to:
Content

bbPress.org


Ignore:
Timestamp:
08/12/2020 02:33:49 PM (6 years ago)
Author:
johnjamesjacoby
Message:

Moderation: when approving topics & replies, manually set post_date_gmt.

This commit is necessary to prevent wp_update_post() from marking these posts as having been published immediately, instead of their original post_date.

In branches/2.6, for 2.6.6.

Props SergeyBiryukov.

See #3133.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/src/includes/replies/functions.php

    r7104 r7123  
    18241824    $reply->post_status = $status;
    18251825
     1826    // Set post date GMT - prevents post_date override in wp_update_post()
     1827    $reply->post_date_gmt = get_gmt_from_date( $reply->post_date );
     1828
    18261829    // No revisions
    18271830    remove_action( 'pre_post_update', 'wp_save_post_revision' );
Note: See TracChangeset for help on using the changeset viewer.