Skip to content

Commit

Permalink
Merge branch 'release/2.0.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
andergmartins committed Apr 16, 2020
2 parents db7642d + 5ac4367 commit 10ae5f8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion includes.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
);

// Define contants
define('PUBLISHPRESS_VERSION', '2.0.5');
define('PUBLISHPRESS_VERSION', '2.0.6');
define('PUBLISHPRESS_BASE_PATH', __DIR__);
define('PUBLISHPRESS_FILE_PATH', PUBLISHPRESS_BASE_PATH . '/publishpress.php');
define('PUBLISHPRESS_URL', plugins_url('/', __FILE__));
Expand Down
9 changes: 7 additions & 2 deletions modules/custom-status/custom-status.php
Original file line number Diff line number Diff line change
Expand Up @@ -2565,13 +2565,18 @@ public function fix_publish_date_after_publish($newStatus, $oldStatus, $post)
$currentDateTime = $currentDateTime->format('Y-m-d H:i:s');

if ($currentDateTime !== $post->post_date) {
global $wpdb;

$data = [
'ID' => $post->ID,
'post_date' => $currentDateTime,
'post_date_gmt' => get_gmt_from_date($currentDateTime),
];

wp_update_post($data);
$where = [
'ID' => $post->ID,
];

$wpdb->update($wpdb->posts, $data, $where, ['%s', '%s'], ['%d']);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion publishpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: PublishPress helps you plan and publish content with WordPress. Features include a content calendar, notifications, and custom statuses.
* Author: PublishPress
* Author URI: https://publishpress.com
* Version: 2.0.5
* Version: 2.0.6
*
* Copyright (c) 2019 PublishPress
*
Expand Down
4 changes: 4 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ Follow PublishPress on [Facebook](https://www.facebook.com/publishpress), [Twitt
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

= [2.0.6] - 2020-04-15 =

* Fixed: Fixed the duplicated posts after publishing using another algorithm due to new reports of a similar issue (#546);

= [2.0.5] - 2020-04-15 =

* Fixed: Fixed duplicated posts after publishing from custom post statuses, a bug introduced by the fix for #546;
Expand Down

0 comments on commit 10ae5f8

Please sign in to comment.