Skip to content

Commit

Permalink
Merge pull request #860 from publishpress/release-v3.3.3
Browse files Browse the repository at this point in the history
Release v3.3.3
  • Loading branch information
andergmartins authored Jun 16, 2021
2 parents 18dcc0a + d8615f4 commit d1ea67f
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 7 deletions.
6 changes: 6 additions & 0 deletions common/php/class-module.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ public function __construct()
$this->twig->addExtension(new Twig_Extension_Debug());
}
}

foreach(get_post_stati(['public' => true, 'private' => true], 'names', 'OR') as $status) {
if (!in_array($status, $this->published_statuses)) {
$this->published_statuses []= $status;
}
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion includes.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

if (!defined('PP_LOADED')) {
// Define constants
define('PUBLISHPRESS_VERSION', '3.3.2');
define('PUBLISHPRESS_VERSION', '3.3.3');
define('PUBLISHPRESS_BASE_PATH', __DIR__);
define('PUBLISHPRESS_FILE_PATH', PUBLISHPRESS_BASE_PATH . '/publishpress.php');
define('PUBLISHPRESS_LIBRARIES_PATH', PUBLISHPRESS_BASE_PATH . '/libraries');
Expand Down
10 changes: 6 additions & 4 deletions modules/custom-status/custom-status.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ public function register_custom_statuses($args = [])
[
'hierarchical' => false,
'update_count_callback' => '_update_post_term_count',
'label' => false,
'label' => __('Statuses', 'publishpress'),
'query_var' => false,
'rewrite' => false,
'show_ui' => false,
Expand Down Expand Up @@ -2215,9 +2215,11 @@ public function fix_preview_link_part_two($permalink, $post, $sample = false)
}

//Is this published?
if (in_array($post->post_status, $this->published_statuses)) {
return $permalink;
}
if ($status_obj = get_post_status_object($post->post_status)) {
if (!empty($status_obj->public) || !empty($status_obj->private)) {
return $permalink;
}
}

//Are we overriding the permalink? Don't do anything
if (isset($_POST['action']) && $_POST['action'] == 'sample-permalink') {
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: 3.3.2
* Version: 3.3.3
* Text Domain: publishpress
* Domain Path: /languages
*
Expand Down
7 changes: 6 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Tags: editorial calendar, notifications, custom statuses, editorial comments, wo
Requires at least: 4.6
Requires PHP: 5.6
Tested up to: 5.7
Stable tag: 3.3.2
Stable tag: 3.3.3
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -120,6 +120,11 @@ 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/).

= [3.3.3] - 2021-06-16 =

* Fixed: Fix "Statuses" doesn't appear with a title in important areas, #846;
* Fixed: Fix links to posts with custom privacy are changed to preview links, #852;

= [3.3.2] - 2021-05-27 =

* Fixed: Fix the icons for statuses, #841;
Expand Down

0 comments on commit d1ea67f

Please sign in to comment.