diff --git a/common/php/class-module.php b/common/php/class-module.php index 59da890d2..988d60572 100644 --- a/common/php/class-module.php +++ b/common/php/class-module.php @@ -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; + } + } } /** diff --git a/includes.php b/includes.php index 33e26ce69..3b334815b 100644 --- a/includes.php +++ b/includes.php @@ -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'); diff --git a/modules/custom-status/custom-status.php b/modules/custom-status/custom-status.php index 2818d6fe7..fc88d0b78 100644 --- a/modules/custom-status/custom-status.php +++ b/modules/custom-status/custom-status.php @@ -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, @@ -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') { diff --git a/publishpress.php b/publishpress.php index 0c0788dfe..576f665cc 100644 --- a/publishpress.php +++ b/publishpress.php @@ -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 * diff --git a/readme.txt b/readme.txt index 48fbed9e3..8026bc00e 100644 --- a/readme.txt +++ b/readme.txt @@ -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 @@ -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;