Skip to content

Commit

Permalink
Merge pull request #1062 from publishpress/release-v2.11.1
Browse files Browse the repository at this point in the history
Release v2.11.1
  • Loading branch information
olatechpro authored Jan 4, 2024
2 parents a5d073b + 60ecf91 commit 2719b8c
Show file tree
Hide file tree
Showing 71 changed files with 5,343 additions and 2,919 deletions.
10 changes: 5 additions & 5 deletions capsman-enhanced.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* Plugin Name: PublishPress Capabilities
* Plugin URI: https://publishpress.com/capability-manager/
* Description: Manage WordPress role definitions, per-site or network-wide. Organizes post capabilities by post type and operation.
* Version: 2.10.3
* Version: 2.11.1
* Author: PublishPress
* Author URI: https://publishpress.com/
* Text Domain: capsman-enhanced
* Text Domain: capability-manager-enhanced
* Domain Path: /languages/
* Requires at least: 5.5
* Requires PHP: 7.2.5
Expand Down Expand Up @@ -69,15 +69,15 @@
add_action('plugins_loaded', function () {

if (!defined('CAPSMAN_VERSION')) {
define('CAPSMAN_VERSION', '2.10.3');
define('CAPSMAN_VERSION', '2.11.1');
define('CAPSMAN_ENH_VERSION', CAPSMAN_VERSION);
define('PUBLISHPRESS_CAPS_VERSION', CAPSMAN_VERSION);
}

foreach (get_option('active_plugins') as $plugin_file) {
if (false !== strpos($plugin_file, 'capsman.php')) {
add_action('admin_notices', function () {
echo '<div id="message" class="error fade" style="color: black">' . sprintf(esc_html__('%1s Error: %2s PublishPress Capabilities cannot function because another copy of the plugin is active.', 'capsman-enhanced'), '<strong>', '</strong>') . '</div>';
echo '<div id="message" class="error fade" style="color: black">' . sprintf(esc_html__('%1s Error: %2s PublishPress Capabilities cannot function because another copy of the plugin is active.', 'capability-manager-enhanced'), '<strong>', '</strong>') . '</div>';
});
return;
}
Expand Down Expand Up @@ -106,7 +106,7 @@
'plugin_row_meta',
function ($links, $file) {
if ($file == plugin_basename(__FILE__)) {
$links[] = '<strong>' . esc_html__('This plugin can be deleted.', 'capsman-enhanced') . '</strong>';
$links[] = '<strong>' . esc_html__('This plugin can be deleted.', 'capability-manager-enhanced') . '</strong>';
}

return $links;
Expand Down
2 changes: 1 addition & 1 deletion common/js/admin.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ jQuery(document).ready( function($) {
function ppcTimerStatus(type = "success") {
setTimeout(function () {
var uniqueClass = "ppc-floating-msg-" + Math.round(new Date().getTime() + Math.random() * 100);
var message = type === "success" ? __("Changes saved!", "capsman-enhanced") : __(" Error: changes can't be saved.", "capsman-enhanced");
var message = type === "success" ? __("Changes saved!", "capability-manager-enhanced") : __(" Error: changes can't be saved.", "capability-manager-enhanced");
var instances = $(".ppc-floating-status").length;
$("#wpbody-content").after('<span class="ppc-floating-status ppc-floating-status--' + type + " " + uniqueClass + '">' + message + "</span>");
$("." + uniqueClass)
Expand Down
2 changes: 1 addition & 1 deletion common/js/admin.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion framework/lib/formating.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function ak_admin_notify( $message = '' )
{
if (is_admin() && !did_action('pp_capabilities_error')) {
if ( empty($message) ) {
$message = esc_html__('Settings saved.', 'capsman-enhanced');
$message = esc_html__('Settings saved.', 'capability-manager-enhanced');
}
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo '<div id="message" class="updated fade"><p><strong>' . $message . '</strong></p></div>';
Expand Down
6 changes: 3 additions & 3 deletions includes-core/CoreAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function actCapabilitiesSubmenus($sub_menu_pages, $cme_fakefunc) {
$profile_features_offset = array_search('profile-features', array_keys($sub_menu_pages));
$profile_features_menu = [];
$profile_features_menu['admin-menus'] = [
'title' => __('Admin Menus', 'capsman-enhanced'),
'title' => __('Admin Menus', 'capability-manager-enhanced'),
'capabilities' => (is_multisite() && is_super_admin()) ? 'read' : 'manage_capabilities_admin_menus',
'page' => 'pp-capabilities-admin-menus',
'callback' => [$this, 'AdminMenusPromo'],
Expand Down Expand Up @@ -114,12 +114,12 @@ function frontendFeaturesPagesPromo(){
?>
<div class="pp-promo-overlay-row div-pp-promo-blur">
<select class="chosen-cpt-select frontendelements-form-pages"
data-placeholder="<?php esc_attr_e('Select pages...', 'capsman-enhanced'); ?>" multiple>
data-placeholder="<?php esc_attr_e('Select pages...', 'capability-manager-enhanced'); ?>" multiple>
<option value=""></option>
</select>
<br />
<small>
<?php esc_html_e('You can select page types where this element will be added.', 'capsman-enhanced'); ?>
<?php esc_html_e('You can select page types where this element will be added.', 'capability-manager-enhanced'); ?>
</small>
<input type="text" style="visibility: hidden;" /> <!-- using this to balance the space needed due to field size -->
</div>
Expand Down
4 changes: 2 additions & 2 deletions includes-core/admin-features-promo.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ class="ppc-custom-features-css-delete red-pointer"
<div class="pp-promo-upgrade-notice">
<p>
<?php esc_html_e('You can block pages by URL or hide Admin elements by entering a CSS class or ID. This feature is available in PublishPress Capabilities Pro.',
'capsman-enhanced'); ?>
'capability-manager-enhanced'); ?>
</p>
<p>
<a href="https://publishpress.com/links/capabilities-banner" target="_blank">
<?php esc_html_e('Upgrade to Pro', 'capsman-enhanced'); ?>
<?php esc_html_e('Upgrade to Pro', 'capability-manager-enhanced'); ?>
</a>
</p>
</div>
Expand Down
8 changes: 4 additions & 4 deletions includes-core/admin-menus-promo.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<div class="wrap publishpress-caps-manage pressshack-admin-wrapper pp-capability-menus-wrapper-promo">
<div id="icon-capsman-admin" class="icon32"></div>
<h2><?php esc_html_e('Admin Menu Restrictions', 'capsman-enhanced'); ?></h2>
<h2><?php esc_html_e('Admin Menu Restrictions', 'capability-manager-enhanced'); ?></h2>

<form method="post" id="ppc-admin-menu-form" action="admin.php?page=pp-capabilities-admin-menus">
<fieldset>
Expand All @@ -45,7 +45,7 @@
?>
</select> &nbsp;
<input type="submit" name="admin-menu-submit"
value="<?php esc_attr_e('Save Changes', 'capsman-enhanced') ?>"
value="<?php esc_attr_e('Save Changes', 'capability-manager-enhanced') ?>"
class="button-primary ppc-admin-menu-submit" style="float:right" />
</div>
<div id="pp-capability-menu-wrapper" class="postbox" style="box-shadow: none;">
Expand All @@ -55,11 +55,11 @@ class="button-primary ppc-admin-menu-submit" style="float:right" />
<img src="<?php echo esc_url_raw(plugin_dir_url(CME_FILE) . 'includes-core/pp-capabilities-admin-menus-mobile.jpg');?>" class="pp-capability-mobile" />
<div class="pp-capability-menus-promo-content">
<p>
<?php esc_html_e('You can restrict access to admin menu screens. This feature is available in PublishPress Capabilities Pro', 'capsman-enhanced'); ?>
<?php esc_html_e('You can restrict access to admin menu screens. This feature is available in PublishPress Capabilities Pro', 'capability-manager-enhanced'); ?>
</p>
<p>
<a href="https://publishpress.com/links/capabilities-banner" target="_blank">
<?php esc_html_e('Upgrade to Pro', 'capsman-enhanced'); ?>
<?php esc_html_e('Upgrade to Pro', 'capability-manager-enhanced'); ?>
</a>
</p>
</div>
Expand Down
26 changes: 13 additions & 13 deletions includes-core/editor-features-promo.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
<tr class="ppc-menu-row parent-menu pp-promo-overlay-row pp-promo-blur">

<td colspan="2">
<h4 class="ppc-menu-row-section"><?php esc_html_e('Metaboxes', 'capsman-enhanced'); ?></h4>
<h4 class="ppc-menu-row-section"><?php esc_html_e('Metaboxes', 'capability-manager-enhanced'); ?></h4>
</td>
</tr>
<tr class="ppc-menu-row parent-menu pp-promo-overlay-row pp-promo-blur">

<td class="menu-column ppc-menu-item">

<span class="gutenberg menu-item-link">
<strong><i class="dashicons dashicons-arrow-right"></i> <?php esc_html_e('Checklist', 'capsman-enhanced'); ?> </strong></span>
<strong><i class="dashicons dashicons-arrow-right"></i> <?php esc_html_e('Checklist', 'capability-manager-enhanced'); ?> </strong></span>
</td>

<td class="restrict-column ppc-menu-checkbox">
Expand All @@ -39,7 +39,7 @@
<tr class="ppc-menu-row parent-menu pp-promo-overlay-row pp-promo-blur">
<td class="menu-column ppc-menu-item">
<span class="gutenberg menu-item-link restricted">
<strong><i class="dashicons dashicons-arrow-right"></i> <?php esc_html_e('Editorial Comments', 'capsman-enhanced'); ?></strong></span>
<strong><i class="dashicons dashicons-arrow-right"></i> <?php esc_html_e('Editorial Comments', 'capability-manager-enhanced'); ?></strong></span>
</td>

<td class="restrict-column ppc-menu-checkbox">
Expand All @@ -49,7 +49,7 @@
<tr class="ppc-menu-row parent-menu pp-promo-overlay-row pp-promo-blur">
<td class="menu-column ppc-menu-item">
<span class="gutenberg menu-item-link">
<strong><i class="dashicons dashicons-arrow-right"></i> <?php esc_html_e('Notifications', 'capsman-enhanced'); ?></strong></span>
<strong><i class="dashicons dashicons-arrow-right"></i> <?php esc_html_e('Notifications', 'capability-manager-enhanced'); ?></strong></span>
</td>

<td class="restrict-column ppc-menu-checkbox">
Expand All @@ -59,7 +59,7 @@
<tr class="ppc-menu-row parent-menu pp-promo-overlay-row pp-promo-blur">
<td class="menu-column ppc-menu-item">
<span class="gutenberg menu-item-link">
<strong><i class="dashicons dashicons-arrow-right"></i> <?php esc_html_e('TaxoPress - Settings', 'capsman-enhanced'); ?></strong></span>
<strong><i class="dashicons dashicons-arrow-right"></i> <?php esc_html_e('TaxoPress - Settings', 'capability-manager-enhanced'); ?></strong></span>
</td>

<td class="restrict-column ppc-menu-checkbox">
Expand All @@ -72,11 +72,11 @@
<div class="pp-promo-upgrade-notice">
<p>
<?php esc_html_e('You can hide plugin metaboxes. You can also hide specific items by entering their CSS class or ID. This feature is available in PublishPress Capabilities Pro.',
'capsman-enhanced'); ?>
'capability-manager-enhanced'); ?>
</p>
<p>
<a href="https://publishpress.com/links/capabilities-banner" target="_blank">
<?php esc_html_e('Upgrade to Pro', 'capsman-enhanced'); ?>
<?php esc_html_e('Upgrade to Pro', 'capability-manager-enhanced'); ?>
</a>
</p>
</div>
Expand All @@ -86,14 +86,14 @@
<tr class="ppc-menu-row parent-menu pp-promo-overlay-row pp-promo-blur">

<td colspan="2">
<h4 class="ppc-menu-row-section"><?php esc_html_e('Custom Items', 'capsman-enhanced'); ?></h4>
<h4 class="ppc-menu-row-section"><?php esc_html_e('Custom Items', 'capability-manager-enhanced'); ?></h4>
</td>
</tr>
<tr class="ppc-menu-row parent-menu pp-promo-overlay-row pp-promo-blur">
<td class="menu-column ppc-menu-item">
<span class="gutenberg menu-item-link">
<strong><i class="dashicons dashicons-arrow-right"></i> <?php esc_html_e('Custom item one', 'capsman-enhanced'); ?> <small>(.custom-plugin-item, #custom-plugin-item)</small> &nbsp; <span
class="ppc-custom-features-delete"><small>(<?php esc_html_e('Delete', 'capsman-enhanced'); ?>)</small></span></strong></span>
<strong><i class="dashicons dashicons-arrow-right"></i> <?php esc_html_e('Custom item one', 'capability-manager-enhanced'); ?> <small>(.custom-plugin-item, #custom-plugin-item)</small> &nbsp; <span
class="ppc-custom-features-delete"><small>(<?php esc_html_e('Delete', 'capability-manager-enhanced'); ?>)</small></span></strong></span>
</td>

<td class="restrict-column ppc-menu-checkbox">
Expand All @@ -103,8 +103,8 @@ class="ppc-custom-features-delete"><small>(<?php esc_html_e('Delete', 'capsman-e
<tr class="ppc-menu-row parent-menu pp-promo-overlay-row pp-promo-blur">
<td class="menu-column ppc-menu-item">
<span class="gutenberg menu-item-link restricted">
<strong><i class="dashicons dashicons-arrow-right"></i> <?php esc_html_e('Permalink: Descriptive Caption', 'capsman-enhanced'); ?> <small>(.editor-post-link p)</small> &nbsp; <span
class="ppc-custom-features-delete"><small>(<?php esc_html_e('Delete', 'capsman-enhanced'); ?>)</small></span> </strong></span>
<strong><i class="dashicons dashicons-arrow-right"></i> <?php esc_html_e('Permalink: Descriptive Caption', 'capability-manager-enhanced'); ?> <small>(.editor-post-link p)</small> &nbsp; <span
class="ppc-custom-features-delete"><small>(<?php esc_html_e('Delete', 'capability-manager-enhanced'); ?>)</small></span> </strong></span>
</td>

<td class="restrict-column ppc-menu-checkbox">
Expand All @@ -114,7 +114,7 @@ class="ppc-custom-features-delete"><small>(<?php esc_html_e('Delete', 'capsman-e
<tr class="ppc-menu-row parent-menu pp-promo-overlay-row pp-promo-blur">
<td class="menu-column ppc-menu-item">
<span class="gutenberg menu-item-link">
<strong><i class="dashicons dashicons-arrow-right"></i> <?php esc_html_e('Page Attributes: Order', 'capsman-enhanced'); ?> <small>(.editor-page-attributes__order)</small> &nbsp; <span class="ppc-custom-features-delete"><small>(<?php esc_html_e('Delete', 'capsman-enhanced'); ?>)</small></span> </strong></span>
<strong><i class="dashicons dashicons-arrow-right"></i> <?php esc_html_e('Page Attributes: Order', 'capability-manager-enhanced'); ?> <small>(.editor-page-attributes__order)</small> &nbsp; <span class="ppc-custom-features-delete"><small>(<?php esc_html_e('Delete', 'capability-manager-enhanced'); ?>)</small></span> </strong></span>
</td>

<td class="restrict-column ppc-menu-checkbox">
Expand Down
8 changes: 4 additions & 4 deletions includes-core/frontend-features-promo.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,24 @@
<p>
<?php esc_html_e(
'You can use Frontend Features to target specific posts and pages. This feature is available in PublishPress Capabilities Pro.',
'capsman-enhanced'
'capability-manager-enhanced'
); ?>
</p>
<p>
<a href="https://publishpress.com/links/capabilities-banner" target="_blank">
<?php esc_html_e('Upgrade to Pro', 'capsman-enhanced'); ?>
<?php esc_html_e('Upgrade to Pro', 'capability-manager-enhanced'); ?>
</a>
</p>
</div>

</div>
<div class="pp-promo-overlay-row div-pp-promo-blur">
<select class="chosen-cpt-select frontendelements-form-post-types" data-placeholder="<?php esc_attr_e('Select post types...', 'capsman-enhanced'); ?>" multiple>
<select class="chosen-cpt-select frontendelements-form-post-types" data-placeholder="<?php esc_attr_e('Select post types...', 'capability-manager-enhanced'); ?>" multiple>
<option value=""></option>
</select>
<br />
<small>
<?php esc_html_e('This will add a metabox on the post editing screen. You can use this feature to add body classes only for that post.', 'capsman-enhanced'); ?>
<?php esc_html_e('This will add a metabox on the post editing screen. You can use this feature to add body classes only for that post.', 'capability-manager-enhanced'); ?>
</small>
<!-- using this to balance the space needed due to field size -->
<input type="text" style="visibility: hidden; width: 0; display: block;" />
Expand Down
Loading

0 comments on commit 2719b8c

Please sign in to comment.