Skip to content

Commit

Permalink
Merge pull request #1052 from publishpress/release-4.0.18
Browse files Browse the repository at this point in the history
Release 4.0.18
  • Loading branch information
agapetry authored Feb 27, 2024
2 parents f84be39 + 780e821 commit adf6190
Show file tree
Hide file tree
Showing 17 changed files with 48 additions and 47 deletions.
4 changes: 2 additions & 2 deletions classes/PublishPress/Permissions.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @package PressPermit
* @author Kevin Behrens <kevin@agapetry.net>
* @copyright Copyright (c) 2019, PublishPress
* @copyright Copyright (c) 2024, PublishPress
*
*/
class Permissions
Expand Down Expand Up @@ -75,7 +75,7 @@ public function getCurrentSanitizePostID() {
private function __construct()
{
add_filter('presspermit_unfiltered_content', [$this, 'fltPluginCompatUnfilteredContent'], 5, 1);

// Log the post ID field for the sanitize_post() call by wp_insert_post(),
// to provide context for subsequent pre_post_status, pre_post_parent, pre_post_category, pre_post_tags_input filter applications
add_filter('pre_post_ID',
Expand Down
4 changes: 2 additions & 2 deletions classes/PublishPress/Permissions/CapabilityCaster.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* @package PressPermit
* @author Kevin Behrens <kevin@agapetry.net>
* @copyright Copyright (c) 2019, PublishPress
* @copyright Copyright (c) 2024, PublishPress
*
*/

Expand Down Expand Up @@ -133,7 +133,7 @@ public function definePatternCaps()
}

if ($misc_caps) {
$this->pattern_role_arbitrary_caps[$role_name] = array_combine(array_keys($misc_caps), array_keys($misc_caps));
$this->pattern_role_arbitrary_caps[$role_name] = array_combine(array_keys($misc_caps), array_keys($misc_caps));
}
}

Expand Down
2 changes: 1 addition & 1 deletion classes/PublishPress/Permissions/CapabilityFilters.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @package PressPermit
* @author Kevin Behrens <kevin@agapetry.net>
* @copyright Copyright (c) 2019, PublishPress
* @copyright Copyright (c) 2024, PublishPress
*
*/
class CapabilityFilters
Expand Down
2 changes: 1 addition & 1 deletion classes/PublishPress/Permissions/DB/Groups.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* @package PressPermit
* @author Kevin Behrens <kevin@agapetry.net>
* @copyright Copyright (c) 2019, PublishPress
* @copyright Copyright (c) 2024, PublishPress
*
*/

Expand Down
2 changes: 1 addition & 1 deletion classes/PublishPress/Permissions/PageFilters.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* @package PressPermit
* @author Kevin Behrens <kevin@agapetry.net>
* @copyright Copyright (c) 2019, PublishPress
* @copyright Copyright (c) 2024, PublishPress
*
*/
class PageFilters
Expand Down
47 changes: 23 additions & 24 deletions classes/PublishPress/Permissions/PostFilters.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* @package PressPermit
* @author Kevin Behrens <kevin@agapetry.net>
* @copyright Copyright (c) 2019, PublishPress
* @copyright Copyright (c) 2024, PublishPress
*
*/
class PostFilters
Expand Down Expand Up @@ -52,26 +52,25 @@ private function init()
add_filter('presspermit_force_post_metacap_check', [$this, 'fltForcePostMetacapCheck'], 10, 2);

add_filter('pre_do_shortcode_tag', function($do_tag, $tag, $attr, $m) {

$this->doing_unfiltered_shortcode = in_array(
$tag,
apply_filters('presspermit_unfiltered_shortcodes', ['fl_builder_insert_layout']),
true
);

if ($this->doing_unfiltered_shortcode) {
$this->doing_unfiltered_shortcode = apply_filters('presspermit_is_unfiltered_shortcode', $this->doing_unfiltered_shortcode, $tag, $attr, $m);
}

return $do_tag;
}, 10, 4);
$this->doing_unfiltered_shortcode = in_array(
$tag,
apply_filters('presspermit_unfiltered_shortcodes', ['fl_builder_insert_layout']),
true
);

if ($this->doing_unfiltered_shortcode) {
$this->doing_unfiltered_shortcode = apply_filters('presspermit_is_unfiltered_shortcode', $this->doing_unfiltered_shortcode, $tag, $attr, $m);
}

return $do_tag;
}, 10, 4);

add_filter('do_shortcode_tag', function($output, $tag, $attr, $m) {
$this->doing_unfiltered_shortcode = false;
add_filter('do_shortcode_tag', function($output, $tag, $attr, $m) {
$this->doing_unfiltered_shortcode = false;

return $output;
}, 10, 4);

return $output;
}, 10, 4);

do_action('presspermit_post_filters');
}

Expand Down Expand Up @@ -163,8 +162,8 @@ public function fltPostsClauses($clauses, $_wp_query = false, $args = [])
global $pagenow, $current_user;

if ($this->doing_unfiltered_shortcode) {
return $clauses;
}
return $clauses;
}

// Gallery block in Gutenberg editor: error loading Image Size dropdown options
if (defined('REST_REQUEST') && (0 == strpos(PWP::SERVER_url('REQUEST_URI'), "/blocks")) && !PWP::empty_REQUEST('context') && ('edit' == PWP::REQUEST_key('context'))) {
Expand All @@ -174,8 +173,8 @@ public function fltPostsClauses($clauses, $_wp_query = false, $args = [])
$pp = presspermit();

if (defined('PUBLISHPRESS_VERSION') && did_action('publishpress_notifications_trigger_workflows')) {
return $clauses;
}
return $clauses;
}

$args['query_obj'] = $_wp_query;

Expand Down Expand Up @@ -700,7 +699,7 @@ public function getPostsWhere($args)

// legacy support
if (!$caps) {
$caps = class_exists('\PublishPress\Permissions\Statuses\CapabilityFilters') ? \PublishPress\Permissions\Statuses\CapabilityFilters::instance() : false;
$caps = class_exists('\PublishPress\Permissions\Statuses\CapabilityFilters') ? \PublishPress\Permissions\Statuses\CapabilityFilters::instance() : false;
}

$flag_meta_caps = !empty($caps);
Expand Down
2 changes: 1 addition & 1 deletion classes/PublishPress/Permissions/TermFilters.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* @package PressPermit
* @author Kevin Behrens <kevin@agapetry.net>
* @copyright Copyright (c) 2019, PublishPress
* @copyright Copyright (c) 2024, PublishPress
*
*/

Expand Down
2 changes: 1 addition & 1 deletion classes/PublishPress/Permissions/Triggers.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* @package PressPermit
* @author Kevin Behrens <kevin@agapetry.net>
* @copyright Copyright (c) 2019, PublishPress
* @copyright Copyright (c) 2024, PublishPress
*
*/
class Triggers
Expand Down
2 changes: 1 addition & 1 deletion classes/PublishPress/Permissions/UI/Agents.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* @package PressPermit
* @author Kevin Behrens <kevin@agapetry.net>
* @copyright Copyright (c) 2019, PublishPress
* @copyright Copyright (c) 2024, PublishPress
*
*/
class Agents
Expand Down
2 changes: 1 addition & 1 deletion classes/PublishPress/Permissions/UI/AgentsChecklist.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* @package PressPermit
* @author Kevin Behrens <kevin@agapetry.net>
* @copyright Copyright (c) 2019, PublishPress
* @copyright Copyright (c) 2024, PublishPress
*
*/
class AgentsChecklist
Expand Down
2 changes: 1 addition & 1 deletion classes/PublishPress/Permissions/UI/AgentsDynamicUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* @package PressPermit
* @author Kevin Behrens <kevin@agapetry.net>
* @copyright Copyright (c) 2019, PublishPress
* @copyright Copyright (c) 2024, PublishPress
*
*/
class AgentsDynamicUI
Expand Down
2 changes: 1 addition & 1 deletion classes/PublishPress/PermissionsUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* @package PressPermit
* @author Kevin Behrens <kevin@agapetry.net>
* @copyright Copyright (c) 2019, PublishPress
* @copyright Copyright (c) 2024, PublishPress
*
*/
class PermissionsUser extends \WP_User
Expand Down
4 changes: 2 additions & 2 deletions languages/press-permit-core.pot
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2024-02-22T01:18:29+00:00\n"
"POT-Creation-Date: 2024-02-26T19:40:58+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.8.1\n"
"X-Domain: press-permit-core\n"
Expand Down Expand Up @@ -2414,7 +2414,7 @@ msgstr ""
msgid "lower role levels"
msgstr ""

#: modules/presspermit-collaboration/classes/Permissions/CollabHooks.php:618
#: modules/presspermit-collaboration/classes/Permissions/CollabHooks.php:635
msgid "You are not allowed to create new %s"
msgstr ""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

/*
Copyright © 2019 PublishPress
Copyright © 2024 PublishPress
This file is part of PressPermit Collaborative Publishing.
Expand Down
2 changes: 1 addition & 1 deletion modules/presspermit-import/presspermit-import.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

/*
Copyright © 2019 PublishPress.
Copyright © 2024 PublishPress.
This file is part of PressPermit Import.
Expand Down
4 changes: 2 additions & 2 deletions press-permit-core.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: Advanced yet accessible content permissions. Give users or groups type-specific roles. Enable or block access for specific posts or terms.
* Author: PublishPress
* Author URI: https://publishpress.com/
* Version: 4.0.17
* Version: 4.0.18
* Text Domain: press-permit-core
* Domain Path: /languages/
* Requires at least: 5.5
Expand Down Expand Up @@ -202,7 +202,7 @@ function presspermit_load() {
return;
}

define('PRESSPERMIT_VERSION', '4.0.17');
define('PRESSPERMIT_VERSION', '4.0.18');

if (!defined('PRESSPERMIT_READ_PUBLIC_CAP')) {
define('PRESSPERMIT_READ_PUBLIC_CAP', 'read');
Expand Down
10 changes: 6 additions & 4 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tags: restrict, access, permissions, cms, user, private, category, pages, privac
Requires at least: 5.5
Tested up to: 6.4
Requires PHP: 7.2.5
Stable tag: 4.0.17
Stable tag: 4.0.18
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -245,25 +245,27 @@ Yes, we use the phrase "publishpress-ppcore-install" to share install links. You
* Perf : Eliminated recursive query of subpages (impacting sites with complex page hierarchies)
* Perf : Improved caching of post capability checks
* Perf : On category / term queries, don't filter term counts if empty terms are not being hidden and counts are not being shown
* Code : Improved phpcs scan results
* Code : Improved PHP Code Sniffer scan results
* Compat : Elementor - Could not use Elementor front end editor to save a draft of a published post
* Compat : Nested Pages - Apply pp_force_quick_edit capability to Nested Pages' Quick Edit and Contextual Add / Insert buttons
* Fixed : Filters for Post category, Tags, Terms, Parent or Status could be applied to wrong post under certain conditions
* Fixed : Terms were inappropriately auto-assigned under some conditions
* Fixed : Permissions > Settings > Core > Front End > "Performance: Don't filter category / tag counts" was not applied for Administrator
* Fixed : Some strings on Permissions > Settings were not translated
* Fixed : Gutenberg editor usage was not properly detected when triggered by another plugin, possibly leading to issues with category / term assignment filtering
* Fixed : Category pages: Subcategory posts were inappropriately hidden on some sites
* Fixed : Legacy Nav Menu Management - Limited Nav Menu editors saw uneditable menus in dropdown on Menus management screen
* Fixed : Legacy Nav Menu Management filters interfered with front end filtering under some conditions
* Fixed : Sanity check to prevent excessive version history logging if installed plugin's version tags or version tag storage is incorrect
* Change : Suppress "Enable Permissions" metaboxes in Post editor, Edit Term screens
* Fixed : Terms were inappropriately auto-assigned under some conditions\
* Change : Permissions > Settings > Editing option to disable auto-assignment of terms (when default term is not selectable). Note: Auto-assignment is required for some term-restricted editing configurations.
* Change : Auto-assign a term only if no default terms are selectable and the user's editing access is modified by term-specific Permissions
* Change : Never auto-assign a term to front page or posts page
* Change : Constant definitions related to term auto-assignment to assist any potential troubleshooting or restore previous behavior
* Change : User search for Specific Permission assignment - use LIKE matching for user meta field searches
* Change : Suppress "Enable Permissions" metaboxes in Post editor, Edit Term screens
* Change : Support constant PRESSPERMIT_MEDIA_UPLOAD_GRANT_PAGE_EDIT_CAPS for front end uploading solutions that require page editing capabilities for the async upload request
* Lib : Update wordpress-reviews library to v1.1.20
* Lib : Update wordpress-version-notices library to v2.1.3
* Lang : Update ES, FR, IT translations

= 3.11.6 - 13 Dec 2023 =
Expand Down

0 comments on commit adf6190

Please sign in to comment.