diff --git a/classes/PressShack/LibWP.php b/classes/PressShack/LibWP.php
index 1361fef5..78c35dfc 100644
--- a/classes/PressShack/LibWP.php
+++ b/classes/PressShack/LibWP.php
@@ -157,7 +157,7 @@ public static function doingCron()
}
// support array matching for post type
- public static function getPostStatuses($args, $return = 'names', $operator = 'and')
+ public static function getPostStatuses($args, $return = 'names', $operator = 'and', $params = [])
{
if (isset($args['post_type'])) {
$post_type = $args['post_type'];
@@ -174,7 +174,7 @@ public static function getPostStatuses($args, $return = 'names', $operator = 'an
$statuses = get_post_stati($args, $return, $operator);
}
- return apply_filters('presspermit_get_post_statuses', $statuses, $args, $return, $operator);
+ return apply_filters('presspermit_get_post_statuses', $statuses, $args, $return, $operator, $params);
}
public static function findPostType($post_id = 0, $return_default = true)
diff --git a/classes/PublishPress/Permissions/DB/Permissions.php b/classes/PublishPress/Permissions/DB/Permissions.php
index 23e1a585..21c13836 100644
--- a/classes/PublishPress/Permissions/DB/Permissions.php
+++ b/classes/PublishPress/Permissions/DB/Permissions.php
@@ -395,10 +395,7 @@ public static function addExceptionClauses($where, $required_operation, $post_ty
if ('edit' == $required_operation) {
if (!empty($user->except['revise_post']['term'][$taxonomy]['additional'][$post_type][''])) {
- if (!empty($tt_ids[''])) {
$revise_ttids['{published}'] = array_merge($revise_ttids['{published}'], $user->except['revise_post']['term'][$taxonomy]['additional'][$post_type]['']);
- $tt_ids[''] = array_diff($tt_ids[''], $revise_ttids['{published}']);
- }
}
}
@@ -626,7 +623,22 @@ public static function addTermRestrictionsClause($required_operation, $post_type
. "') ) $type_exemption_clause ) $term_additions_clause $post_additions_clause )";
}
- return $where;
+ $args = compact(
+ 'required_operation',
+ 'post_type',
+ 'src_table',
+ 'merge_additions',
+ 'exempt_post_types',
+ 'mod_types',
+ 'tx_args',
+ 'additional_ttids',
+ 'apply_object_additions',
+ 'term_additions_clause',
+ 'post_additions_clause',
+ 'type_exemption_clause'
+ );
+
+ return apply_filters('presspermit_term_restrictions_clause', $where, $args);
}
// returns propagated exceptions items for which (a) the base eitem no longer exists, or (b) the base eitem was changed to "item only"
diff --git a/classes/PublishPress/Permissions/PostFilters.php b/classes/PublishPress/Permissions/PostFilters.php
index 0a195e11..1f7d3e2c 100644
--- a/classes/PublishPress/Permissions/PostFilters.php
+++ b/classes/PublishPress/Permissions/PostFilters.php
@@ -153,8 +153,12 @@ public function fltPostsClauses($clauses, $_wp_query = false, $args = [])
}
if (
+ // This solution is deprecated in favor of capability support for list_posts, list_others_pages, etc.
+ // But with removal of settings checkbox, need to maintain support for sites that rely on this previous workaround, which was enabled by constant PP_ADMIN_READONLY_LISTABLE
+ // (1) Sites that have the admin_hide_uneditable_posts option stored with false value
+ // (2) Sites that inadvertantly set options to defaults but want to restore this workaround. Now supporting an additional constant definition (disclosed by support as needed) rather than the checkbox UI.
is_admin() && (!$pp->moduleActive('collaboration') || defined('PP_ADMIN_READONLY_LISTABLE'))
- && !$pp->getOption('admin_hide_uneditable_posts')
+ && (!$pp->getOption('admin_hide_uneditable_posts') || defined('PP_ADMIN_NO_FILTER'))
) {
return $clauses;
}
@@ -382,7 +386,7 @@ public function fltPostsWhere($where, $args = [])
$valid_stati['future'] = 'future';
}
} else {
- $valid_stati = PWP::getPostStatuses(['internal' => false, 'post_type' => $post_types], 'names');
+ $valid_stati = PWP::getPostStatuses(['internal' => false, 'post_type' => $post_types], 'names', '', ['context' => 'edit']);
}
if (in_array('attachment', $post_types, true)) {
@@ -511,7 +515,7 @@ public function getPostsWhere($args)
if (isset($_REQUEST['context']) && ('edit' == $_REQUEST['context'])) {
$required_operation = (!empty($_REQUEST['parent_exclude'])) ? 'associate' : 'edit'; // @todo: better criteria
} else {
- $required_operation = 'read';
+ $required_operation = (presspermit_is_preview()) ? 'edit' : 'read';
}
} else {
$required_operation = (PWP::isFront() && !presspermit_is_preview()) ? 'read' : 'edit';
@@ -547,7 +551,7 @@ public function getPostsWhere($args)
$use_statuses = array_merge($use_statuses, $limit_statuses);
}
} else {
- $use_statuses = PWP::getPostStatuses(['internal' => false, 'post_type' => $post_types], 'object');
+ $use_statuses = PWP::getPostStatuses(['internal' => false, 'post_type' => $post_types], '', 'object', ['context' => 'edit']);
}
$use_statuses = apply_filters('presspermit_query_post_statuses', $use_statuses, $args );
@@ -628,13 +632,30 @@ public function getPostsWhere($args)
}
if ($reqd_caps) { // note: this function is called only for listing query filters (not for user_has_cap filter)
- if (apply_filters(
+ if ($missing_caps = apply_filters(
'presspermit_query_missing_caps',
array_diff($reqd_caps, array_keys($user->allcaps)),
$reqd_caps,
$post_type,
$meta_cap
)) {
+ // Support list_posts, list_others_posts, list_pitch_pages etc. for listing uneditable posts on Posts screen
+ if (('edit' == $required_operation) && empty($args['has_cap_check']) && empty(presspermit()->flags['cap_filter_in_process'])) {
+ foreach($reqd_caps as $key => $cap) {
+ if (in_array($cap, $missing_caps)) {
+ $list_cap = str_replace('edit_', 'list_', $cap);
+
+ if (!empty($user->allcaps[$list_cap])) {
+ $reqd_caps[$key] = $list_cap;
+ }
+ }
+ }
+
+ if (!array_diff($reqd_caps, array_keys($user->allcaps))) {
+ $have_site_caps['user'][] = $status;
+ }
+ }
+
// remove "others" and "private" cap requirements for post author
$owner_reqd_caps = self::getBaseCaps($reqd_caps, $post_type);
diff --git a/classes/PublishPress/Permissions/UI/GroupsQuery.php b/classes/PublishPress/Permissions/UI/GroupsQuery.php
index 301bcd97..76987bc4 100644
--- a/classes/PublishPress/Permissions/UI/GroupsQuery.php
+++ b/classes/PublishPress/Permissions/UI/GroupsQuery.php
@@ -39,10 +39,8 @@ class GroupQuery
public function __construct($query = null)
{
if (!empty($query)) {
- global $blog_id;
-
$this->query_vars = wp_parse_args($query, [
- 'blog_id' => $blog_id,
+ 'blog_id' => get_current_blog_id(),
'include' => [],
'exclude' => [],
'search' => '',
diff --git a/classes/PublishPress/Permissions/UI/HintsPro.php b/classes/PublishPress/Permissions/UI/HintsPro.php
index 1c62b191..49bd8b18 100644
--- a/classes/PublishPress/Permissions/UI/HintsPro.php
+++ b/classes/PublishPress/Permissions/UI/HintsPro.php
@@ -41,6 +41,10 @@ public static function proPromo()
background-color: white
}
+div.pp-logo {
+ padding-top:20px;
+}
+
div.pp-logo,
div.pp-logo img {
text-align: left;
@@ -51,7 +55,7 @@ public static function proPromo()
list-style: none;
padding-top: 10px;
text-align: left;
- margin-left: 50px;
+ margin-left: 25px;
margin-top: 0;
}
@@ -85,9 +89,8 @@ public static function proPromo()
-
-
-
+
+
-
diff --git a/classes/PublishPress/Permissions/UI/SettingsTabCore.php b/classes/PublishPress/Permissions/UI/SettingsTabCore.php
index 5eaf44e8..cc9213ac 100644
--- a/classes/PublishPress/Permissions/UI/SettingsTabCore.php
+++ b/classes/PublishPress/Permissions/UI/SettingsTabCore.php
@@ -52,7 +52,6 @@ public function optionCaptions($captions)
'display_user_profile_groups' => __('Permission Groups on User Profile', 'press-permit-core'),
'display_user_profile_roles' => __('Supplemental Roles on User Profile', 'press-permit-core'),
'new_user_groups_ui' => __('Select Permission Groups at User creation', 'press-permit-core'),
- 'admin_hide_uneditable_posts' => __('Hide non-editable posts', 'press-permit-core'),
'post_blockage_priority' => __('Post-specific Permissions take priority', 'press-permit-core'),
];
@@ -301,18 +300,21 @@ public function optionsUI()
optionCheckbox('display_branding', $tab, $section, '');
- $listable = defined('PP_ADMIN_READONLY_LISTABLE');
-
- $hint = ($pp->moduleExists('collaboration') && !$listable)
- ? __('Note: To allow listing of uneditable posts in wp-admin, define constant PP_ADMIN_READONLY_LISTABLE', 'press-permit-core')
- : '';
-
- $args = ($pp->moduleActive('collaboration') && !$listable)
- ? ['val' => 1, 'disabled' => true, 'no_storage' => true]
- : [];
-
- $ui->optionCheckbox('admin_hide_uneditable_posts', $tab, $section, $hint, '', $args);
+ if (defined('PP_ADMIN_READONLY_LISTABLE') && (!$pp->getOption('admin_hide_uneditable_posts') || defined('PP_ADMIN_POSTS_NO_FILTER'))) {
+ $hint = __('Unmodified from WordPress default behavior. To enable filtering, remove constant definition PP_ADMIN_READONLY_LISTABLE.', 'press-permit-core');
+ } else {
+ $hint = ($pp->moduleActive('collaboration'))
+ ? __('Uneditable posts are hidden from wp-admin listings. To expose them, use a role editor to add desired capabilities: list_posts, list_other_pages etc.', 'press-permit-core')
+ : __('To customize editing permissions, enable the Collaborative Publishing module.', 'press-permit-core');
+ }
+ ?>
+
PRESSPERMIT_VERSION, 'db_version' => PRESSPERMIT_DB_VERSION]);
- update_option('presspermitpro_version', ['version' => PRESSPERMIT_VERSION, 'db_version' => PRESSPERMIT_DB_VERSION]);
+
+ if (defined('PRESSPERMIT_PRO_VERSION')) {
+ update_option('presspermitpro_version', ['version' => PRESSPERMIT_PRO_VERSION, 'db_version' => PRESSPERMIT_DB_VERSION]);
+ }
}
if ($ver && !empty($ver['version'])) {
@@ -197,7 +202,10 @@ public function actInit()
require_once(PRESSPERMIT_CLASSPATH . '/PluginUpdated.php');
new Permissions\PluginUpdated($ver['version']);
update_option('presspermit_version', ['version' => PRESSPERMIT_VERSION, 'db_version' => PRESSPERMIT_DB_VERSION]);
- update_option('presspermitpro_version', ['version' => PRESSPERMIT_VERSION, 'db_version' => PRESSPERMIT_DB_VERSION]);
+
+ if (defined('PRESSPERMIT_PRO_VERSION')) {
+ update_option('presspermitpro_version', ['version' => PRESSPERMIT_PRO_VERSION, 'db_version' => PRESSPERMIT_DB_VERSION]);
+ }
}
if (is_multisite() && !$pp->getOption('wp_role_sync')) {
diff --git a/common/img/pp-logo.png b/common/img/pp-logo.png
deleted file mode 100644
index 87addbf5..00000000
Binary files a/common/img/pp-logo.png and /dev/null differ
diff --git a/composer.json b/composer.json
index cc623e30..709a610f 100644
--- a/composer.json
+++ b/composer.json
@@ -1,20 +1,28 @@
{
- "name": "publishpress/publishpress-permissions",
- "type": "wordpress-plugin",
- "description": "",
- "license": "GPL-2",
- "authors": [
- {
- "name": "PublishPress",
- "email": "help@publishpress.com"
- }
- ],
- "config": {
- "preferred-install": "dist"
+ "name": "publishpress/publishpress-permissions",
+ "type": "wordpress-plugin",
+ "description": "WordPress plugin: control permissions for publishing workflow and presentation",
+ "homepage": "https://publishpress.com/",
+ "license": "GPL-2",
+ "authors": [
+ {
+ "name": "PublishPress",
+ "email": "help@publishpress.com"
},
- "minimum-stability": "stable",
- "require": {
- "php": ">=5.6.20",
- "publishpress/wordpress-version-notices": "dev-master"
+ {
+ "name": "Kevin Behrens",
+ "email": "kevin@agapetry.net",
+ "homepage": "https://agapetry.net",
+ "role": "Lead Developer"
}
- }
\ No newline at end of file
+ ],
+ "config": {
+ "preferred-install": "dist"
+ },
+ "minimum-stability": "stable",
+ "prefer-stable": true,
+ "require": {
+ "php": ">=5.6.20",
+ "publishpress/wordpress-version-notices": "1.1.1"
+ }
+}
\ No newline at end of file
diff --git a/composer.lock b/composer.lock
index 138f0371..4ad73d83 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "b3e978061b9f6b0e1bd46295babac473",
+ "content-hash": "23a40e2c0056e01b9964bfb1b46b0743",
"packages": [
{
"name": "pimple/pimple",
@@ -107,16 +107,16 @@
},
{
"name": "publishpress/wordpress-version-notices",
- "version": "dev-master",
+ "version": "1.1.1",
"source": {
"type": "git",
"url": "https://github.com/publishpress/WordPress-Version-Notices.git",
- "reference": "45e6cb0f302165f3df820ff01c4f267f0b22517d"
+ "reference": "ba2b8eba33577d8c9351a9437e09af0e8f601a2c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/publishpress/WordPress-Version-Notices/zipball/45e6cb0f302165f3df820ff01c4f267f0b22517d",
- "reference": "45e6cb0f302165f3df820ff01c4f267f0b22517d",
+ "url": "https://api.github.com/repos/publishpress/WordPress-Version-Notices/zipball/ba2b8eba33577d8c9351a9437e09af0e8f601a2c",
+ "reference": "ba2b8eba33577d8c9351a9437e09af0e8f601a2c",
"shasum": ""
},
"require": {
@@ -145,16 +145,14 @@
}
],
"description": "Library for displaying version notices for Pro plugins in WordPress.",
- "time": "2020-04-08T13:59:53+00:00"
+ "time": "2020-04-08T13:59:35+00:00"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
- "stability-flags": {
- "publishpress/wordpress-version-notices": 20
- },
- "prefer-stable": false,
+ "stability-flags": [],
+ "prefer-stable": true,
"prefer-lowest": false,
"platform": {
"php": ">=5.6.20"
diff --git a/functions.php b/functions.php
index 57940b7e..650aeaea 100644
--- a/functions.php
+++ b/functions.php
@@ -21,6 +21,8 @@ function presspermit_is_preview() {
if (!$is_preview = is_preview()) {
if (defined('ELEMENTOR_VERSION')) {
$is_preview = !empty($_REQUEST['elementor-preview']);
+ } elseif (defined('ET_CORE')) {
+ $is_preview = !empty($_REQUEST['et_fb']);
}
}
diff --git a/includes/SettingsTabInstall.php b/includes/SettingsTabInstall.php
index 44f12477..7e51eddf 100644
--- a/includes/SettingsTabInstall.php
+++ b/includes/SettingsTabInstall.php
@@ -154,6 +154,10 @@ public function optionsUI()
'admin.php?page=presspermit-settings&pp_renewal=1'
);
}
+
+ } elseif ($modern_pro_version = get_option('presspermitpro_version')) {
+ $msg = __('Permissions Pro was previously active. You are now running the free version, with fewer features.', 'press-permit-core');
+
} elseif ($activated) {
$url = "https://publishpress.com/contact/?pp_topic=presspermit-migration&presspermit_account=$key_string";
@@ -163,7 +167,7 @@ public function optionsUI()
);
}
- $downgrade_note = (is_array($opt_val) && count($opt_val) > 1) || get_option('ppce_version') || get_option('pps_version') || get_option('ppp_version');
+ $downgrade_note = empty($modern_pro_version) && ((is_array($opt_val) && count($opt_val) > 1) || get_option('pps_version') || get_option('ppp_version'));
if ($msg || $downgrade_note || $key_string) :
$section = 'key'; // --- UPDATE KEY SECTION ---
diff --git a/languages/press-permit-core.mo b/languages/press-permit-core.mo
index e9c27427..cbdd51c5 100644
Binary files a/languages/press-permit-core.mo and b/languages/press-permit-core.mo differ
diff --git a/languages/press-permit-core.po b/languages/press-permit-core.po
index e601c841..b24eacbf 100644
--- a/languages/press-permit-core.po
+++ b/languages/press-permit-core.po
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PressPermit\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-04-02 13:46-0500\n"
+"POT-Creation-Date: 2020-07-08 12:55-0500\n"
"PO-Revision-Date: \n"
"Last-Translator: Kevin Behrens \n"
"Language-Team: PublishPress \n"
@@ -16,48 +16,48 @@ msgstr ""
"X-Poedit-KeywordsList: __;_e;_c;__ngettext;_n;_x\n"
"X-Poedit-SearchPath-0: F:\\snapshot\\press-permit-core\n"
-#: F:\snapshot\press-permit-core/press-permit-core.php:177
+#: F:\snapshot\press-permit-core/press-permit-core.php:191
msgid "This plugin can be deleted."
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/PermissionsHooksAdmin.php:119
+#: F:\snapshot\press-permit-core/classes/PublishPress/PermissionsHooksAdmin.php:114
msgid "Subscribers"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/PermissionsHooksAdmin.php:119
+#: F:\snapshot\press-permit-core/classes/PublishPress/PermissionsHooksAdmin.php:114
msgid "Subscriber"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/PermissionsHooksAdmin.php:120
+#: F:\snapshot\press-permit-core/classes/PublishPress/PermissionsHooksAdmin.php:115
msgid "Contributors"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/PermissionsHooksAdmin.php:120
+#: F:\snapshot\press-permit-core/classes/PublishPress/PermissionsHooksAdmin.php:115
msgid "Contributor"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/PermissionsHooksAdmin.php:121
+#: F:\snapshot\press-permit-core/classes/PublishPress/PermissionsHooksAdmin.php:116
msgid "Authors"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/PermissionsHooksAdmin.php:121
+#: F:\snapshot\press-permit-core/classes/PublishPress/PermissionsHooksAdmin.php:116
msgid "Author"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/PermissionsHooksAdmin.php:122
+#: F:\snapshot\press-permit-core/classes/PublishPress/PermissionsHooksAdmin.php:117
msgid "Editors"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/PermissionsHooksAdmin.php:122
+#: F:\snapshot\press-permit-core/classes/PublishPress/PermissionsHooksAdmin.php:117
msgid "Editor"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/PermissionsHooksAdmin.php:138
+#: F:\snapshot\press-permit-core/classes/PublishPress/PermissionsHooksAdmin.php:133
#, php-format
msgid "Please %senable the Collaborative Publishing module%s for PublishPress Revisions integration."
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/PermissionsHooksAdmin.php:142
+#: F:\snapshot\press-permit-core/classes/PublishPress/PermissionsHooksAdmin.php:137
msgid "PublishPress Revisions integration requires the Collaborative Publishing module. Please notify your Administrator."
msgstr ""
@@ -481,7 +481,7 @@ msgid "Block:"
msgstr ""
#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentExceptionsAjax.php:104
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1314
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1317
msgid "Limit to:"
msgstr ""
@@ -510,7 +510,7 @@ msgstr ""
#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentExceptionsAjax.php:225
#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:95
#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:158
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:990
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:993
msgid "(all)"
msgstr ""
@@ -904,7 +904,7 @@ msgid "%s Roles"
msgstr ""
#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:688
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1098
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1101
msgid "Apply"
msgstr ""
@@ -946,93 +946,93 @@ msgstr ""
msgid "* %s"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:982
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:985
#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentsChecklist.php:119
msgid "edit"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1005
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1008
msgid "Remove"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1009
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1012
#, php-format
msgid "Assign for selected and sub-%s"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1013
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1016
#, php-format
msgid "Assign for selected %s only"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1017
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1020
#, php-format
msgid "Assign for sub-%s only"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1021
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1024
msgid "Assign for selected and sub-terms"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1025
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1028
msgid "Assign for selected term only"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1029
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1032
msgid "Assign for sub-terms only"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1080
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1083
#, php-format
msgid "Mirror to %s"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1084
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1087
#, php-format
msgid "Mirror to %s %s"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1116
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1119
msgid "* = exceptions redundant due to a corresponding "only these" entry"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1129
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1132
#, php-format
msgid "... = assigned for %1$s and sub-%1$s"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1133
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1136
#, php-format
msgid "* = assigned for sub-%s only"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1146
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1149
#, php-format
msgid "note: Permissions inherited from parent %1$s are not displayed. %2$sshow all%3$s"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1150
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1153
#, php-format
msgid "note: Permissions inherited from parent %1$s or terms are not displayed. %2$sshow all%3$s"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1213
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1216
msgid "Group Members"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1262
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1265
msgid "Copy Roles and Exceptions from:"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1285
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1288
msgid "Do Clone"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1315
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1318
msgid "Blocked:"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1319
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/AgentPermissionsUI.php:1322
msgid "Enabled:"
msgstr ""
@@ -1249,6 +1249,7 @@ msgid "To block direct access to unreadable files, %1$supgrade to Permissions Pr
msgstr ""
#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsItemExceptions.php:25
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:308
msgid "To customize editing permissions, enable the Collaborative Publishing module."
msgstr ""
@@ -1296,75 +1297,75 @@ msgstr ""
msgid "Show list of Permissions Pro features and screencasts"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:94
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:96
msgid "Customize editing permissions per-category or per-post"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:100
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:102
msgid "Limit category/term assignment and page parent selection"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:106
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:108
msgid "File Access: regulate direct access to uploaded files"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:112
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:114
msgid "Hidden Content Teaser"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:118
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:120
msgid "bbPress: customize viewing, topic creation or reply submission permissions per-forum"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:121
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:123
msgid "Date-limited membership in Permissions Groups"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:127
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:129
msgid "Custom Post Visibility statuses, fully implemented throughout wp-admin"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:133
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:135
msgid "Custom Moderation statuses for access-controlled, multi-step publishing workflow"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:139
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:141
msgid "Regulate permissions for PublishPress post statuses"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:145
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:147
msgid "Customize the moderated editing of published content with Revisionary"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:151
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:153
msgid "Grant supplemental content permissions to a BuddyPress group"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:157
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:159
msgid "WPML integration to mirror permissions to translations"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:161
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:163
msgid "Help ticket system"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:166
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:168
msgid "Knowledge Base"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:168
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:170
msgid "Detailed Feature Grid"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:170
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:172
msgid "Contact Us"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:172
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:174
msgid "Purchase"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:174
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/HintsPro.php:176
msgid "Hide"
msgstr ""
@@ -1701,76 +1702,81 @@ msgid "Select Permission Groups at User creation"
msgstr ""
#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:55
-msgid "Hide non-editable posts"
-msgstr ""
-
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:56
msgid "Post-specific Permissions take priority"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:82
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:81
msgid "Basic settings for content filtering, management and presentation."
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:102
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:101
msgid "If disabled, manually \"blocked\" posts can be unblocked by specific Category / Term Permissions. Enabling this setting will provide more intuitive behavior, but may require configuration review and testing on prior installations."
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:123
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:122
msgid "Modify permissions for these Taxonomies:"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:139
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:146
msgid "Modify permissions for these Post Types:"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:199
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:206
#, php-format
msgid "%s capabilities"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:217
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:224
#, php-format
msgid "Note: Custom post types enabled here require type-specific capabilities for editing (\"edit_things\" instead of \"edit_posts\"). You can %1$sassign corresponding supplemental roles%2$s to grant these capabilities. Adding the type-specific capabilities directly to a WordPress role definition also works."
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:231
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:238
msgid "To customize bbPress forum permissions, activate the Compatibility Pack module."
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:233
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:240
msgid "To customize bbPress forum permissions, activate your Permissions Pro license key."
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:247
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:254
msgid "For most installations, leave this disabled. If enabled, corresponding edit and delete capabilities must be added to existing roles."
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:250
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:257
msgid "For most installations, leave this disabled. See Editing tab for specialized Media Library permissions."
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:251
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:258
msgid "For most installations, leave this disabled. For specialized Media Library permissions, install the Collaborative Publishing module."
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:257
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:264
msgid "If enabled, the create_posts, create_pages, etc. capabilities will be enforced for all Filtered Post Types. NOTE: You will also need to use a WordPress role editor such as PublishPress Capabilities to add these capabilities to desired roles."
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:274
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:281
msgid "Remove the \"Private:\" and \"Protected\" prefix from Post, Page titles"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:278
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:285
msgid "Remove unreadable Menu Items. If menu rendering problems occur with a third party plugin, disable this setting."
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:299
-msgid "Note: To allow listing of uneditable posts in wp-admin, define constant PP_ADMIN_READONLY_LISTABLE"
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:304
+msgid "Unmodified from WordPress default behavior. To enable filtering, remove constant definition PP_ADMIN_READONLY_LISTABLE."
+msgstr ""
+
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:307
+msgid "Uneditable posts are hidden from wp-admin listings. To expose them, use a role editor to add desired capabilities: list_posts, list_other_pages etc."
+msgstr ""
+
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:314
+#, php-format
+msgid "%sPosts / Pages Listing:%s %s"
msgstr ""
-#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:326
+#: F:\snapshot\press-permit-core/classes/PublishPress/Permissions/UI/SettingsTabCore.php:336
msgid "note: Groups and Roles are always displayed in \"Edit User\""
msgstr ""
@@ -2137,68 +2143,72 @@ msgstr ""
msgid "Your presspermit.com key has expired, but a PublishPress renewal discount may be available."
msgstr ""
-#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:161
+#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:159
+msgid "Permissions Pro was previously active. You are now running the free version, with fewer features."
+msgstr ""
+
+#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:165
#, php-format
msgid "A presspermit.com key appears to be active. Contact us for assistance in migrating your account to publishpress.com."
msgstr ""
-#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:177
+#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:181
msgid "Further details for your installation:"
msgstr ""
-#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:190
+#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:194
#, php-format
msgid "Original presspermit.com support key hash: %s (expires %s)"
msgstr ""
-#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:192
+#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:196
#, php-format
msgid "Original presspermit.com support key hash: %s"
msgstr ""
-#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:201
+#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:205
#, php-format
msgid "To temporarily restore Pro features before migrating to a publishpress.com account, delete this version and install Press Permit Core 2.6.x using Plugins > Add New > Upload."
msgstr ""
-#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:239
+#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:243
#, php-format
msgid "%s details"
msgstr ""
-#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:246
+#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:250
#, php-format
msgid "PublishPress Permissions Version: %1$s %2$s"
msgstr ""
-#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:248
+#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:252
#, php-format
msgid "Database Schema Version: %s"
msgstr ""
-#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:254
+#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:258
#, php-format
msgid "WordPress Version: %s"
msgstr ""
-#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:258
+#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:262
#, php-format
msgid "PHP Version: %s"
msgstr ""
-#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:286
+#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:290
msgid "Change Log (since your current version)"
msgstr ""
-#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:289
+#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:293
msgid "Active Modules:"
msgstr ""
-#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:347
+#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:351
msgid "Inactive Modules:"
msgstr ""
-#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:396
+#: F:\snapshot\press-permit-core/includes/SettingsTabInstall.php:400
msgid "Pro Modules:"
msgstr ""
@@ -2231,11 +2241,11 @@ msgstr ""
msgid "Revisor"
msgstr ""
-#: F:\snapshot\press-permit-core/modules/presspermit-collaboration/classes/Permissions/Collab/AdminFilters.php:125
+#: F:\snapshot\press-permit-core/modules/presspermit-collaboration/classes/Permissions/Collab/AdminFilters.php:140
msgid "term (manage)"
msgstr ""
-#: F:\snapshot\press-permit-core/modules/presspermit-collaboration/classes/Permissions/Collab/AdminFilters.php:161
+#: F:\snapshot\press-permit-core/modules/presspermit-collaboration/classes/Permissions/Collab/AdminFilters.php:176
#, php-format
msgid "%s Manager"
msgstr ""
@@ -2256,22 +2266,22 @@ msgstr ""
msgid "You do not have permission to delete that Navigation Menu."
msgstr ""
-#: F:\snapshot\press-permit-core/modules/presspermit-collaboration/classes/Permissions/Collab/CapabilityFiltersAdmin.php:463
-#: F:\snapshot\press-permit-core/modules/presspermit-collaboration/classes/Permissions/Collab/CapabilityFiltersAdmin.php:482
+#: F:\snapshot\press-permit-core/modules/presspermit-collaboration/classes/Permissions/Collab/CapabilityFiltersAdmin.php:448
+#: F:\snapshot\press-permit-core/modules/presspermit-collaboration/classes/Permissions/Collab/CapabilityFiltersAdmin.php:467
#, php-format
msgid "Go to %s"
msgstr ""
-#: F:\snapshot\press-permit-core/modules/presspermit-collaboration/classes/Permissions/Collab/CapabilityFiltersAdmin.php:469
+#: F:\snapshot\press-permit-core/modules/presspermit-collaboration/classes/Permissions/Collab/CapabilityFiltersAdmin.php:454
#, php-format
msgid "The %s was saved, but you can no longer edit it."
msgstr ""
-#: F:\snapshot\press-permit-core/modules/presspermit-collaboration/classes/Permissions/Collab/CapabilityFiltersAdmin.php:476
+#: F:\snapshot\press-permit-core/modules/presspermit-collaboration/classes/Permissions/Collab/CapabilityFiltersAdmin.php:461
msgid "Dashboard"
msgstr ""
-#: F:\snapshot\press-permit-core/modules/presspermit-collaboration/classes/Permissions/Collab/CapabilityFiltersAdmin.php:481
+#: F:\snapshot\press-permit-core/modules/presspermit-collaboration/classes/Permissions/Collab/CapabilityFiltersAdmin.php:466
msgid "The requested modification was processed, but you can no longer edit the post."
msgstr ""
@@ -2407,17 +2417,17 @@ msgstr ""
msgid "CMS Page Tree View plugin: hide 'add' links (for specified hierarchical post type) based on user's association permissions"
msgstr ""
-#: F:\snapshot\press-permit-core/modules/presspermit-collaboration/classes/Permissions/Collab/NavMenus.php:363
+#: F:\snapshot\press-permit-core/modules/presspermit-collaboration/classes/Permissions/Collab/NavMenus.php:341
#, php-format
msgid "You do not have permission to move the menu item \"%1$s\".
Return to Menu Editor"
msgstr ""
-#: F:\snapshot\press-permit-core/modules/presspermit-collaboration/classes/Permissions/Collab/NavMenus.php:370
+#: F:\snapshot\press-permit-core/modules/presspermit-collaboration/classes/Permissions/Collab/NavMenus.php:348
#, php-format
msgid "You do not have permission to delete the menu item \"%1$s\".
Return to Menu Editor"
msgstr ""
-#: F:\snapshot\press-permit-core/modules/presspermit-collaboration/classes/Permissions/Collab/NavMenus.php:377
+#: F:\snapshot\press-permit-core/modules/presspermit-collaboration/classes/Permissions/Collab/NavMenus.php:355
#, php-format
msgid "You do not have permission to edit the menu item \"%1$s\".
Return to Menu Editor"
msgstr ""
@@ -2904,6 +2914,18 @@ msgid "Do not alter the Media Library listing provided by WordPress"
msgstr ""
#: F:\snapshot\press-permit-core/modules/presspermit-collaboration/classes/Permissions/Collab/UI/SettingsTabEditing.php:500
+msgid "On the Posts screen, satisfy a missing edit_posts capability by listing uneditable drafts"
+msgstr ""
+
+#: F:\snapshot\press-permit-core/modules/presspermit-collaboration/classes/Permissions/Collab/UI/SettingsTabEditing.php:501
+msgid "On the Posts screen, satisfy a missing edit_others_posts capability by listing other user's uneditable posts"
+msgstr ""
+
+#: F:\snapshot\press-permit-core/modules/presspermit-collaboration/classes/Permissions/Collab/UI/SettingsTabEditing.php:502
+msgid "On the Pages screen, satisfy a missing edit_private_pages capability by listing uneditable private pages"
+msgstr ""
+
+#: F:\snapshot\press-permit-core/modules/presspermit-collaboration/classes/Permissions/Collab/UI/SettingsTabEditing.php:503
msgid "Make Quick Edit and Bulk Edit available to non-Administrators even though some inappropriate selections may be possible"
msgstr ""
@@ -2916,7 +2938,7 @@ msgstr ""
msgid "Workflow"
msgstr ""
-#: F:\snapshot\press-permit-core/modules/presspermit-collaboration/classes/Permissions/Collab/UI/Dashboard/NavMenu.php:57
+#: F:\snapshot\press-permit-core/modules/presspermit-collaboration/classes/Permissions/Collab/UI/Dashboard/NavMenu.php:93
msgid "You are not permitted to manage menu locations"
msgstr ""
@@ -3018,24 +3040,34 @@ msgstr ""
msgid "You are not allowed to manage Permissions settings"
msgstr ""
+#: F:\snapshot\press-permit-core/modules/presspermit-import/classes/Permissions/Import/DB/PressPermitBeta.php:24
+msgid "Site Roles"
+msgstr ""
+
+#: F:\snapshot\press-permit-core/modules/presspermit-import/classes/Permissions/Import/DB/PressPermitBeta.php:24
#: F:\snapshot\press-permit-core/modules/presspermit-import/classes/Permissions/Import/DB/RoleScoper.php:25
-msgid "Sites"
+msgid "Term / Object Roles"
msgstr ""
+#: F:\snapshot\press-permit-core/modules/presspermit-import/classes/Permissions/Import/DB/PressPermitBeta.php:24
+msgid "Conditions"
+msgstr ""
+
+#: F:\snapshot\press-permit-core/modules/presspermit-import/classes/Permissions/Import/DB/PressPermitBeta.php:24
#: F:\snapshot\press-permit-core/modules/presspermit-import/classes/Permissions/Import/DB/RoleScoper.php:25
-msgid "General Roles"
+msgid "Options"
msgstr ""
#: F:\snapshot\press-permit-core/modules/presspermit-import/classes/Permissions/Import/DB/RoleScoper.php:25
-msgid "Term / Object Roles"
+msgid "Sites"
msgstr ""
#: F:\snapshot\press-permit-core/modules/presspermit-import/classes/Permissions/Import/DB/RoleScoper.php:25
-msgid "Restrictions"
+msgid "General Roles"
msgstr ""
#: F:\snapshot\press-permit-core/modules/presspermit-import/classes/Permissions/Import/DB/RoleScoper.php:25
-msgid "Options"
+msgid "Restrictions"
msgstr ""
#: F:\snapshot\press-permit-core/modules/presspermit-import/classes/Permissions/Import/UI/SettingsTabImport.php:42
@@ -3179,11 +3211,11 @@ msgstr ""
msgid "Once your import task is complete, you can eliminate this tab by disabling the %s module."
msgstr ""
-#: F:\snapshot\press-permit-core/modules/presspermit-import/classes/Permissions/Import/UI/SettingsTabImport.php:278
+#: F:\snapshot\press-permit-core/modules/presspermit-import/classes/Permissions/Import/UI/SettingsTabImport.php:285
msgid "All imported groups, roles, exceptions and options will be deleted. Are you sure?"
msgstr ""
-#: F:\snapshot\press-permit-core/modules/presspermit-import/classes/Permissions/Import/UI/SettingsTabImport.php:282
+#: F:\snapshot\press-permit-core/modules/presspermit-import/classes/Permissions/Import/UI/SettingsTabImport.php:289
msgid "Undo All Imports"
msgstr ""
diff --git a/modules/presspermit-collaboration/classes/Permissions/Collab/AdminFilters.php b/modules/presspermit-collaboration/classes/Permissions/Collab/AdminFilters.php
index d4be1bd1..ce07afcd 100644
--- a/modules/presspermit-collaboration/classes/Permissions/Collab/AdminFilters.php
+++ b/modules/presspermit-collaboration/classes/Permissions/Collab/AdminFilters.php
@@ -42,7 +42,7 @@ function __construct()
add_filter('presspermit_add_exception', [$this, 'fltAddException']);
// Track autodrafts by postmeta in case WP sets their post_status to draft
- add_action('save_post', [$this, 'actSavePost'], 10, 2);
+ add_action('save_post', [$this, 'actSavePost'], 10, 3);
add_filter('wp_insert_post_empty_content', [$this, 'fltLogInsertPost'], 10, 2);
add_filter('save_post', [$this, 'fltUnloadCurrentUserExceptions']);
@@ -51,14 +51,29 @@ function __construct()
add_filter('editable_roles', [$this, 'fltEditableRoles'], 99);
}
- function actSavePost($post_id, $post)
+ function actSavePost($post_id, $post, $update)
{
if (!empty(presspermit()->flags['ignore_save_post'])) {
return;
}
- if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)
+ if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
update_post_meta($post_id, '_pp_is_autodraft', true);
+
+ } elseif (!$update) {
+ // For configurations that limit access by term selection, need to default to an allowed term
+ if (!presspermit()->isAdministrator()) {
+ require_once(PRESSPERMIT_COLLAB_CLASSPATH . '/PostTermsSave.php');
+
+ foreach(get_object_taxonomies($post->post_type) as $taxonomy) {
+ if (!$terms = wp_get_object_terms($post->ID, $taxonomy, ['fields' => 'ids'])) {
+ if ($terms = PostTermsSave::fltPreObjectTerms($terms, $taxonomy)) {
+ wp_set_post_terms($post->ID, $terms, $taxonomy);
+ }
+ }
+ }
+ }
+ }
}
function fltUnloadCurrentUserExceptions($item_id)
diff --git a/modules/presspermit-collaboration/classes/Permissions/Collab/CapabilityFiltersAdmin.php b/modules/presspermit-collaboration/classes/Permissions/Collab/CapabilityFiltersAdmin.php
index d3072258..9693ab38 100644
--- a/modules/presspermit-collaboration/classes/Permissions/Collab/CapabilityFiltersAdmin.php
+++ b/modules/presspermit-collaboration/classes/Permissions/Collab/CapabilityFiltersAdmin.php
@@ -189,21 +189,6 @@ function fltAdjustReqdCaps($reqd_caps, $orig_cap, $user_id, $args)
if (empty($current_user->allcaps['upload_files']) && !empty($current_user->allcaps['edit_files']))
$reqd_caps[$key] = 'edit_files';
}
-
- // PublishPress workaround (literal edit_posts capability required for dashboard widgets) @todo: still needed?
- if (is_blog_admin() && in_array($pagenow, ['edit.php']) && !did_action('admin_enqueue_scripts')) {
- $_reqd_caps = $reqd_caps;
-
- foreach (get_post_types(['public' => true, 'show_ui' => true], 'object', 'or') as $post_type => $type_obj) {
- if (!empty($current_user->allcaps[$type_obj->cap->edit_posts])) {
- $key = array_search('edit_posts', $reqd_caps);
- if (false !== $key) {
- $reqd_caps[$key] = $type_obj->cap->edit_posts;
- break;
- }
- }
- }
- }
}
//===============================
diff --git a/modules/presspermit-collaboration/classes/Permissions/Collab/Revisionary/Admin.php b/modules/presspermit-collaboration/classes/Permissions/Collab/Revisionary/Admin.php
index 9e38a332..535a4b32 100644
--- a/modules/presspermit-collaboration/classes/Permissions/Collab/Revisionary/Admin.php
+++ b/modules/presspermit-collaboration/classes/Permissions/Collab/Revisionary/Admin.php
@@ -12,9 +12,11 @@ function __construct() {
}
add_filter('map_meta_cap', [$this, 'flt_mapMetaCap'], 1, 4);
- //add_filter('pre_post_parent', [$this, 'fltPageParent']);
+
add_filter('presspermit_get_exception_items', [$this, 'flt_get_exception_items'], 10, 5);
+ add_filter('presspermit_term_restrictions_clause', [$this, 'fltTermRestrictionsClause'], 10, 2);
+
add_filter('presspermit_additions_clause', [$this, 'flt_additions_clause'], 10, 4);
add_filter('presspermit_administrator_caps', [$this, 'flt_pp_administrator_caps'], 5);
@@ -72,18 +74,6 @@ public function flt_term_include_clause($clause, $args = [])
return $clause;
}
- /*
- public function fltPageParent($parent_id)
- {
- global $revisionary;
- if (!empty($revisionary->admin->revision_save_in_progress)) {
- do_action('presspermit_disable_page_parent_filter');
- }
-
- return $parent_id;
- }
- */
-
public function flt_additions_clause($clause, $operation, $post_type, $args)
{
//$args = compact( 'status', 'in_clause', 'src_table' )
@@ -94,80 +84,75 @@ public function flt_additions_clause($clause, $operation, $post_type, $args)
&& !in_array($post_type, apply_filters('presspermit_unrevisable_types', []), true)) {
$user = presspermit()->getUser();
- if ( isset($args['ids']) ) { // PressPermit Core >= 2.6.2 @todo: eliminate else case?
+ if ('post' == $args['via_item_source']) {
$hide_others_revisions = rvy_get_option('revisor_lock_others_revisions')
&& (
- (!empty($type_obj->cap->edit_others_posts) && empty($type_obj->cap->edit_others_posts))
+ (!empty($type_obj->cap->edit_posts) && empty($type_obj->cap->edit_others_posts))
|| (!empty($type_obj->cap->edit_others_posts) && empty($user->allcaps[$type_obj->cap->edit_others_posts]))
);
- // If we are hiding other revisions from revisors, need to distinguish
- // between 'edit' exceptions and 'revise' exceptions (which are merged upstream for other reasons).
- if ($hide_others_revisions && empty($user->allcaps['edit_others_revisions'])) {
+ // If we are hiding other revisions from revisors, need to distinguish
+ // between 'edit' exceptions and 'revise' exceptions (which are merged upstream for other reasons).
+ if ($hide_others_revisions && empty($user->allcaps['edit_others_revisions'])) {
$revise_ids = [];
+
+ $via_item_type = (isset($args['via_item_type'])) ? $args['via_item_type'] : $post_type;
+ $revise_ids = $user->getExceptionPosts(
+ 'revise',
+ 'additional',
+ $via_item_type,
+ ['status' => $args['status']]
+ );
+
+ $edit_ids = ($revise_ids) ? array_diff($args['ids'], $revise_ids) : $args['ids'];
- switch ($args['via_item_source']) {
- case 'post':
- $via_item_type = (isset($args['via_item_type'])) ? $args['via_item_type'] : $post_type;
- $revise_ids = $user->getExceptionPosts(
- 'revise',
- 'additional',
- $via_item_type,
- ['status' => $args['status']]
- );
-
- break;
-
- case 'term':
- // @todo
-
- /*
- foreach(presspermit()->getEnabledTaxonomies(['object_type' => $post_type]) as $taxonomy) {
- $tt_ids = $user->getExceptionTerms(
- 'revise',
- 'additional',
- $post_type,
- $taxonomy,
- ['status' => $args['status'], 'merge_universals' => true]
- );
-
- $revise_ids = array_merge($revise_ids, $tt_ids);
- }
-*/
-
- break;
- }
-
- $edit_ids = ($revise_ids) ? array_diff($args['ids'], $revise_ids) : $args['ids'];
-
- if ( $edit_ids || $revise_ids ) {
- $parent_clause = array();
-
- if ( $edit_ids ) {
- $parent_clause []= "( {$args['src_table']}.comment_count IN ('" . implode("','", $edit_ids) . "') )";
- }
-
- if ( $revise_ids ) {
- $status_csv = "'" . implode("','", get_post_stati(['public' => true, 'private' => true]), 'names', 'or') . "'";
+ if ( $edit_ids || $revise_ids ) {
+ $parent_clause = [];
+
+ if ( $edit_ids ) {
+ $parent_clause []= "( {$args['src_table']}.comment_count IN ('" . implode("','", $edit_ids) . "') )";
+ }
+
+ if ( $revise_ids ) {
+ $status_csv = "'" . implode("','", get_post_stati(['public' => true, 'private' => true], 'names', 'or')) . "'";
$parent_clause []= "( {$args['src_table']}.post_author = $user->ID"
. " AND {$args['src_table']}.comment_count IN ('" . implode("','", $revise_ids) . "') AND {$args['src_table']}.post_status IN ($status_csv) )";
- }
-
- $parent_clause = 'AND (' . Arr::implode(' OR ', $parent_clause) . ' )';
-
+ }
+
+ $parent_clause = 'AND (' . Arr::implode(' OR ', $parent_clause) . ' )';
+
$append_clause .= " OR ( {$args['src_table']}.post_status IN ('pending-revision', 'future-revision') $parent_clause )";
- }
- } else {
- // Not hiding other users' revisions from Revisors, so list all posts with 'edit' or 'revise' exceptions regardless of author.
+ }
+ } else {
+ // Not hiding other users' revisions from Revisors, so list all posts with 'edit' or 'revise' exceptions regardless of author.
$append_clause .= " OR ( {$args['src_table']}.post_status IN ('pending-revision', 'future-revision')"
. " AND {$args['src_table']}.comment_count {$args['in_clause']} )";
- }
- } else {
- // Older PP Core version doesn't pass ids, so can't distinguish between 'edit' and 'revise' exceptions; retain previous behavior.
- $append_clause .= " OR ( {$args['src_table']}.post_status IN ('pending-revision', 'future-revision')"
- . " AND {$args['src_table']}.post_author = " . presspermit()->getUser()->ID
- . " AND {$args['src_table']}.comment_count {$args['in_clause']} )";
+ }
+ } elseif ('term' == $args['via_item_source']) {
+ $revise_tt_ids = [];
+
+ foreach(presspermit()->getEnabledTaxonomies(['object_type' => $post_type]) as $taxonomy) {
+ $tt_ids = $user->getExceptionTerms(
+ 'revise',
+ 'additional',
+ $post_type,
+ $taxonomy,
+ ['status' => $args['status'], 'merge_universals' => true]
+ );
+
+ $revise_tt_ids = array_merge($revise_tt_ids, $tt_ids);
+ }
+
+ if ($revise_tt_ids) {
+ global $wpdb;
+
+ $status_csv = "'" . implode("','", get_post_stati(['public' => true, 'private' => true], 'names', 'or')) . "'";
+
+ $parent_tt_clause = "( {$args['src_table']}.comment_count IN ( SELECT object_id FROM $wpdb->term_relationships WHERE term_taxonomy_id IN ('" . implode("','", $revise_tt_ids) . "') ) )";
+
+ $append_clause .= " OR ( {$args['src_table']}.post_status IN ('pending-revision', 'future-revision') AND $parent_tt_clause )";
+ }
}
}
@@ -246,6 +231,11 @@ public function flt_get_exception_items($exception_items, $operation, $mod_type,
$$var = $args[$var];
}
+ if ('term' == $via_item_source) {
+ // Don't implement term exceptions by merging with edit_post exceptions, due to complication of applying revision exceptions for published posts only
+ return $exception_items;
+ }
+
$user = presspermit()->getUser();
if (!isset($user->except['revise_post'])) {
@@ -279,6 +269,82 @@ public function flt_get_exception_items($exception_items, $operation, $mod_type,
return $exception_items;
}
+ // Apply term revision restrictions separately with status clause to avoid removing unpublished posts from the listing
+ function fltTermRestrictionsClause($where, $args) {
+ global $wpdb;
+
+ $defaults = array_fill_keys(
+ ['required_operation',
+ 'post_type',
+ 'src_table',
+ 'merge_additions',
+ 'exempt_post_types',
+ 'mod_types',
+ 'tx_args',
+ 'additional_ttids',
+ 'apply_object_additions',
+ 'term_additions_clause',
+ 'post_additions_clause',
+ 'type_exemption_clause'
+ ], ''
+ );
+
+ $args = array_merge($defaults, $args);
+ foreach (array_keys($defaults) as $var) {
+ $$var = $args[$var];
+ }
+
+ $user = presspermit()->getUser();
+
+ $excluded_ttids_published = [];
+
+ foreach (presspermit()->getEnabledTaxonomies($tx_args) as $taxonomy) {
+ $tx_additional_ids = ($merge_additions)
+ ? $user->getExceptionTerms($required_operation, 'additional', $post_type, $taxonomy, ['status' => '', 'merge_universals' => true])
+ : [];
+
+ foreach ($mod_types as $mod) {
+ if ($tt_ids = $user->getExceptionTerms('revise', $mod, $post_type, $taxonomy, ['status' => '', 'merge_universals' => true])) {
+ $tx_additional_ids = ($merge_additions)
+ ? $user->getExceptionTerms('revise', 'additional', $post_type, $taxonomy, ['status' => '', 'merge_universals' => true])
+ : [];
+
+ $published_stati_csv = implode("','", get_post_stati(['public' => true, 'private' => true], 'names', 'OR' ));
+
+ if ('include' == $mod) {
+ if ($tx_additional_ids) {
+ $tt_ids = array_merge($tt_ids, $tx_additional_ids);
+ }
+
+ $term_include_clause = apply_filters(
+ 'presspermit_term_include_clause',
+ "( $src_table.post_status NOT IN ('$published_stati_csv') OR $src_table.ID IN ( SELECT object_id FROM $wpdb->term_relationships WHERE term_taxonomy_id IN ('" . implode("','", $tt_ids) . "') ) )",
+ compact('tt_ids', 'src_table')
+ );
+
+ $where .= " AND ( $term_include_clause $term_additions_clause $post_additions_clause $type_exemption_clause )";
+ continue 2;
+
+ } else {
+ if ($tx_additional_ids) {
+ $tt_ids = array_diff($tt_ids, $tx_additional_ids);
+ }
+
+ $excluded_ttids_published = array_merge($excluded_ttids_published, $tt_ids);
+ }
+ }
+ }
+ }
+
+ if ($excluded_ttids_published) {
+ $where .= " AND ( ($src_table.post_status NOT IN ('$published_stati_csv') OR $src_table.ID NOT IN ( SELECT object_id FROM $wpdb->term_relationships WHERE term_taxonomy_id IN ('"
+ . implode("','", $excluded_ttids_published)
+ . "') ) $type_exemption_clause ) $term_additions_clause $post_additions_clause )";
+ }
+
+ return $where;
+ }
+
public static function adjust_revision_reqd_caps($reqd_caps, $object_type)
{
global $revisionary;
diff --git a/modules/presspermit-collaboration/classes/Permissions/Collab/UI/RoleUsageQuery.php b/modules/presspermit-collaboration/classes/Permissions/Collab/UI/RoleUsageQuery.php
index ecc4b6d4..30af69a7 100644
--- a/modules/presspermit-collaboration/classes/Permissions/Collab/UI/RoleUsageQuery.php
+++ b/modules/presspermit-collaboration/classes/Permissions/Collab/UI/RoleUsageQuery.php
@@ -20,18 +20,14 @@ class RoleUsageQuery
var $total_roles = 0;
/**
- * PHP5 constructor
*
* @param string|array $args The query variables
* @return WP_Group_Query
*/
function __construct($query = null)
{
- //if ( !empty( $query ) ) {
- global $blog_id;
-
$this->query_vars = wp_parse_args($query, [
- 'blog_id' => $blog_id,
+ 'blog_id' => get_current_blog_id(),
'include' => [],
'exclude' => [],
'search' => '',
@@ -44,7 +40,6 @@ function __construct($query = null)
$this->prepare_query();
$this->query();
- //}
}
function prepare_query()
diff --git a/modules/presspermit-collaboration/classes/Permissions/Collab/UI/SettingsTabEditing.php b/modules/presspermit-collaboration/classes/Permissions/Collab/UI/SettingsTabEditing.php
index 5d9f6090..46167352 100644
--- a/modules/presspermit-collaboration/classes/Permissions/Collab/UI/SettingsTabEditing.php
+++ b/modules/presspermit-collaboration/classes/Permissions/Collab/UI/SettingsTabEditing.php
@@ -497,6 +497,9 @@ function flt_cap_descriptions($pp_caps)
$pp_caps['pp_associate_any_page'] = __('Disregard association exceptions (for all hierarchical post types)', 'press-permit-core');
$pp_caps['pp_list_all_files'] = __('Do not alter the Media Library listing provided by WordPress', 'press-permit-core');
+ $pp_caps['list_posts'] = __('On the Posts screen, satisfy a missing edit_posts capability by listing uneditable drafts', 'press-permit-core');
+ $pp_caps['list_others_posts'] = __("On the Posts screen, satisfy a missing edit_others_posts capability by listing other user's uneditable posts", 'press-permit-core');
+ $pp_caps['list_private_pages'] = __('On the Pages screen, satisfy a missing edit_private_pages capability by listing uneditable private pages', 'press-permit-core');
$pp_caps['pp_force_quick_edit'] = __('Make Quick Edit and Bulk Edit available to non-Administrators even though some inappropriate selections may be possible', 'press-permit-core');
return $pp_caps;
diff --git a/modules/presspermit-import/classes/Permissions/Import/DB/DatabaseSetup.php b/modules/presspermit-import/classes/Permissions/Import/DB/DatabaseSetup.php
index 02e69270..de030fd2 100644
--- a/modules/presspermit-import/classes/Permissions/Import/DB/DatabaseSetup.php
+++ b/modules/presspermit-import/classes/Permissions/Import/DB/DatabaseSetup.php
@@ -6,7 +6,7 @@ class DatabaseSetup
function __construct($last_db_ver) {
require_once(PRESSPERMIT_IMPORT_ABSPATH . '/db-config.php');
- if (MULTISITE) {
+ if (is_multisite()) {
add_action('switch_blog', [$this, 'actMultisiteSupport']);
}
diff --git a/modules/presspermit-import/classes/Permissions/Import/DB/RoleScoper.php b/modules/presspermit-import/classes/Permissions/Import/DB/RoleScoper.php
index a14eac13..4939010f 100644
--- a/modules/presspermit-import/classes/Permissions/Import/DB/RoleScoper.php
+++ b/modules/presspermit-import/classes/Permissions/Import/DB/RoleScoper.php
@@ -27,7 +27,9 @@ public function __construct() // some PHP versions do not allow subclass constru
function doImport($import_type = 'rs')
{
- global $wpdb, $blog_id;
+ global $wpdb;
+
+ $blog_id = get_current_blog_id();
parent::doImport('rs');
@@ -41,7 +43,7 @@ function doImport($import_type = 'rs')
$this->tt_ids_by_taxonomy[$row->taxonomy][$row->term_id] = $row->term_taxonomy_id;
}
- if (MULTISITE && (1 === intval($blog_id))) {
+ if (is_multisite() && is_main_site()) {
$blog_ids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs ORDER BY blog_id");
$orig_blog_id = $blog_id;
$this->sites_examined = 0;
@@ -95,7 +97,9 @@ function doImport($import_type = 'rs')
private function import_rs_groups()
{
- global $wpdb, $blog_id;
+ global $wpdb;
+
+ $blog_id = get_current_blog_id();
// if groups were set to netwide, sites may not have their own RS groups/members tables
if (!$wpdb->get_results("SHOW TABLES LIKE '$wpdb->groups_rs'") || !$wpdb->get_results("SHOW TABLES LIKE '$wpdb->user2group_rs'"))
@@ -176,12 +180,14 @@ private function import_rs_groups()
private function import_rs_site_roles()
{
- global $wpdb, $blog_id;
+ global $wpdb;
+
+ $blog_id = get_current_blog_id();
/*--------- group config and mapping setup ---------*/
- $rs_groups_table = (MULTISITE && get_site_option('scoper_mu_sitewide_groups')) ? $wpdb->base_prefix . 'groups_rs' : $wpdb->groups_rs;
- $pp_groups_table = (MULTISITE && get_site_option('presspermit_netwide_groups')) ? $wpdb->base_prefix . 'pp_groups' : $wpdb->pp_groups;
- $group_agent_type = (MULTISITE && get_site_option('presspermit_netwide_groups')) ? 'pp_net_group' : 'pp_group';
+ $rs_groups_table = (is_multisite() && get_site_option('scoper_mu_sitewide_groups')) ? $wpdb->base_prefix . 'groups_rs' : $wpdb->groups_rs;
+ $pp_groups_table = (is_multisite() && get_site_option('presspermit_netwide_groups')) ? $wpdb->base_prefix . 'pp_groups' : $wpdb->pp_groups;
+ $group_agent_type = (is_multisite() && get_site_option('presspermit_netwide_groups')) ? 'pp_net_group' : 'pp_group';
$imported_pp_groups = $wpdb->get_results($wpdb->prepare("SELECT source_id, import_id FROM $wpdb->ppi_imported WHERE run_id > 0 AND source_tbl = %d AND import_tbl = %d", $this->getTableCode($rs_groups_table), $this->getTableCode($pp_groups_table)), OBJECT_K);
$role_metagroups_rs = $wpdb->get_results("SELECT ID, group_meta_id FROM $rs_groups_table WHERE group_meta_id LIKE 'wp_role_%' OR group_meta_id = 'wp_anon'", OBJECT_K);
@@ -284,7 +290,9 @@ private function import_rs_site_roles()
private function import_rs_restrictions()
{
- global $wpdb, $wp_roles, $blog_id;
+ global $wpdb, $wp_roles;
+
+ $blog_id = get_current_blog_id();
$post_types = get_post_types(['public' => true, 'show_ui' => true], 'object', 'or');
$log_eitem_ids = []; // conversion of role_scope_rs.requirement_id to pp_conditions.assignment_id
@@ -547,7 +555,9 @@ private function import_rs_restrictions()
private function import_rs_item_roles()
{
- global $wpdb, $wp_roles, $blog_id;
+ global $wpdb, $wp_roles;
+
+ $blog_id = get_current_blog_id();
$cap_caster = presspermit()->capCaster();
@@ -559,9 +569,9 @@ private function import_rs_item_roles()
$log_eitem_ids = [];
/*--------- group config and mapping setup ---------*/
- $rs_groups_table = (MULTISITE && get_site_option('scoper_mu_sitewide_groups')) ? $wpdb->base_prefix . 'groups_rs' : $wpdb->groups_rs;
- $pp_groups_table = (MULTISITE && get_site_option('presspermit_netwide_groups')) ? $wpdb->base_prefix . 'pp_groups' : $wpdb->pp_groups;
- $group_agent_type = (MULTISITE && get_site_option('presspermit_netwide_groups')) ? 'pp_net_group' : 'pp_group';
+ $rs_groups_table = (is_multisite() && get_site_option('scoper_mu_sitewide_groups')) ? $wpdb->base_prefix . 'groups_rs' : $wpdb->groups_rs;
+ $pp_groups_table = (is_multisite() && get_site_option('presspermit_netwide_groups')) ? $wpdb->base_prefix . 'pp_groups' : $wpdb->pp_groups;
+ $group_agent_type = (is_multisite() && get_site_option('presspermit_netwide_groups')) ? 'pp_net_group' : 'pp_group';
$imported_pp_groups = $wpdb->get_results($wpdb->prepare("SELECT source_id, import_id FROM $wpdb->ppi_imported WHERE run_id > 0 AND source_tbl = %d AND import_tbl = %d", $this->getTableCode($rs_groups_table), $this->getTableCode($pp_groups_table)), OBJECT_K);
$role_metagroups_rs = $wpdb->get_results("SELECT ID, group_meta_id FROM $rs_groups_table WHERE group_meta_id LIKE 'wp_role_%' OR group_meta_id = 'wp_anon'", OBJECT_K); // TODO: review role metagroup storage with netwide groups
$role_metagroups_pp = $wpdb->get_results("SELECT metagroup_id, ID FROM $wpdb->pp_groups WHERE metagroup_type = 'wp_role'", OBJECT_K);
@@ -886,7 +896,7 @@ private function import_rs_options()
}
- if (MULTISITE) {
+ if (is_multisite()) {
$rs_netwide = (int)get_site_option('scoper_mu_sitewide_groups');
$pp_netwide = (int)get_site_option('presspermit_netwide_groups');
@@ -897,7 +907,9 @@ private function import_rs_options()
private function import_option($opt_name, $opt_value, $source_opt_name, $imported_options)
{
- global $wpdb, $blog_id;
+ global $wpdb;
+
+ $blog_id = get_current_blog_id();
if ($row = $wpdb->get_row("SELECT option_id, option_value FROM $wpdb->options WHERE option_name = '$source_opt_name' LIMIT 1")) {
$source_id = $row->option_id;
@@ -1081,8 +1093,6 @@ private function get_exception_fields($rs_obj, $extra_data = [])
private function get_exception_id(&$stored_exceptions, $data, $restriction_id = 0)
{
- global $blog_id;
-
$exception_id = 0;
// safeguard against invalid exception specs
@@ -1110,7 +1120,7 @@ private function get_exception_id(&$stored_exceptions, $data, $restriction_id =
$stored_exceptions[] = (object)$data;
if ($restriction_id) {
- $log_data = ['run_id' => $this->run_id, 'source_tbl' => $this->getTableCode($wpdb->role_scope_rs), 'source_id' => $restriction_id, 'import_tbl' => $this->getTableCode($wpdb->ppc_exceptions), 'import_id' => $exception_id, 'site' => $blog_id];
+ $log_data = ['run_id' => $this->run_id, 'source_tbl' => $this->getTableCode($wpdb->role_scope_rs), 'source_id' => $restriction_id, 'import_tbl' => $this->getTableCode($wpdb->ppc_exceptions), 'import_id' => $exception_id, 'site' => get_current_blog_id()];
$wpdb->insert($wpdb->ppi_imported, $log_data);
}
}
diff --git a/modules/presspermit-import/classes/Permissions/Import/DB/SourceConfig.php b/modules/presspermit-import/classes/Permissions/Import/DB/SourceConfig.php
index a9f1fb44..32eeeaa2 100644
--- a/modules/presspermit-import/classes/Permissions/Import/DB/SourceConfig.php
+++ b/modules/presspermit-import/classes/Permissions/Import/DB/SourceConfig.php
@@ -78,10 +78,10 @@ function hasInstallation($install_code)
}
function hasUnimported($install_code) {
- global $wpdb, $blog_id;
+ global $wpdb;
if (!$this->hasInstallation($install_code)) {
- if (!MULTISITE || (1 != $blog_id)) {
+ if (!is_multisite() || !is_main_site()) {
return false;
}
}
@@ -89,16 +89,18 @@ function hasUnimported($install_code) {
switch ($install_code) {
case 'rs' :
if (!$this->hasTable($wpdb->role_scope_rs)) {
- if (!MULTISITE || (1 != $blog_id))
+ if (!is_multisite() || !is_main_site()) {
return false;
}
+ }
require_once(PRESSPERMIT_IMPORT_CLASSPATH . '/DB/RoleScoper.php');
$importer = RoleScoper::instance();
- if (MULTISITE) {
- if (1 == $blog_id)
+ if (is_multisite()) {
+ if (is_main_site()) {
return true;
+ }
$groups = []; // will deal with netwide groups in import function
} else {
@@ -127,10 +129,8 @@ function hasUnimported($install_code) {
if (!$wpdb->get_results("SHOW TABLES LIKE '$wpdb->pp_roles'"))
return false;
- if (MULTISITE) {
- global $blog_id;
- if (1 == $blog_id)
- return true;
+ if (is_multisite() && is_main_site()) {
+ return true;
}
require_once(PRESSPERMIT_IMPORT_CLASSPATH . '/DB/PressPermitBeta.php');
diff --git a/modules/presspermit-import/classes/Permissions/Import/Importer.php b/modules/presspermit-import/classes/Permissions/Import/Importer.php
index 58ba11f2..cdcb752b 100644
--- a/modules/presspermit-import/classes/Permissions/Import/Importer.php
+++ b/modules/presspermit-import/classes/Permissions/Import/Importer.php
@@ -147,13 +147,13 @@ private function getTable($code)
private function undoImport($run_id)
{
- global $wpdb, $blog_id;
+ global $wpdb;
- if (is_multisite() && (1 === intval($blog_id))) {
+ if (is_multisite() && is_main_site()) {
$blog_ids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs ORDER BY blog_id");
- $orig_blog_id = $blog_id;
+ $orig_blog_id = get_current_blog_id();
} else {
- $blog_ids = ['1'];
+ $blog_ids = [get_main_site_id()];
}
foreach ($blog_ids as $id) {
@@ -193,14 +193,21 @@ private function undoImport($run_id)
private function undoAllImports()
{
- global $wpdb, $blog_id;
+ global $wpdb;
- if (is_multisite())
- $site_clause = (1 === intval($blog_id)) ? "AND site > 0" : "AND site = '$blog_id'"; // if on main site, will undo import for all sites
- else
+ if (is_multisite()) {
+ $site_clause = (is_main_site()) ? "AND site > 0" : "AND site = %d"; // if on main site, will undo import for all sites
+ } else {
$site_clause = '';
+ }
+
+ $run_ids = $wpdb->get_col(
+ $wpdb->prepare(
+ "SELECT run_id FROM $wpdb->ppi_imported WHERE run_id > 0 $site_clause",
+ get_current_blog_id()
+ )
+ );
- $run_ids = $wpdb->get_col("SELECT run_id FROM $wpdb->ppi_imported WHERE run_id > 0 $site_clause");
foreach ($run_ids as $run_id) {
$this->undoImport($run_id);
}
diff --git a/modules/presspermit-import/classes/Permissions/Import/UI/SettingsTabImport.php b/modules/presspermit-import/classes/Permissions/Import/UI/SettingsTabImport.php
index 946dae1f..a04db6fe 100644
--- a/modules/presspermit-import/classes/Permissions/Import/UI/SettingsTabImport.php
+++ b/modules/presspermit-import/classes/Permissions/Import/UI/SettingsTabImport.php
@@ -263,14 +263,21 @@ function actOptionsUI()
0" : "AND site = '$blog_id'"; // if on main site, will undo import for all sites
- else
+ if (is_multisite()) {
+ $site_clause = (is_main_site()) ? "AND site > 0" : "AND site = %d"; // if on main site, will undo import for all sites
+ } else {
$site_clause = '';
+ }
- if ($wpdb->get_col("SELECT run_id FROM $wpdb->ppi_imported WHERE run_id > 0 $site_clause")) : ?>
+ if ($wpdb->get_col(
+ $wpdb->prepare(
+ "SELECT run_id FROM $wpdb->ppi_imported WHERE run_id > 0 $site_clause",
+ get_current_blog_id()
+ )
+ )
+ ) : ?>
diff --git a/press-permit-core.php b/press-permit-core.php
index 30914ce4..5a5ba899 100644
--- a/press-permit-core.php
+++ b/press-permit-core.php
@@ -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: 3.2.1
+ * Version: 3.2.2
* Text Domain: press-permit-core
* Domain Path: /languages/
* Min WP Version: 4.9.7
@@ -98,7 +98,7 @@ function presspermit_load() {
return;
}
- define('PRESSPERMIT_VERSION', '3.2.1');
+ define('PRESSPERMIT_VERSION', '3.2.2');
if (!$presspermit_loaded_by_pro) {
require_once(__DIR__ . '/includes/Core.php');
diff --git a/readme.txt b/readme.txt
index dc2766e4..41b842d9 100644
--- a/readme.txt
+++ b/readme.txt
@@ -5,7 +5,7 @@ Tags: restrict, access, permissions, cms, user, private, category, pages, privac
Requires at least: 4.9.7
Tested up to: 5.4
Requires PHP: 5.6.20
-Stable tag: 3.2.1
+Stable tag: 3.2.2
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
@@ -123,11 +123,22 @@ PublishPress Permissions creates and uses the following tables: pp_groups, pp_gr
== Upgrade Notice ==
-= 3.2.1 =
+= 3.2.2 =
Press Permit Core + PP extension users: download PublishPress Permissions Pro from publishpress.com instead of upgrading to this version.
== Changelog ==
+= 3.2.2 - 8 Jul 2020 =
+* Fixed : New post creation locked author out of further editing if editing permission restricted by term and necessary term was not selected (now auto-select allowed term if none selected)
+* Fixed : Multisite - Permissions menu was not displayed if plugin network-activated and main site ID is not 1
+* Fixed : Term-specific Permissions were not applied correctly in some configurations
+* Fixed : Restrictive term-specific Permissions were not correctly negated by permissive term-specific restrictions assigned to another role or group for the same user
+* Compat : Revisions - Revision Permissions assigned for specific categories did not enable editing of existing revisions
+* Compat : Divi - non-Administrators could not edit new page on front end
+* Compat : PublishPress Authors - invalid error message for minimum PressPermit Pro version (note: Permissions is still not fully compatible with PublishPress Authors)
+* Feature : Support capabilities list_posts, list_others_posts, list_pitch_pages, etc. for inclusion in Posts / Pages listing without ability to edit
+* Fixed : Permissions > Settings > Install displayed instructions for restoring a Press Permit Pro 2.6.x installation, even if none was installed (since 3.0)
+
= 3.2.1 - 1 Jun 2020 =
* Fixed : Supplemental roles were not effective on some sites
* Fixed : Menu management limitations were not applied
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 25075d8c..f7e42717 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -104,17 +104,17 @@
},
{
"name": "publishpress/wordpress-version-notices",
- "version": "dev-master",
- "version_normalized": "9999999-dev",
+ "version": "1.1.1",
+ "version_normalized": "1.1.1.0",
"source": {
"type": "git",
"url": "https://github.com/publishpress/WordPress-Version-Notices.git",
- "reference": "45e6cb0f302165f3df820ff01c4f267f0b22517d"
+ "reference": "ba2b8eba33577d8c9351a9437e09af0e8f601a2c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/publishpress/WordPress-Version-Notices/zipball/45e6cb0f302165f3df820ff01c4f267f0b22517d",
- "reference": "45e6cb0f302165f3df820ff01c4f267f0b22517d",
+ "url": "https://api.github.com/repos/publishpress/WordPress-Version-Notices/zipball/ba2b8eba33577d8c9351a9437e09af0e8f601a2c",
+ "reference": "ba2b8eba33577d8c9351a9437e09af0e8f601a2c",
"shasum": ""
},
"require": {
@@ -124,7 +124,7 @@
"require-dev": {
"lucatume/wp-browser": "^2.2"
},
- "time": "2020-04-08T13:59:53+00:00",
+ "time": "2020-04-08T13:59:35+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
|