diff --git a/capsman-enhanced.php b/capsman-enhanced.php index dd99d564..354083f8 100644 --- a/capsman-enhanced.php +++ b/capsman-enhanced.php @@ -3,7 +3,7 @@ * 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.0 + * Version: 2.10.1 * Author: PublishPress * Author URI: https://publishpress.com/ * Text Domain: capsman-enhanced @@ -69,7 +69,7 @@ add_action('plugins_loaded', function () { if (!defined('CAPSMAN_VERSION')) { - define('CAPSMAN_VERSION', '2.10.0'); + define('CAPSMAN_VERSION', '2.10.1'); define('CAPSMAN_ENH_VERSION', CAPSMAN_VERSION); define('PUBLISHPRESS_CAPS_VERSION', CAPSMAN_VERSION); } diff --git a/common/css/admin.css b/common/css/admin.css index 6577db10..f4da4df3 100644 --- a/common/css/admin.css +++ b/common/css/admin.css @@ -476,22 +476,10 @@ table#akmin tr td input[type=checkbox] { border-bottom: none; } -#pp-capability-menu-wrapper table td, -#pp-capability-menu-wrapper table th { - padding: 10px; - padding-bottom: 10px; - font-size: 13px; - line-height: 20px; -} - #pp-capability-menu-wrapper table td h4.ppc-menu-row-section { margin-bottom: 0; } -#pp-capability-menu-wrapper table td { - padding: 9px; -} - #pp-capability-menu-wrapper tbody tr:last-of-type td { border-bottom: none; } @@ -501,16 +489,8 @@ table#akmin tr td input[type=checkbox] { } -table#akmin .pp-capability-menus-select .restrict-column { - min-width: 90px; - text-align: center; - display: table-cell !important; - clear: none !important; -} - - -table#akmin .pp-capability-menus-select .restrict-column + .menu-column.ppc-menu-item:not(.frontend-features) { - width: 100%; +.pp-capability-menus-select .restrict-column { + width: 10px; } .pp-capability-menus .menu-item-link { @@ -546,7 +526,6 @@ table#akmin .pp-capability-menus-select .restrict-column + .menu-column.ppc-menu .pp-capability-menus .check-all-menu-link, .pp-capability-menus .check-all-menu-link:active { color: #555; - margin-left: -48px; } .pp-capability-menus .menu-item-link.restricted, @@ -612,21 +591,10 @@ margin-bottom: 10px !important; margin-bottom: 10px !important; } -body.capabilities_page_pp-capabilities-nav-menus .pp-capability-menus-select .restrict-column, -body.toplevel_page_pp-capabilities-nav-menus .pp-capability-menus-select .restrict-column { - width: 70px !important; -} - .pp-capability-menus-wrapper .features-section-header { padding-left: 10px !important; } - -body.capabilities_page_pp-capabilities-admin-features .pp-capability-menus-select .restrict-column, -body.toplevel_page_pp-capabilities-admin-features .pp-capability-menus-select .restrict-column { - width: 70px !important; -} - .pp-column-right.capabilities-sidebar .button.button-primary { color: #2271b1; border-color: #2271b1; @@ -845,11 +813,6 @@ div.ppc-editor-features-classic-toggle { /* ====================================================== Nav Menu Restriction */ -body.capabilities_page_pp-capabilities-nav-menus .pp-capability-menus-select .restrict-column, -body.toplevel_page_pp-capabilities-nav-menus .pp-capability-menus-select .restrict-column { - width: 70px !important; -} - .capabilities_page_pp-capabilities-nav-menus input.ppc-nav-menu-submit { margin-bottom: 10px !important; } @@ -1169,6 +1132,11 @@ tr.opened .ppc-nav-menu-expand svg { display: none !important; } +ul.pp-capabilities-description { + list-style: circle !important; + margin-left: 12px; +} + .frontend-features-form.simple-form .field-row th { width: 155px; padding-right: 0; @@ -1416,10 +1384,6 @@ tr.opened .ppc-nav-menu-expand svg { border-bottom: 1px solid #c3c4c7 !important; } -.pp-capability-menus-wrapper.frontend-features .content-title-column { - margin-left: -48px; -} - .custom-items-table { border-top: 1px solid #c3c4c7 !important; border-left: none !important; @@ -1438,10 +1402,6 @@ tr.opened .ppc-nav-menu-expand svg { padding-left: 25px; } -body.capabilities_page_pp-capabilities-frontend-features .pp-capability-menus-select .restrict-column { - width: 99px !important; -} - .hidden-element { display: none !important; } diff --git a/common/js/admin.dev.js b/common/js/admin.dev.js index 3d118919..e8ae4b2f 100644 --- a/common/js/admin.dev.js +++ b/common/js/admin.dev.js @@ -5,7 +5,7 @@ jQuery(document).ready( function($) { $('a.neg-type-caps').attr('title',cmeAdmin.typeCapsNegationCaption); //$('td.cap-unreg').attr('title',cmeAdmin.typeCapUnregistered); $('a.normal-cap').attr('title',cmeAdmin.switchableCaption); - $('span.cap-x:not([class*="pp-cap-key"])').attr('title',cmeAdmin.capNegated); + $('span.cap-x:not([class*="pp-cap-key"])').html(cmeAdmin.capNegated); $('table.cme-checklist input[class!="cme-check-all"]').not(':disabled').attr('title',cmeAdmin.chkCaption); if ($('.ppc-checkboxes-documentation-link').length > 0) { diff --git a/common/js/admin.js b/common/js/admin.js index 4f9702aa..4f65f6c9 100644 --- a/common/js/admin.js +++ b/common/js/admin.js @@ -1 +1 @@ -jQuery(document).ready(function(e){var{__:t,_x:a,_n:n,_nx:s}=wp.i18n;function i(a="success"){setTimeout(function(){var n="ppc-floating-msg-"+Math.round(new Date().getTime()+100*Math.random()),s="success"===a?t("Changes saved!","capsman-enhanced"):t(" Error: changes can't be saved.","capsman-enhanced"),i=e(".ppc-floating-status").length;e("#wpbody-content").after(''+s+""),e("."+n).css("bottom",45*i).fadeIn(1e3).delay(1e4).fadeOut(1e3,function(){e(this).remove()})},500)}function l(t,a){var n=e("#toplevel_page_pp-capabilities-dashboard"),s=e(n).find("li."+t+"-menu-item");s.length&&(1==a?s.removeClass("ppc-hide-menu-item").find("a").removeClass("ppc-hide-menu-item"):s.addClass("ppc-hide-menu-item").find("a").addClass("ppc-hide-menu-item"))}e("a.neg-cap").attr("title",cmeAdmin.negationCaption),e("a.neg-type-caps").attr("title",cmeAdmin.typeCapsNegationCaption),e("a.normal-cap").attr("title",cmeAdmin.switchableCaption),e('span.cap-x:not([class*="pp-cap-key"])').attr("title",cmeAdmin.capNegated),e('table.cme-checklist input[class!="cme-check-all"]').not(":disabled").attr("title",cmeAdmin.chkCaption),e(".ppc-checkboxes-documentation-link").length>0&&e(".ppc-checkboxes-documentation-link").attr("target","blank"),e("table.cme-checklist a.neg-cap").click(function(t){e(this).closest("td").removeClass("cap-yes").removeClass("cap-no").addClass("cap-neg");var a=e(this).parent().find('input[type="checkbox"]').attr("name");return e(this).after(''),e('input[name="'+a+'"]').closest("td").removeClass("cap-yes").removeClass("cap-no").addClass("cap-neg"),e(this).closest("tr").hasClass("unfiltered_upload")&&(e('input[name="caps[upload_files]"]').closest("td").addClass("cap-neg"),e('input[name="caps[upload_files]"]').closest("td").append(''),e('input[name="caps[upload_files]"]').parent().next("a.neg-cap:visible").click()),!1}),e(document).on("click","table.cme-typecaps span.cap-x,table.cme-checklist span.cap-x,table.cme-checklist td.cap-neg span",function(t){e(this).closest("td").removeClass("cap-neg").removeClass("cap-yes").addClass("cap-no"),e(this).parent().find('input[type="checkbox"]').prop("checked",!1),e(this).parent().find("input.cme-negation-input").remove();var a=e(this).next('input[type="checkbox"]').attr("name");return a||(a=e(this).next("label").find('input[type="checkbox"]').attr("name")),e('input[name="'+a+'"]').parent().closest("td").removeClass("cap-neg").removeClass("cap-yes").addClass("cap-no"),e('input[name="'+a+'"]').prop("checked",!1).parent().find("input.cme-negation-input").remove(),e(this).closest("td").hasClass("capability-checkbox-rotate")&&(e(this).closest("td").find('input[type="checkbox"]').prop("checked",!0),e(this).closest("td").hasClass("upload_files")&&(e("tr.unfiltered_upload").find("td").removeClass("cap-neg").removeClass("cap-yes").addClass("cap-no"),e("tr.unfiltered_upload").find('input[type="checkbox"]').prop("checked",!1),e("tr.unfiltered_upload").find("input.cme-negation-input").remove(),e('input[name="caps[unfiltered_upload]"]').parent().closest("td").removeClass("cap-neg").removeClass("cap-yes").addClass("cap-no"),e('input[name="caps[unfiltered_upload]"]').prop("checked",!0).parent().find("input.cme-negation-input").remove())),e(this).closest("td").find('input[type="checkbox"]').hasClass("pp-single-action-rotate")&&e(this).closest("td").find('input[type="checkbox"]').prop("checked",!0),e(this).closest("tr").hasClass("unfiltered_upload")&&(e('input[name="caps[upload_files]"]').parent().closest("td").removeClass("cap-neg").removeClass("cap-yes").addClass("cap-no"),e('input[name="caps[upload_files]"]').prop("checked",!0).parent().find("input.cme-negation-input").remove()),!1}),e("#publishpress_caps_form").bind("keypress",function(t){if(13==t.keyCode)return e(document.activeElement).parent().find('input[type="submit"]').first().click(),!1}),e("input.cme-check-all").click(function(t){e(this).closest("table").find('input[type="checkbox"][disabled!="disabled"]:visible').prop("checked",e(this).is(":checked"))}),e("a.cme-neg-all").click(function(t){return e(this).closest("table").find("a.neg-cap:visible").click(),!1}),e("a.cme-switch-all").click(function(t){return e(this).closest("table").find("td.cap-neg span").click(),!1}),e("table.cme-typecaps a.neg-type-caps").click(function(t){return e(this).closest("tr").find('td[class!="cap-neg"]').filter('td[class!="cap-unreg"]').each(function(){e(this).addClass("cap-neg");var t=e(this).find('input[type="checkbox"]').attr("name");e(this).append(''),e('input[name="'+t+'"]').parent().next("a.neg-cap:visible").click()}),!1}),e("table.cme-typecaps th").click(function(){var t=e(this).index(),a=!e(this).prop("checked_all");if(e(this).hasClass("term-cap"))var n='[class*="term-cap"]';else var n='[class*="post-cap"]';var s=e(this).closest("table").find("tr td"+n+":nth-child("+(t+1)+') input[type="checkbox"]:visible');e(s).each(function(t,n){e('input[name="'+e(this).attr("name")+'"]').prop("checked",a)}),e(this).prop("checked_all",a)}),e("a.cme-fix-read-cap").click(function(){return e('input[name="caps[read]"]').prop("checked",!0),e('input[name="SaveRole"]').trigger("click"),!1}),e(".ppc-filter-select").each(function(){var t=e(this),a=[];e(this).parent().siblings("table").find("tbody").find("tr").each(function(){a.push({value:e(this).attr("class"),text:e(this).find(".cap_type").text()})}),a.forEach(function(a,n){t.append(e("