Skip to content

Commit

Permalink
Merge pull request #12 from publishpress/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
agapetry authored Oct 24, 2019
2 parents 666fa98 + 5059d52 commit 357def7
Show file tree
Hide file tree
Showing 10 changed files with 493 additions and 219 deletions.
14 changes: 13 additions & 1 deletion admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,21 @@ td.cm-has-via-pp {
background-color: #7f7;
}

div.pressshack-admin-wrapper footer {
padding-right: 270px;
}

#akmin div.publishpress-headline {line-height:25px}
#akmin span.publishpress-thanks{margin-left:5px;color:#655997;white-space:nowrap}
#akmin span.publishpress-thanks,#akmin span.publishpress-thanks a,#akmin span.publishpress-thanks a:visited {color:#655997;font-weight:bold;}

table#akmin td.sidebar li.publishpress-contact{text-align:center}
table#akmin td.sidebar li.publishpress-contact a{padding:5px 0 5px 0;}
table#akmin td.sidebar li.publishpress-contact a{padding:5px 0 5px 0;}

#pp_features {display:none;border:1px solid #eee;padding:5px;text-align:center;min-width:600px}
#pp_features div.pp-logo { text-align: center }
#pp_features div.features-wrap { margin-left: auto; margin-right: auto; text-align: center; width: 600px; }
#pp_features ul.pp-features { list-style: none; padding-top:10px; text-align:left; margin-left: auto }
#pp_features ul.pp-features li:before { content: "\2713\0020"; }
#pp_features ul.pp-features li { padding-bottom: 5px }
#pp_features img.cme-play { margin-bottom: -3px; margin-left: 5px;}
5 changes: 5 additions & 0 deletions capsman-enhanced.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ function cme_submenus() {
global $pp_admin;
$menu_caption = ( defined('WPLANG') && WPLANG && ( 'en_EN' != WPLANG ) ) ? __('Capabilities', 'capsman-enhanced') : 'Role Capabilities';
add_submenu_page( $pp_admin->get_menu('options'), __('Capability Manager', 'capsman-enhanced'), $menu_caption, 'manage_capabilities', 'capsman', 'cme_fakefunc' );

} elseif(did_action('presspermit_admin_menu') && function_exists('presspermit')) {
$menu_caption = ( defined('WPLANG') && WPLANG && ( 'en_EN' != WPLANG ) ) ? __('Capabilities', 'capsman-enhanced') : 'Role Capabilities';
add_submenu_page( presspermit()->admin()->getMenuParams('options'), __('Capability Manager', 'capsman-enhanced'), $menu_caption, 'manage_capabilities', 'capsman', 'cme_fakefunc' );

} else {
add_users_page( __('Capability Manager', 'capsman-enhanced'), __('Capabilities', 'capsman-enhanced'), 'manage_capabilities', 'capsman', 'cme_fakefunc');
}
Expand Down
191 changes: 191 additions & 0 deletions common/css/pressshack-admin.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
/**
* @package PublishPress
* @author PublishPress
*
* Copyright (c) 2018 PublishPress
*
* ------------------------------------------------------------------------------
* Based on Edit Flow
* Author: Daniel Bachhuber, Scott Bressler, Mohammad Jangda, Automattic, and
* others
* Copyright (c) 2009-2016 Mohammad Jangda, Daniel Bachhuber, et al.
* ------------------------------------------------------------------------------
*
* This file is part of PublishPress
*
* PublishPress is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PublishPress is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PublishPress. If not, see <http://www.gnu.org/licenses/>.
*/

.pressshack-admin-wrapper a:link,
.pressshack-admin-wrapper a:visited,
.pressshack-admin-wrapper a:active,
.pressshack-admin-wrapper a:hover {
text-decoration: none;
}

.pressshack-admin-wrapper a,
.pressshack-admin-wrapper button,
.pressshack-admin-wrapper button::before {
-webkit-transition: all 200ms ease-in-out;
-moz-transition: all 200ms ease-in-out;
-o-transition: all 200ms ease-in-out;
transition: all 200ms ease-in-out;
}

.pressshack-admin-wrapper a,
.pressshack-admin-wrapper a div,
.pressshack-admin-wrapper a p {
color: #655997;
}

.pressshack-admin-wrapper a:hover,
.pressshack-admin-wrapper a:focus,
.pressshack-admin-wrapper a:active,
.pressshack-admin-wrapper a:hover div,
.pressshack-admin-wrapper a:focus div,
.pressshack-admin-wrapper a:active div,
.pressshack-admin-wrapper a:hover p,
.pressshack-admin-wrapper a:focus p,
.pressshack-admin-wrapper a:active p,
.pressshack-admin-wrapper a:hover .dashicons:before,
.pressshack-admin-wrapper a:focus .dashicons:before,
.pressshack-admin-wrapper a:active .dashicons:before {
color: #5A4F87;
box-shadow: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
-o-box-shadow: none;
}

.pressshack-admin-wrapper > header h1 a,
.pressshack-admin-wrapper > header h1 a:hover,
.pressshack-admin-wrapper > header h1 a:focus,
.pressshack-admin-wrapper > header h1 a:active {
color: #23282d;
}

.pressshack-admin-wrapper .nav-tab-wrapper .nav-tab {
color: inherit;
}

.pressshack-admin-wrapper .nav-tab-wrapper .nav-tab-active,
.pressshack-admin-wrapper .nav-tab-wrapper .nav-tab:hover,
.pressshack-admin-wrapper .nav-tab-wrapper .nav-tab:active,
.pressshack-admin-wrapper .nav-tab-wrapper .nav-tab:focus {
border-top-color: #655997;
color: #655997;
}

.pressshack-admin-wrapper > footer {
text-align: center;
}

.pressshack-admin-wrapper > footer > div.pp-rating {
font-size: 12px;
margin-bottom: 10px;
margin-top: 30px;
}

.pressshack-admin-wrapper > footer * {
color: #777;
}

.pressshack-admin-wrapper > footer > nav ul {
list-style: none;
}

.pressshack-admin-wrapper > footer > nav ul > li {
display: inline-block;
}

.pressshack-admin-wrapper > footer > nav ul > li:not(:first-child) {
margin-left: 15px;
}

.pressshack-admin-wrapper > footer > nav ul > li > a {
font-weight: bold;
}

.pressshack-admin-wrapper > footer .dashicons.dashicons-star-filled {
line-height: 18px;
font-size: 12px;
width: 12px;
height: 12px;
color: #FFB300;
-webkit-transition: color 200ms ease-in-out;
-moz-transition: color 200ms ease-in-out;
-o-transition: color 200ms ease-in-out;
transition: color 200ms ease-in-out;
}

.pressshack-admin-wrapper button:not(.notice-dismiss),
.pressshack-admin-wrapper .button:not(.notice-dismiss) {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
text-shadow: initial;
-webkit-box-shadow: initial;
-moz-box-shadow: initial;
box-shadow: initial;
vertical-align: middle;
line-height: 0;
min-height: 28px;
text-decoration: none;
padding: 15px 10px;
border-width: 2px;
border-style: solid;
}

.pressshack-admin-wrapper .button-primary {
background-color: #FFB300;
border-color: #C58C07;
color: #754D26;

text-shadow: none;
}

.pressshack-admin-wrapper .button-primary:hover,
.pressshack-admin-wrapper .button-primary:active,
.pressshack-admin-wrapper .button-primary:focus {
background-color: #F3AC04;
border-color: #C58C07;
color: #333;
outline: none;
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05);
-moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05);
-webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05);
-o-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05);
}

.pressshack-admin-wrapper .button:not(.notice-dismiss):hover,
.pressshack-admin-wrapper .button:not(.notice-dismiss):active,
.pressshack-admin-wrapper .button:not(.notice-dismiss):focus {
outline: none;
-webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05);
-moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05);
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05);
}

.pressshack-admin-wrapper .pp-pressshack-logo img {
width: 170px;
}

/**
* Fremius tweaks
*/

#piframe,
.fs-secure-notice {
display: none;
}
Binary file added common/img/publishpress-logo-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/img/publishpress-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 64 additions & 16 deletions includes/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
$pp_metagroup_caps = array();
}
?>
<div class="wrap">
<div class="wrap pressshack-admin-wrapper">
<?php if( defined('PRESSPERMIT_ACTIVE') ) :
pp_icon();
$style = 'style="height:60px;"';
Expand Down Expand Up @@ -110,47 +110,47 @@
<br /><div id="pp_features"><div class="pp-logo"><a href="http://presspermit.com"><img src="<?php echo $img_url;?>pp-logo.png" alt="<?php _e('Press Permit Pro', 'capsman-enhanced');?>" /></a></div><div class="features-wrap"><ul class="pp-features">
<li>
<?php _e( "Automatically define type-specific capabilities for your custom post types and taxonomies", 'capsman-enhanced' );?>
<a href="http://presspermit.com/tutorial/regulate-post-type-access" target="_blank"><img class="cme-play" alt="*" src="<?php echo $img_url;?>play.png" /></a></li>
<a href="https://presspermit.com/tutorial/regulate-post-type-access" target="_blank"><img class="cme-play" alt="*" src="<?php echo $img_url;?>play.png" /></a></li>

<li>
<?php _e( "Assign standard WP roles supplementally for a specific post type", 'capsman-enhanced' );?>
<a href="http://presspermit.com/tutorial/regulate-post-type-access" target="_blank"><img class="cme-play" alt="*" src="<?php echo $img_url;?>play.png" /></a></li>
<a href="https://presspermit.com/tutorial/regulate-post-type-access" target="_blank"><img class="cme-play" alt="*" src="<?php echo $img_url;?>play.png" /></a></li>

<li>
<?php _e( "Assign custom WP roles supplementally for a specific post type <em>(Pro)</em>", 'capsman-enhanced' );?>
<a href="http://presspermit.com/tutorial/custom-role-usage" target="_blank"><img class="cme-play" alt="*" src="<?php echo $img_url;?>play.png" /></a></li>
<a href="https://presspermit.com/tutorial/custom-role-usage" target="_blank"><img class="cme-play" alt="*" src="<?php echo $img_url;?>play.png" /></a></li>

<li>
<?php _e( "Customize reading permissions per-category or per-post", 'capsman-enhanced' );?>
<a href="http://presspermit.com/tutorial/category-exceptions" target="_blank"><img class="cme-play" alt="*" src="<?php echo $img_url;?>play.png" /></a></li>
<a href="https://presspermit.com/tutorial/category-exceptions" target="_blank"><img class="cme-play" alt="*" src="<?php echo $img_url;?>play.png" /></a></li>

<li>
<?php _e( "Customize editing permissions per-category or per-post <em>(Pro)</em>", 'capsman-enhanced' );?>
<a href="http://presspermit.com/tutorial/page-editing-exceptions" target="_blank"><img class="cme-play" alt="*" src="<?php echo $img_url;?>play.png" /></a></li>
<a href="https://presspermit.com/tutorial/page-editing-exceptions" target="_blank"><img class="cme-play" alt="*" src="<?php echo $img_url;?>play.png" /></a></li>

<li>
<?php _e( "Custom Post Visibility statuses, fully implemented throughout wp-admin <em>(Pro)</em>", 'capsman-enhanced' );?>
<a href="http://presspermit.com/tutorial/custom-post-visibility" target="_blank"><img class="cme-play" alt="*" src="<?php echo $img_url;?>play.png" /></a></li>
<a href="https://presspermit.com/tutorial/custom-post-visibility" target="_blank"><img class="cme-play" alt="*" src="<?php echo $img_url;?>play.png" /></a></li>

<li>
<?php _e( "Custom Moderation statuses for access-controlled, multi-step publishing workflow <em>(Pro)</em>", 'capsman-enhanced' );?>
<a href="http://presspermit.com/tutorial/multi-step-moderation" target="_blank"><img class="cme-play" alt="*" src="<?php echo $img_url;?>play.png" /></a></li>
<a href="https://presspermit.com/tutorial/multi-step-moderation" target="_blank"><img class="cme-play" alt="*" src="<?php echo $img_url;?>play.png" /></a></li>

<li>
<?php _e( "Regulate permissions for Edit Flow post statuses <em>(Pro)</em>", 'capsman-enhanced' );?>
<a href="http://presspermit.com/tutorial/edit-flow-integration" target="_blank"><img class="cme-play" alt="*" src="<?php echo $img_url;?>play.png" /></a></li>
<a href="https://presspermit.com/tutorial/edit-flow-integration" target="_blank"><img class="cme-play" alt="*" src="<?php echo $img_url;?>play.png" /></a></li>

<li>
<?php _e( "Customize the moderated editing of published content with Revisionary or Post Forking <em>(Pro)</em>", 'capsman-enhanced' );?>
<a href="http://presspermit.com/tutorial/published-content-revision" target="_blank"><img class="cme-play" alt="*" src="<?php echo $img_url;?>play.png" /></a></li>
<a href="https://presspermit.com/tutorial/published-content-revision" target="_blank"><img class="cme-play" alt="*" src="<?php echo $img_url;?>play.png" /></a></li>

<li>
<?php _e( "Grant Spectator, Participant or Moderator access to specific bbPress forums <em>(Pro)</em>", 'capsman-enhanced' );?>
<a href="http://presspermit.com/tutorial/bbpress-exceptions" target="_blank"><img class="cme-play" alt="*" src="<?php echo $img_url;?>play.png" /></a></li>
<a href="https://presspermit.com/tutorial/bbpress-exceptions" target="_blank"><img class="cme-play" alt="*" src="<?php echo $img_url;?>play.png" /></a></li>

<li>
<?php _e( "Grant supplemental content permissions to a BuddyPress group <em>(Pro)</em>", 'capsman-enhanced' );?>
<a href="http://presspermit.com/tutorial/buddypress-content-permissions" target="_blank"><img class="cme-play" alt="*" src="<?php echo $img_url;?>play.png" /></a></li>
<a href="https://presspermit.com/tutorial/buddypress-content-permissions" target="_blank"><img class="cme-play" alt="*" src="<?php echo $img_url;?>play.png" /></a></li>

<li>
<?php _e( "WPML integration to mirror permissions to translations <em>(Pro)</em>", 'capsman-enhanced' );?>
Expand Down Expand Up @@ -771,18 +771,22 @@
<dt><?php _e('Related Permissions Plugins', 'capsman-enhanced'); ?></dt>
<dd>
<ul>
<li><a href="https://publishpress.com/ma/" target="_blank"><?php _e('Multiple Authors', 'capsman-enhanced');?></a></li>
</li>

<li><a href="#pp-more"><?php _e('PressPermit', 'capsman-enhanced');?></a>
</li>

<?php $_url = "plugin-install.php?tab=plugin-information&plugin=publishpress&TB_iframe=true&width=640&height=678";
$url = ( is_multisite() ) ? network_admin_url($_url) : admin_url($_url);
?>
<li><a class="thickbox" href="<?php echo $url;?>"><?php _e('PublishPress', 'capsman-enhanced');?></a></li>

<li><a href="#pp-more"><?php _e('Press Permit', 'capsman-enhanced');?></a>
</li>

<?php $_url = "plugin-install.php?tab=plugin-information&plugin=revisionary&TB_iframe=true&width=640&height=678";
$url = ( is_multisite() ) ? network_admin_url($_url) : admin_url($_url);
?>
<li><a class="thickbox" href="<?php echo $url;?>"><?php _e('Revisionary', 'capsman-enhanced');?></a></li>
<li><a class="thickbox" href="<?php echo $url;?>"><?php _e('PublishPress Revisions', 'capsman-enhanced');?></a></li>

<li class="publishpress-contact"><a href="https://publishpress.com/contact" target="_blank"><?php _e('Help / Contact Form', 'capsman-enhanced');?></a></li>
</ul>
</dd>
Expand All @@ -797,6 +801,8 @@
</table>
</fieldset>
</form>

<?php cme_publishpressFooter(); ?>
</div>

<?php
Expand Down Expand Up @@ -827,3 +833,45 @@ function cme_plugin_info_url( $plugin_slug ) {
$_url = "plugin-install.php?tab=plugin-information&plugin=$plugin_slug&TB_iframe=true&width=640&height=678";
return ( is_multisite() ) ? network_admin_url($_url) : admin_url($_url);
}

function cme_publishpressFooter() {
?>
<footer>

<div class="pp-rating">
<a href="https://wordpress.org/support/plugin/capability-manager-enhanced/reviews/#new-post" target="_blank" rel="noopener noreferrer">
<?php printf(
__('If you like %s, please leave us a %s rating. Thank you!', 'capsman-enhanced'),
'<strong>Capability Manager Enhanced</strong>',
'<span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span>'
);
?>
</a>
</div>

<hr>
<nav>
<ul>
<li><a href="https://publishpress.com/capability-manager/" target="_blank" rel="noopener noreferrer" title="<?php _e('About Capability Manager Enhanced', 'capsman-enhanced');?>"><?php _e('About', 'capsman-enhanced');?>
</a></li>
<li><a href="https://publishpress.com/knowledge-base/how-to-use-capability-manager/" target="_blank" rel="noopener noreferrer" title="<?php _e('Capability Manager Enhanced Documentation', 'capsman-enhanced');?>"><?php _e('Documentation', 'capsman-enhanced');?>
</a></li>
<li><a href="https://publishpress.com/contact" target="_blank" rel="noopener noreferrer" title="<?php _e('Contact the PublishPress team', 'capsman-enhanced');?>"><?php _e('Contact', 'capsman-enhanced');?>
</a></li>
<li><a href="https://twitter.com/publishpresscom" target="_blank" rel="noopener noreferrer"><span class="dashicons dashicons-twitter"></span>
</a></li>
<li><a href="https://facebook.com/publishpress" target="_blank" rel="noopener noreferrer"><span class="dashicons dashicons-facebook"></span>
</a></li>
</ul>
</nav>

<div class="pp-pressshack-logo">
<a href="https://publishpress.com" target="_blank" rel="noopener noreferrer">

<img src="<?php echo plugins_url('', CME_FILE) . '/common/img/publishpress-logo.png';?>" />
</a>
</div>

</footer>
<?php
}
Loading

0 comments on commit 357def7

Please sign in to comment.