-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1052 from publishpress/release-4.0.18
Release 4.0.18
- Loading branch information
Showing
17 changed files
with
48 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
* | ||
* @package PressPermit | ||
* @author Kevin Behrens <[email protected]> | ||
* @copyright Copyright (c) 2019, PublishPress | ||
* @copyright Copyright (c) 2024, PublishPress | ||
* | ||
*/ | ||
class Permissions | ||
|
@@ -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', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
* | ||
* @package PressPermit | ||
* @author Kevin Behrens <[email protected]> | ||
* @copyright Copyright (c) 2019, PublishPress | ||
* @copyright Copyright (c) 2024, PublishPress | ||
* | ||
*/ | ||
|
||
|
@@ -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)); | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
* | ||
* @package PressPermit | ||
* @author Kevin Behrens <[email protected]> | ||
* @copyright Copyright (c) 2019, PublishPress | ||
* @copyright Copyright (c) 2024, PublishPress | ||
* | ||
*/ | ||
class CapabilityFilters | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
* | ||
* @package PressPermit | ||
* @author Kevin Behrens <[email protected]> | ||
* @copyright Copyright (c) 2019, PublishPress | ||
* @copyright Copyright (c) 2024, PublishPress | ||
* | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
* | ||
* @package PressPermit | ||
* @author Kevin Behrens <[email protected]> | ||
* @copyright Copyright (c) 2019, PublishPress | ||
* @copyright Copyright (c) 2024, PublishPress | ||
* | ||
*/ | ||
class PageFilters | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
* | ||
* @package PressPermit | ||
* @author Kevin Behrens <[email protected]> | ||
* @copyright Copyright (c) 2019, PublishPress | ||
* @copyright Copyright (c) 2024, PublishPress | ||
* | ||
*/ | ||
class PostFilters | ||
|
@@ -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'); | ||
} | ||
|
||
|
@@ -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'))) { | ||
|
@@ -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; | ||
|
||
|
@@ -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); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
* | ||
* @package PressPermit | ||
* @author Kevin Behrens <[email protected]> | ||
* @copyright Copyright (c) 2019, PublishPress | ||
* @copyright Copyright (c) 2024, PublishPress | ||
* | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
* | ||
* @package PressPermit | ||
* @author Kevin Behrens <[email protected]> | ||
* @copyright Copyright (c) 2019, PublishPress | ||
* @copyright Copyright (c) 2024, PublishPress | ||
* | ||
*/ | ||
class Triggers | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
* | ||
* @package PressPermit | ||
* @author Kevin Behrens <[email protected]> | ||
* @copyright Copyright (c) 2019, PublishPress | ||
* @copyright Copyright (c) 2024, PublishPress | ||
* | ||
*/ | ||
class Agents | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
* | ||
* @package PressPermit | ||
* @author Kevin Behrens <[email protected]> | ||
* @copyright Copyright (c) 2019, PublishPress | ||
* @copyright Copyright (c) 2024, PublishPress | ||
* | ||
*/ | ||
class AgentsChecklist | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
* | ||
* @package PressPermit | ||
* @author Kevin Behrens <[email protected]> | ||
* @copyright Copyright (c) 2019, PublishPress | ||
* @copyright Copyright (c) 2024, PublishPress | ||
* | ||
*/ | ||
class AgentsDynamicUI | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
* | ||
* @package PressPermit | ||
* @author Kevin Behrens <[email protected]> | ||
* @copyright Copyright (c) 2019, PublishPress | ||
* @copyright Copyright (c) 2024, PublishPress | ||
* | ||
*/ | ||
class PermissionsUser extends \WP_User | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters