Version Description
If upgrading from a version prior to 2.0.0, please note that the plugin now requires PHP 5.3.0 or later.
Download this release
Release Info
Developer | greenshady |
Plugin | Members |
Version | 2.2.0 |
Comparing to | |
See all releases |
Code changes from version 2.1.0 to 2.2.0
- admin/class-meta-box-publish-role.php +13 -2
- admin/class-role-list-table.php +15 -1
- admin/class-settings.php +1 -0
- admin/config/addons.php +40 -0
- admin/functions-addons.php +3 -39
- admin/functions-settings.php +11 -0
- admin/views/class-view-addons.php +57 -63
- admin/views/class-view-donate.php +75 -0
- changelog.md +18 -0
- css/admin.css +76 -0
- css/admin.min.css +1 -1
- img/icon-addon.png +0 -0
- img/icon-members-core-create-caps.png +0 -0
- img/icon-members-role-hierarchy.png +0 -0
- img/icon-members-role-levels.png +0 -0
- img/members-admin-access.svg +1 -0
- img/members-block-permissions.svg +1 -0
- img/members-core-create-caps.svg +1 -0
- img/members-privacy-caps.svg +1 -0
- img/members-role-hierarchy.svg +1 -0
- img/members-role-levels.svg +1 -0
- img/members.svg +1 -0
- inc/functions-users.php +7 -3
- inc/template.php +14 -9
- lang/members.pot +104 -67
- members.php +2 -2
- readme.md +28 -2
- readme.txt +7 -7
admin/class-meta-box-publish-role.php
CHANGED
@@ -97,8 +97,19 @@ final class Meta_Box_Publish_Role {
|
|
97 |
|
98 |
<div class="misc-pub-section misc-pub-section-users">
|
99 |
<i class="dashicons dashicons-admin-users"></i>
|
100 |
-
<?php
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
</div>
|
103 |
|
104 |
<div class="misc-pub-section misc-pub-section-granted">
|
97 |
|
98 |
<div class="misc-pub-section misc-pub-section-users">
|
99 |
<i class="dashicons dashicons-admin-users"></i>
|
100 |
+
<?php if ( 0 < $user_count && current_user_can( 'list_users' ) ) : ?>
|
101 |
+
|
102 |
+
<a href="<?php echo esc_url( add_query_arg( 'role', $role->name, admin_url( 'users.php' ) ) ); ?>"><?php echo esc_html(
|
103 |
+
sprintf(
|
104 |
+
_n( '%s User', '%s Users', absint( $user_count ), 'members' ),
|
105 |
+
number_format_i18n( $user_count )
|
106 |
+
)
|
107 |
+
); ?></a>
|
108 |
+
|
109 |
+
<?php else : ?>
|
110 |
+
<?php esc_html_e( 'Users:', 'members' ); ?>
|
111 |
+
<strong class="user-count"><?php echo number_format_i18n( $user_count ); ?></strong>
|
112 |
+
<?php endif; ?>
|
113 |
</div>
|
114 |
|
115 |
<div class="misc-pub-section misc-pub-section-granted">
|
admin/class-role-list-table.php
CHANGED
@@ -278,7 +278,21 @@ class Role_List_Table extends \WP_List_Table {
|
|
278 |
* @return string
|
279 |
*/
|
280 |
protected function column_users( $role ) {
|
281 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
}
|
283 |
|
284 |
/**
|
278 |
* @return string
|
279 |
*/
|
280 |
protected function column_users( $role ) {
|
281 |
+
|
282 |
+
$user_count = members_get_role_user_count( $role );
|
283 |
+
|
284 |
+
$output = number_format_i18n( $user_count );
|
285 |
+
|
286 |
+
if ( 0 < absint( $user_count ) && current_user_can( 'list_users' ) ) {
|
287 |
+
|
288 |
+
$output = sprintf(
|
289 |
+
'<a href="%s">%s</a>',
|
290 |
+
esc_url( add_query_arg( 'role', $role, admin_url( 'users.php' ) ) ),
|
291 |
+
$output
|
292 |
+
);
|
293 |
+
}
|
294 |
+
|
295 |
+
return apply_filters( 'members_manage_roles_column_users', $output, $role );
|
296 |
}
|
297 |
|
298 |
/**
|
admin/class-settings.php
CHANGED
@@ -92,6 +92,7 @@ final class Settings_Page {
|
|
92 |
require_once( members_plugin()->dir . 'admin/views/class-view.php' );
|
93 |
require_once( members_plugin()->dir . 'admin/views/class-view-general.php' );
|
94 |
require_once( members_plugin()->dir . 'admin/views/class-view-addons.php' );
|
|
|
95 |
}
|
96 |
|
97 |
/**
|
92 |
require_once( members_plugin()->dir . 'admin/views/class-view.php' );
|
93 |
require_once( members_plugin()->dir . 'admin/views/class-view-general.php' );
|
94 |
require_once( members_plugin()->dir . 'admin/views/class-view-addons.php' );
|
95 |
+
require_once( members_plugin()->dir . 'admin/views/class-view-donate.php' );
|
96 |
}
|
97 |
|
98 |
/**
|
admin/config/addons.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
return array(
|
4 |
+
|
5 |
+
'members-privacy-caps' => array(
|
6 |
+
'url' => 'https://themehybrid.com/plugins/members-privacy-caps',
|
7 |
+
'title' => 'Members - Privacy Caps',
|
8 |
+
'excerpt' => 'Creates additional capabilities for control over WordPress’ privacy and personal data features (GDPR).'
|
9 |
+
),
|
10 |
+
|
11 |
+
'members-admin-access' => array(
|
12 |
+
'url' => 'https://themehybrid.com/plugins/members-admin-access',
|
13 |
+
'title' => 'Members - Admin Access',
|
14 |
+
'excerpt' => 'Allows site administrators to control which users have access to the WordPress admin via role.',
|
15 |
+
),
|
16 |
+
|
17 |
+
'members-core-create-caps' => array(
|
18 |
+
'url' => 'https://themehybrid.com/plugins/members-core-create-caps',
|
19 |
+
'title' => 'Members - Core Create Caps',
|
20 |
+
'excerpt' => 'Adds the create_posts and create_pages caps to posts/pages to separate them from their edit_* counterparts, providing more flexible editing capabilities.'
|
21 |
+
),
|
22 |
+
|
23 |
+
'members-role-levels' => array(
|
24 |
+
'url' => 'https://themehybrid.com/plugins/members-role-levels',
|
25 |
+
'title' => 'Members - Role Levels',
|
26 |
+
'excerpt' => 'Exposes the old user levels system, which fixes the WordPress author drop-down bug when users don’t have a role with one of the assigned levels.'
|
27 |
+
),
|
28 |
+
|
29 |
+
'members-role-hierarchy' => array(
|
30 |
+
'url' => 'https://themehybrid.com/plugins/members-role-hierarchy',
|
31 |
+
'title' => 'Members - Role Hierarchy',
|
32 |
+
'excerpt' => 'Add-on plugin for Members, which creates a hierarchical roles system.'
|
33 |
+
),
|
34 |
+
|
35 |
+
'members-block-permissions' => array(
|
36 |
+
'url' => '',
|
37 |
+
'title' => 'Members - Block Permissions',
|
38 |
+
'excerpt' => '<p><strong>COMING SOON!</strong></p><p>Hide or show blocks in the WordPress block editor (Gutenberg).</p>'
|
39 |
+
)
|
40 |
+
);
|
admin/functions-addons.php
CHANGED
@@ -24,49 +24,13 @@ add_action( 'members_register_addons', 'members_register_default_addons', 5 );
|
|
24 |
*/
|
25 |
function members_register_default_addons() {
|
26 |
|
27 |
-
|
28 |
-
$data = get_transient( 'members_addons' );
|
29 |
-
|
30 |
-
if ( ! $data || ! is_array( $data ) ) {
|
31 |
-
|
32 |
-
// `localhost` is the sandbox URL.
|
33 |
-
// $url = 'http://localhost/api/th/v1/plugins?addons=members';
|
34 |
-
$url = 'https://themehybrid.com/api/th/v1/plugins?addons=members';
|
35 |
-
|
36 |
-
// Get data from the remote URL.
|
37 |
-
$response = wp_remote_get( $url );
|
38 |
-
|
39 |
-
// Bail if we get no response.
|
40 |
-
if ( is_wp_error( $response ) )
|
41 |
-
return;
|
42 |
-
|
43 |
-
// Decode the data that we got.
|
44 |
-
$data = json_decode( wp_remote_retrieve_body( $response ) );
|
45 |
-
}
|
46 |
|
47 |
// If we have an array of data, let's roll.
|
48 |
if ( ! empty( $data ) && is_array( $data ) ) {
|
49 |
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
foreach ( $data as $addon ) {
|
54 |
-
|
55 |
-
$args = array(
|
56 |
-
'title' => $addon->title,
|
57 |
-
'excerpt' => $addon->excerpt,
|
58 |
-
'url' => $addon->url,
|
59 |
-
'purchase_url' => $addon->meta->purchase_url,
|
60 |
-
'download_url' => $addon->meta->download_url,
|
61 |
-
'rating' => $addon->meta->rating,
|
62 |
-
'rating_count' => $addon->meta->rating_count,
|
63 |
-
'install_count' => $addon->meta->install_count,
|
64 |
-
'icon_url' => $addon->media->icon->url,
|
65 |
-
'author_url' => $addon->author->url,
|
66 |
-
'author_name' => $addon->author->name
|
67 |
-
);
|
68 |
-
|
69 |
-
members_register_addon( $addon->slug, $args );
|
70 |
}
|
71 |
}
|
72 |
}
|
24 |
*/
|
25 |
function members_register_default_addons() {
|
26 |
|
27 |
+
$data = include members_plugin()->dir . 'admin/config/addons.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
// If we have an array of data, let's roll.
|
30 |
if ( ! empty( $data ) && is_array( $data ) ) {
|
31 |
|
32 |
+
foreach ( $data as $addon => $options ) {
|
33 |
+
members_register_addon( $addon, $options );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
}
|
35 |
}
|
36 |
}
|
admin/functions-settings.php
CHANGED
@@ -48,6 +48,17 @@ function members_register_default_settings_views( $manager ) {
|
|
48 |
)
|
49 |
)
|
50 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
}
|
52 |
|
53 |
/**
|
48 |
)
|
49 |
)
|
50 |
);
|
51 |
+
|
52 |
+
// Register add-ons view.
|
53 |
+
$manager->register_view(
|
54 |
+
new \Members\Admin\View_Donate(
|
55 |
+
'donate',
|
56 |
+
array(
|
57 |
+
'label' => esc_html__( 'Help Fund Version 3.0', 'members' ),
|
58 |
+
'priority' => 100
|
59 |
+
)
|
60 |
+
)
|
61 |
+
);
|
62 |
}
|
63 |
|
64 |
/**
|
admin/views/class-view-addons.php
CHANGED
@@ -20,6 +20,17 @@ namespace Members\Admin;
|
|
20 |
*/
|
21 |
class View_Addons extends View {
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
/**
|
24 |
* Renders the settings page.
|
25 |
*
|
@@ -36,6 +47,38 @@ class View_Addons extends View {
|
|
36 |
|
37 |
$addons = members_get_addons(); ?>
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
<div class="widefat">
|
40 |
|
41 |
<?php if ( $addons ) : ?>
|
@@ -74,85 +117,36 @@ class View_Addons extends View {
|
|
74 |
|
75 |
<div class="name column-name">
|
76 |
<h3>
|
77 |
-
|
|
|
|
|
|
|
78 |
<?php echo esc_html( $addon->title ); ?>
|
79 |
|
80 |
-
<?php if ( file_exists( members_plugin()->dir . "img/
|
81 |
|
82 |
-
<
|
|
|
|
|
83 |
|
84 |
<?php elseif ( $addon->icon_url ) : ?>
|
85 |
|
86 |
<img class="plugin-icon" src="<?php echo esc_url( $addon->icon_url ); ?>" alt="" />
|
87 |
|
88 |
<?php endif; ?>
|
89 |
-
</a>
|
90 |
-
</h3>
|
91 |
-
</div>
|
92 |
-
|
93 |
-
<div class="action-links">
|
94 |
-
|
95 |
-
<ul class="plugin-action-buttons">
|
96 |
-
<li>
|
97 |
-
<?php if ( $addon->purchase_url ) : ?>
|
98 |
-
|
99 |
-
<a class="install-now button" href="<?php echo esc_url( $addon->purchase_url ); ?>"><?php esc_html_e( 'Purchase', 'members' ); ?></a>
|
100 |
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
<?php else : ?>
|
106 |
-
|
107 |
-
<a class="install-now button" href="<?php echo esc_url( $addon->url ); ?>"><?php esc_html_e( 'Download', 'members' ); ?></a>
|
108 |
-
|
109 |
-
<?php endif; ?>
|
110 |
-
</li>
|
111 |
-
</ul>
|
112 |
</div>
|
113 |
|
114 |
-
<div class="desc column-description">
|
115 |
-
|
116 |
-
<?php echo wpautop( wp_strip_all_tags( $addon->excerpt ) ); ?>
|
117 |
-
|
118 |
-
<p class="authors">
|
119 |
-
<?php $author = sprintf( '<a href="%s">%s</a>', esc_url( $addon->author_url ), esc_html( $addon->author_name ) ); ?>
|
120 |
-
|
121 |
-
<cite><?php printf( esc_html__( 'By %s', 'members' ), $author ); ?></cite>
|
122 |
-
</p>
|
123 |
-
|
124 |
</div>
|
125 |
|
126 |
</div><!-- .plugin-card-top -->
|
127 |
|
128 |
-
<?php if ( ( $addon->rating && $addon->rating_count ) || $addon->install_count ) : ?>
|
129 |
-
|
130 |
-
<div class="plugin-card-bottom">
|
131 |
-
|
132 |
-
<?php if ( $addon->rating && $addon->rating_count ) : ?>
|
133 |
-
|
134 |
-
<div class="vers column-rating">
|
135 |
-
<?php wp_star_rating( array( 'type' => 'rating', 'rating' => floatval( $addon->rating ), 'number' => absint( $addon->rating_count ) ) ); ?>
|
136 |
-
<span class="num-ratings" aria-hidden="true">(<?php echo absint( $addon->rating_count ); ?>)</span>
|
137 |
-
</div>
|
138 |
-
|
139 |
-
<?php endif; ?>
|
140 |
-
|
141 |
-
<?php if ( $addon->install_count ) : ?>
|
142 |
-
|
143 |
-
<div class="column-downloaded">
|
144 |
-
<?php printf(
|
145 |
-
esc_html__( '%s+ Active Installs', 'members' ),
|
146 |
-
number_format_i18n( absint( $addon->install_count ) )
|
147 |
-
); ?>
|
148 |
-
</div>
|
149 |
-
|
150 |
-
<?php endif; ?>
|
151 |
-
|
152 |
-
</div><!-- .plugin-card-bottom -->
|
153 |
-
|
154 |
-
<?php endif; ?>
|
155 |
-
|
156 |
</div><!-- .plugin-card -->
|
157 |
|
158 |
<?php }
|
20 |
*/
|
21 |
class View_Addons extends View {
|
22 |
|
23 |
+
/**
|
24 |
+
* Enqueues scripts/styles.
|
25 |
+
*
|
26 |
+
* @since 2.2.0
|
27 |
+
* @access public
|
28 |
+
* @return void
|
29 |
+
*/
|
30 |
+
public function enqueue() {
|
31 |
+
wp_enqueue_style( 'members-admin' );
|
32 |
+
}
|
33 |
+
|
34 |
/**
|
35 |
* Renders the settings page.
|
36 |
*
|
47 |
|
48 |
$addons = members_get_addons(); ?>
|
49 |
|
50 |
+
<div class="widefat">
|
51 |
+
|
52 |
+
<div class="welcome-panel">
|
53 |
+
|
54 |
+
<div class="welcome-panel-content">
|
55 |
+
|
56 |
+
<div>
|
57 |
+
<div class="members-svg-wrap">
|
58 |
+
<a href="https://themehybrid.com/plugins/members" class="members-svg-link" target="_blank">
|
59 |
+
<?php include members_plugin()->dir . 'img/members.svg'; ?>
|
60 |
+
</a>
|
61 |
+
</div>
|
62 |
+
|
63 |
+
<div style="overflow: hidden;">
|
64 |
+
<h2>
|
65 |
+
<?php _e( 'Go Pro With Members Add-ons', 'members' ); ?>
|
66 |
+
</h2>
|
67 |
+
<p class="about-description" style="margin:20px 0 10px;">
|
68 |
+
<?php esc_html_e( 'Take your membership site to the next level with add-ons. Pro users also enjoy live chat support and support forum access.', 'members' ); ?>
|
69 |
+
</p>
|
70 |
+
<p>
|
71 |
+
<a class="button button-primary button-hero" href="https://themehybrid.com/plugins/members" target="_blank"><?php esc_html_e( 'Upgrade To Pro', 'members' ); ?></a>
|
72 |
+
</p>
|
73 |
+
</div>
|
74 |
+
</div>
|
75 |
+
|
76 |
+
</div><!-- .welcome-panel-content -->
|
77 |
+
|
78 |
+
</div><!-- .welcome-panel -->
|
79 |
+
|
80 |
+
</div>
|
81 |
+
|
82 |
<div class="widefat">
|
83 |
|
84 |
<?php if ( $addons ) : ?>
|
117 |
|
118 |
<div class="name column-name">
|
119 |
<h3>
|
120 |
+
<?php if ( $addon->url ) : ?>
|
121 |
+
<a href="<?php echo esc_url( $addon->url ); ?>" target="_blank">
|
122 |
+
<?php endif; ?>
|
123 |
+
|
124 |
<?php echo esc_html( $addon->title ); ?>
|
125 |
|
126 |
+
<?php if ( file_exists( members_plugin()->dir . "img/{$addon->name}.svg" ) ) : ?>
|
127 |
|
128 |
+
<span class="plugin-icon members-svg-link">
|
129 |
+
<?php include members_plugin()->dir . "img/{$addon->name}.svg"; ?>
|
130 |
+
</span>
|
131 |
|
132 |
<?php elseif ( $addon->icon_url ) : ?>
|
133 |
|
134 |
<img class="plugin-icon" src="<?php echo esc_url( $addon->icon_url ); ?>" alt="" />
|
135 |
|
136 |
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
|
138 |
+
<?php if ( $addon->url ) : ?>
|
139 |
+
</a>
|
140 |
+
<?php endif; ?>
|
141 |
+
</h3>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
</div>
|
143 |
|
144 |
+
<div class="desc column-description" style="margin-right:0;">
|
145 |
+
<?php echo wpautop( wp_kses_post( $addon->excerpt ) ); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
</div>
|
147 |
|
148 |
</div><!-- .plugin-card-top -->
|
149 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
</div><!-- .plugin-card -->
|
151 |
|
152 |
<?php }
|
admin/views/class-view-donate.php
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Handles the donate settings view.
|
4 |
+
*
|
5 |
+
* @package Members
|
6 |
+
* @subpackage Admin
|
7 |
+
* @author Justin Tadlock <justintadlock@gmail.com>
|
8 |
+
* @copyright Copyright (c) 2009 - 2018, Justin Tadlock
|
9 |
+
* @link https://themehybrid.com/plugins/members
|
10 |
+
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
11 |
+
*/
|
12 |
+
|
13 |
+
namespace Members\Admin;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Sets up and handles the donate settings view.
|
17 |
+
*
|
18 |
+
* @since 2.2.0
|
19 |
+
* @access public
|
20 |
+
*/
|
21 |
+
class View_Donate extends View {
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Enqueues scripts/styles.
|
25 |
+
*
|
26 |
+
* @since 2.2.0
|
27 |
+
* @access public
|
28 |
+
* @return void
|
29 |
+
*/
|
30 |
+
public function enqueue() {
|
31 |
+
wp_enqueue_style( 'members-admin' );
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Renders the settings page.
|
36 |
+
*
|
37 |
+
* @since 2.2.0
|
38 |
+
* @access public
|
39 |
+
* @return void
|
40 |
+
*/
|
41 |
+
public function template() { ?>
|
42 |
+
|
43 |
+
<div class="widefat">
|
44 |
+
|
45 |
+
<div class="welcome-panel">
|
46 |
+
|
47 |
+
<div class="welcome-panel-content">
|
48 |
+
|
49 |
+
<h2>
|
50 |
+
<?php esc_html_e( 'Donate Toward Future Development', 'members' ); ?>
|
51 |
+
</h2>
|
52 |
+
|
53 |
+
<p class="about-description">
|
54 |
+
<?php esc_html_e( 'The Members plugin needs funding to cover development costs toward version 3.0.', 'members' ); ?>
|
55 |
+
</p>
|
56 |
+
|
57 |
+
<p class="members-short-p">
|
58 |
+
<?php esc_html_e( "Members itself will always remain free as long as I'm able to work on it. However, it is easily my largest and most complex plugin. A major update takes 100s of hours of development. If every user would donate just $1, it would fund fulltime development of this plugin for at least 3 years. Of course, it's not a reality that everyone is able donate. Pitching in any amount will help.", 'members' ); ?>
|
59 |
+
</p>
|
60 |
+
|
61 |
+
<p>
|
62 |
+
<a target="_blank" class="button button-primary button-hero" href="<?php echo esc_url( 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=E9D2YGZFM8QT4&source=url' ); ?>"><?php esc_html_e( 'Donate Via PayPal', 'members' ); ?></a>
|
63 |
+
</p>
|
64 |
+
<p>
|
65 |
+
<a target="_blank" href="https://themehybrid.com/plugins/members#donate"><?php esc_html_e( 'Learn More', 'members' ); ?></a>
|
66 |
+
</p>
|
67 |
+
|
68 |
+
</div><!-- .plugin-card-top -->
|
69 |
+
|
70 |
+
</div><!-- .plugin-card -->
|
71 |
+
|
72 |
+
</div>
|
73 |
+
|
74 |
+
<?php }
|
75 |
+
}
|
changelog.md
CHANGED
@@ -1,5 +1,23 @@
|
|
1 |
# Change Log
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
## [2.1.0] - 2018-04-19
|
4 |
|
5 |
### Added
|
1 |
# Change Log
|
2 |
|
3 |
+
## [2.2.0] - 2019-07-20
|
4 |
+
|
5 |
+
### Added
|
6 |
+
|
7 |
+
- Settings page sub-view for donations.
|
8 |
+
|
9 |
+
### Fixed
|
10 |
+
|
11 |
+
- Makes sure that we have a post object when determining whether a user can view a given post.
|
12 |
+
- Makes sure that denied capabilities are an array when filtering `user_has_cap`.
|
13 |
+
- Typo in `readme.txt`.
|
14 |
+
|
15 |
+
### Changed
|
16 |
+
|
17 |
+
- Links user count on edit role screen to users by role page.
|
18 |
+
- Links user count on manage roles screen to users by role page.
|
19 |
+
- Updated the add-ons sub-view with design changes and a "pro" section.
|
20 |
+
|
21 |
## [2.1.0] - 2018-04-19
|
22 |
|
23 |
### Added
|
css/admin.css
CHANGED
@@ -1,3 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/* ====== Manage Roles Screen. ====== */
|
2 |
|
3 |
@media only screen and ( min-width: 783px ) {
|
1 |
+
/* ====== Members Settings Screen. ====== */
|
2 |
+
|
3 |
+
.settings_page_members-settings .welcome-panel {
|
4 |
+
margin-top: 0;
|
5 |
+
padding: 40px 20px;
|
6 |
+
}
|
7 |
+
|
8 |
+
.settings_page_members-settings .welcome-panel .about-description {
|
9 |
+
margin: 20px 0;
|
10 |
+
}
|
11 |
+
|
12 |
+
.settings_page_members-settings .welcome-panel-content {
|
13 |
+
margin: 0;
|
14 |
+
}
|
15 |
+
|
16 |
+
@media screen and (min-width: 870px) {
|
17 |
+
|
18 |
+
.settings_page_members-settings .members-short-p {
|
19 |
+
max-width: 612px;
|
20 |
+
margin-left: auto;
|
21 |
+
margin-right: auto;
|
22 |
+
}
|
23 |
+
|
24 |
+
.settings_page_members-settings .welcome-panel-content {
|
25 |
+
text-align: center;
|
26 |
+
}
|
27 |
+
}
|
28 |
+
|
29 |
+
.settings_page_members-settings .welcome-panel .button.button-hero {
|
30 |
+
margin-left: auto;
|
31 |
+
margin-right: auto;
|
32 |
+
}
|
33 |
+
|
34 |
+
.settings_page_members-settings .members-svg-wrap {
|
35 |
+
display: inline-block;
|
36 |
+
margin: 0 auto 20px;
|
37 |
+
}
|
38 |
+
|
39 |
+
@media screen and (max-width: 870px) {
|
40 |
+
.settings_page_members-settings .welcome-panel {
|
41 |
+
padding: 20px;
|
42 |
+
}
|
43 |
+
|
44 |
+
.settings_page_members-settings .members-svg-wrap {
|
45 |
+
float: left;
|
46 |
+
margin-right: 28px;
|
47 |
+
}
|
48 |
+
|
49 |
+
.settings_page_members-settings.rtl .members-svg-wrap {
|
50 |
+
float: right;
|
51 |
+
margin-right: 0;
|
52 |
+
margin-left: 28px;
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
.settings_page_members-settings .members-svg-link {
|
57 |
+
display: table-cell;
|
58 |
+
text-align: center;
|
59 |
+
width: 128px;
|
60 |
+
height: 128px;
|
61 |
+
background: #363b3f;
|
62 |
+
color: #fff;
|
63 |
+
padding: 24px 16px 16px;
|
64 |
+
border-radius: 50%;
|
65 |
+
box-sizing: border-box;
|
66 |
+
border: 4px solid #ffffff;
|
67 |
+
box-shadow: 0 0 0 4px #363b3f;
|
68 |
+
}
|
69 |
+
|
70 |
+
.settings_page_members-settings .members-svg-link svg {
|
71 |
+
max-width: 84px;
|
72 |
+
max-height: 64px;
|
73 |
+
width: auto;
|
74 |
+
height: auto;
|
75 |
+
}
|
76 |
+
|
77 |
/* ====== Manage Roles Screen. ====== */
|
78 |
|
79 |
@media only screen and ( min-width: 783px ) {
|
css/admin.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
@media only screen and (min-width:783px){.users_page_roles .column-
|
1 |
+
.settings_page_members-settings .welcome-panel{margin-top:0;padding:40px 20px}.settings_page_members-settings .welcome-panel .about-description{margin:20px 0}.settings_page_members-settings .welcome-panel-content{margin:0}@media screen and (min-width:870px){.settings_page_members-settings .members-short-p{max-width:612px;margin-left:auto;margin-right:auto}.settings_page_members-settings .welcome-panel-content{text-align:center}}.settings_page_members-settings .welcome-panel .button.button-hero{margin-left:auto;margin-right:auto}.settings_page_members-settings .members-svg-wrap{display:inline-block;margin:0 auto 20px}@media screen and (max-width:870px){.settings_page_members-settings .welcome-panel{padding:20px}.settings_page_members-settings .members-svg-wrap{float:left;margin-right:28px}.settings_page_members-settings.rtl .members-svg-wrap{float:right;margin-right:0;margin-left:28px}}.settings_page_members-settings .members-svg-link{display:table-cell;text-align:center;width:128px;height:128px;background:#363b3f;color:#fff;padding:24px 16px 16px;border-radius:50%;box-sizing:border-box;border:4px solid #fff;box-shadow:0 0 0 4px #363b3f}.settings_page_members-settings .members-svg-link svg{max-width:84px;max-height:64px;width:auto;height:auto}@media only screen and (min-width:783px){.users_page_roles .column-users,.users_page_roles .column-granted_caps,.users_page_roles .column-denied_caps{width:100px;text-align:center}}.members-title-div #titlewrap input{padding:0 8px;font-size:1.7em;line-height:normal;height:1.7em;width:100%;outline:none;margin:0 0 3px;background-color:#fff}.members-title-div input[name="role"]{font-size:13px;height:22px;margin:0;width:16em}#tabcapsdiv{margin-top:1em}#tabcapsdiv>.hndle{padding:10px;border-bottom:1px solid #eee}#tabcapsdiv .inside,#members-cp .inside{margin:0;padding:0}.members-cap-tabs,.members-tabs{overflow:hidden;background:#fff;background:linear-gradient(90deg,#fafafa 0%,#fafafa 20%,#fff 20%,#fff 100%)}@media only screen and (max-width:782px){.members-cap-tabs,.members-tabs{background:linear-gradient(90deg,#fafafa 0%,#fafafa 48px,#fff 48px,#fff 100%)}}.members-cap-tabs .members-tab-nav,.members-tabs .members-tab-nav{position:relative;float:left;list-style:none;width:20%;line-height:1em;margin:0 0 -1px 0;padding:0;background-color:#fafafa;border-right:1px solid #eee;box-sizing:border-box}.members-cap-tabs .members-tab-nav li,.members-tabs .members-tab-nav li{display:block;position:relative;margin:0;padding:0;line-height:20px}.members-cap-tabs .members-tab-nav li a,.members-tabs .members-tab-nav li a{display:block;margin:0;padding:10px;line-height:20px!important;text-decoration:none;border-bottom:1px solid #eee;box-shadow:none}.members-cap-tabs .members-tab-nav li a .dashicons,.members-tabs .members-tab-nav li a .dashicons{line-height:20px;margin-right:3px}.members-cap-tabs .members-tab-nav li[aria-selected="true"] a,.members-tabs .members-tab-nav li[aria-selected="true"] a{position:relative;font-weight:700;color:#555;background-color:#e0e0e0}@media only screen and (max-width:782px){.members-cap-tabs .members-tab-nav,.members-tabs .members-tab-nav{width:48px}.members-cap-tabs .members-tab-nav li a .dashicons,.members-tabs .members-tab-nav li a .dashicons{width:24px;height:24px;font-size:24px;line-height:24px}.members-tab-nav li .dashicons::before,.members-tab-nav li .dashicons::before{width:24px;height:24px}.members-tab-nav li .label{overflow:hidden;position:absolute;top:-1000em;left:-1000em;width:1px;height:1px}}.members-cap-tabs .members-tab-wrap,.members-tabs .members-tab-wrap{float:left;width:80%;margin-left:-1px}@media only screen and (max-width:782px){.members-cap-tabs .members-tab-wrap,.members-tabs .members-tab-wrap{width:calc(100% - 48px)}}#members-cp .members-tab-content{padding:10px;border-left:1px solid #e5e5e5}@media only screen and (min-width:850px){#side-sortables .members-tabs{background:#fff}#side-sortables .members-tabs .members-tab-wrap{width:100%}#side-sortables .members-tabs .members-tab-nav{display:table;width:100%}#side-sortables .members-tabs .members-tab-nav li{display:table-cell;text-align:center;border-right:1px solid #eee}#side-sortables .members-tabs .members-tab-nav li:last-of-type{border-right:none}#side-sortables .members-tabs .members-tab-nav li a{padding:10px 0}#side-sortables .members-tabs .members-tab-nav .dashicons{width:24px;height:24px;font-size:24px;line-height:24px}#side-sortables .members-tabs .members-tab-nav .dashicons::before{width:24px;height:24px}#side-sortables .members-tabs .members-tab-nav .label{overflow:hidden;position:absolute;top:-1000em;left:-1000em;width:1px;height:1px}}.members-tabs .members-tabs-label{display:block!important;font-weight:700;display:inline-block;margin-bottom:4px}.members-tabs .butterbean-control-checkbox .members-tabs-label{display:inline!important}.members-tabs .members-tabs-description{display:block;font-style:italic;margin-top:4px}.members-tabs .members-tabs-label + .members-tabs-description{margin-top:0;margin-bottom:4px}#tabcapsdiv table{border-right:none;border-top:none;border-bottom:none}#tabcapsdiv table td,#tabcapsdiv table th{padding:10px;padding-bottom:10px;border-bottom:1px solid #eee;font-size:13px;line-height:20px}#tabcapsdiv table td{padding:9px}#tabcapsdiv tbody tr:last-of-type td{border-bottom:none}#tabcapsdiv tfoot th{border-color:#eee}@media only screen and (max-width:782px){#tabcapsdiv table td,#tabcapsdiv table th{line-height:24px}}.members-roles-select .column-grant,.members-roles-select .column-deny{width:70px!important;text-align:center;display:table-cell!important;clear:none!important}.members-cap-tabs button{display:inline;margin:-4px;line-height:inherit;padding:4px 8px;border:1px solid transparent;background:transparent;border-radius:0;outline:none;-webkit-transition:all 0.25s ease-out;-moz-transition:all 0.25s ease-out;-o-transition:all 0.25s ease-out;transition:all 0.25s ease-out}.members-cap-tabs button:hover,.members-cap-tabs button:focus{border-color:#eee;background:#fafafa;cursor:pointer}.members-cap-tabs button:active{color:#0073aa;border-color:#0073aa}.members-cap-tabs button + .dashicons{display:none;margin-top:1px;margin-bottom:-1px;line-height:inherit}.members-cap-tabs button:hover + .dashicons,.members-cap-tabs button:focus + .dashicons{display:inline-block}.members-tab-content .members-highlight{background-color:rgba(0,115,170,.05)}.members-tab-content tbody{-webkit-transition:all 2s ease-in-out;-moz-transition:all 2s ease-in-out;-o-transition:all 2s ease-in-out;transition:all 2s ease-in-out}.members-cp-role-list-wrap{overflow:auto;min-height:42px;max-height:200px;padding:0 .9em;border:solid 1px rgb(223,223,223);background-color:rgb(253,253,253)}
|
img/icon-addon.png
CHANGED
Binary file
|
img/icon-members-core-create-caps.png
DELETED
Binary file
|
img/icon-members-role-hierarchy.png
DELETED
Binary file
|
img/icon-members-role-levels.png
DELETED
Binary file
|
img/members-admin-access.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="user-shield" class="svg-inline--fa fa-user-shield fa-w-20" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M622.3 271.1l-115.2-45c-4.1-1.6-12.6-3.7-22.2 0l-115.2 45c-10.7 4.2-17.7 14-17.7 24.9 0 111.6 68.7 188.8 132.9 213.9 9.6 3.7 18 1.6 22.2 0C558.4 489.9 640 420.5 640 296c0-10.9-7-20.7-17.7-24.9zM496 462.4V273.3l95.5 37.3c-5.6 87.1-60.9 135.4-95.5 151.8zM224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm96 40c0-2.5.8-4.8 1.1-7.2-2.5-.1-4.9-.8-7.5-.8h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c6.8 0 13.3-1.5 19.2-4-54-42.9-99.2-116.7-99.2-212z"></path></svg>
|
img/members-block-permissions.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="th-large" class="svg-inline--fa fa-th-large fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M296 32h192c13.255 0 24 10.745 24 24v160c0 13.255-10.745 24-24 24H296c-13.255 0-24-10.745-24-24V56c0-13.255 10.745-24 24-24zm-80 0H24C10.745 32 0 42.745 0 56v160c0 13.255 10.745 24 24 24h192c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24zM0 296v160c0 13.255 10.745 24 24 24h192c13.255 0 24-10.745 24-24V296c0-13.255-10.745-24-24-24H24c-13.255 0-24 10.745-24 24zm296 184h192c13.255 0 24-10.745 24-24V296c0-13.255-10.745-24-24-24H296c-13.255 0-24 10.745-24 24v160c0 13.255 10.745 24 24 24z"></path></svg>
|
img/members-core-create-caps.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="pencil-alt" class="svg-inline--fa fa-pencil-alt fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"></path></svg>
|
img/members-privacy-caps.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="user-secret" class="svg-inline--fa fa-user-secret fa-w-14" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M383.9 308.3l23.9-62.6c4-10.5-3.7-21.7-15-21.7h-58.5c11-18.9 17.8-40.6 17.8-64v-.3c39.2-7.8 64-19.1 64-31.7 0-13.3-27.3-25.1-70.1-33-9.2-32.8-27-65.8-40.6-82.8-9.5-11.9-25.9-15.6-39.5-8.8l-27.6 13.8c-9 4.5-19.6 4.5-28.6 0L182.1 3.4c-13.6-6.8-30-3.1-39.5 8.8-13.5 17-31.4 50-40.6 82.8-42.7 7.9-70 19.7-70 33 0 12.6 24.8 23.9 64 31.7v.3c0 23.4 6.8 45.1 17.8 64H56.3c-11.5 0-19.2 11.7-14.7 22.3l25.8 60.2C27.3 329.8 0 372.7 0 422.4v44.8C0 491.9 20.1 512 44.8 512h358.4c24.7 0 44.8-20.1 44.8-44.8v-44.8c0-48.4-25.8-90.4-64.1-114.1zM176 480l-41.6-192 49.6 32 24 40-32 120zm96 0l-32-120 24-40 49.6-32L272 480zm41.7-298.5c-3.9 11.9-7 24.6-16.5 33.4-10.1 9.3-48 22.4-64-25-2.8-8.4-15.4-8.4-18.3 0-17 50.2-56 32.4-64 25-9.5-8.8-12.7-21.5-16.5-33.4-.8-2.5-6.3-5.7-6.3-5.8v-10.8c28.3 3.6 61 5.8 96 5.8s67.7-2.1 96-5.8v10.8c-.1.1-5.6 3.2-6.4 5.8z"></path></svg>
|
img/members-role-hierarchy.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="users" class="svg-inline--fa fa-users fa-w-20" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M96 224c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm448 0c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm32 32h-64c-17.6 0-33.5 7.1-45.1 18.6 40.3 22.1 68.9 62 75.1 109.4h66c17.7 0 32-14.3 32-32v-32c0-35.3-28.7-64-64-64zm-256 0c61.9 0 112-50.1 112-112S381.9 32 320 32 208 82.1 208 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5 16s-47.6-6-68.5-16h-8.3C179.6 288 128 339.6 128 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zm-223.7-13.4C161.5 263.1 145.6 256 128 256H64c-35.3 0-64 28.7-64 64v32c0 17.7 14.3 32 32 32h65.9c6.3-47.4 34.9-87.3 75.2-109.4z"></path></svg>
|
img/members-role-levels.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="user-plus" class="svg-inline--fa fa-user-plus fa-w-20" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M624 208h-64v-64c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v64h-64c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h64v64c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-64h64c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm-400 48c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"></path></svg>
|
img/members.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="users-cog" class="svg-inline--fa fa-users-cog fa-w-20" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M610.5 341.3c2.6-14.1 2.6-28.5 0-42.6l25.8-14.9c3-1.7 4.3-5.2 3.3-8.5-6.7-21.6-18.2-41.2-33.2-57.4-2.3-2.5-6-3.1-9-1.4l-25.8 14.9c-10.9-9.3-23.4-16.5-36.9-21.3v-29.8c0-3.4-2.4-6.4-5.7-7.1-22.3-5-45-4.8-66.2 0-3.3.7-5.7 3.7-5.7 7.1v29.8c-13.5 4.8-26 12-36.9 21.3l-25.8-14.9c-2.9-1.7-6.7-1.1-9 1.4-15 16.2-26.5 35.8-33.2 57.4-1 3.3.4 6.8 3.3 8.5l25.8 14.9c-2.6 14.1-2.6 28.5 0 42.6l-25.8 14.9c-3 1.7-4.3 5.2-3.3 8.5 6.7 21.6 18.2 41.1 33.2 57.4 2.3 2.5 6 3.1 9 1.4l25.8-14.9c10.9 9.3 23.4 16.5 36.9 21.3v29.8c0 3.4 2.4 6.4 5.7 7.1 22.3 5 45 4.8 66.2 0 3.3-.7 5.7-3.7 5.7-7.1v-29.8c13.5-4.8 26-12 36.9-21.3l25.8 14.9c2.9 1.7 6.7 1.1 9-1.4 15-16.2 26.5-35.8 33.2-57.4 1-3.3-.4-6.8-3.3-8.5l-25.8-14.9zM496 368.5c-26.8 0-48.5-21.8-48.5-48.5s21.8-48.5 48.5-48.5 48.5 21.8 48.5 48.5-21.7 48.5-48.5 48.5zM96 224c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm224 32c1.9 0 3.7-.5 5.6-.6 8.3-21.7 20.5-42.1 36.3-59.2 7.4-8 17.9-12.6 28.9-12.6 6.9 0 13.7 1.8 19.6 5.3l7.9 4.6c.8-.5 1.6-.9 2.4-1.4 7-14.6 11.2-30.8 11.2-48 0-61.9-50.1-112-112-112S208 82.1 208 144c0 61.9 50.1 112 112 112zm105.2 194.5c-2.3-1.2-4.6-2.6-6.8-3.9-8.2 4.8-15.3 9.8-27.5 9.8-10.9 0-21.4-4.6-28.9-12.6-18.3-19.8-32.3-43.9-40.2-69.6-10.7-34.5 24.9-49.7 25.8-50.3-.1-2.6-.1-5.2 0-7.8l-7.9-4.6c-3.8-2.2-7-5-9.8-8.1-3.3.2-6.5.6-9.8.6-24.6 0-47.6-6-68.5-16h-8.3C179.6 288 128 339.6 128 403.2V432c0 26.5 21.5 48 48 48h255.4c-3.7-6-6.2-12.8-6.2-20.3v-9.2zM173.1 274.6C161.5 263.1 145.6 256 128 256H64c-35.3 0-64 28.7-64 64v32c0 17.7 14.3 32 32 32h65.9c6.3-47.4 34.9-87.3 75.2-109.4z"></path></svg>
|
inc/functions-users.php
CHANGED
@@ -38,7 +38,7 @@ function members_user_has_cap_filter( $allcaps, $caps, $args, $user ) {
|
|
38 |
return $allcaps;
|
39 |
|
40 |
// Get the denied caps.
|
41 |
-
$denied_caps = array_keys( $allcaps, false );
|
42 |
|
43 |
// Loop through the user's roles and find any denied caps.
|
44 |
foreach ( (array) $user->roles as $role ) {
|
@@ -47,8 +47,12 @@ function members_user_has_cap_filter( $allcaps, $caps, $args, $user ) {
|
|
47 |
$role_obj = get_role( $role );
|
48 |
|
49 |
// If we have an object, merge it's denied caps.
|
50 |
-
if ( ! is_null( $role_obj ) )
|
51 |
-
$denied_caps = array_merge(
|
|
|
|
|
|
|
|
|
52 |
}
|
53 |
|
54 |
// If there are any denied caps, make sure they take precedence.
|
38 |
return $allcaps;
|
39 |
|
40 |
// Get the denied caps.
|
41 |
+
$denied_caps = array_keys( (array) $allcaps, false );
|
42 |
|
43 |
// Loop through the user's roles and find any denied caps.
|
44 |
foreach ( (array) $user->roles as $role ) {
|
47 |
$role_obj = get_role( $role );
|
48 |
|
49 |
// If we have an object, merge it's denied caps.
|
50 |
+
if ( ! is_null( $role_obj ) ) {
|
51 |
+
$denied_caps = array_merge(
|
52 |
+
(array) $denied_caps,
|
53 |
+
array_keys( (array) $role_obj->capabilities, false )
|
54 |
+
);
|
55 |
+
}
|
56 |
}
|
57 |
|
58 |
// If there are any denied caps, make sure they take precedence.
|
inc/template.php
CHANGED
@@ -29,8 +29,12 @@
|
|
29 |
function members_can_user_view_post( $user_id, $post_id = '' ) {
|
30 |
|
31 |
// If no post ID is given, assume we're in The Loop and get the current post's ID.
|
32 |
-
if ( ! $post_id )
|
33 |
$post_id = get_the_ID();
|
|
|
|
|
|
|
|
|
34 |
|
35 |
// Assume the user can view the post at this point. */
|
36 |
$can_view = true;
|
@@ -38,7 +42,7 @@ function members_can_user_view_post( $user_id, $post_id = '' ) {
|
|
38 |
// The plugin is only going to handle permissions if the 'content permissions' feature
|
39 |
// is active. If not active, the user can always view the post. However, developers
|
40 |
// can roll their own handling of this and filter `members_can_user_view_post`.
|
41 |
-
if ( members_content_permissions_enabled() ) {
|
42 |
|
43 |
// Get the roles selected by the user.
|
44 |
$roles = members_get_post_roles( $post_id );
|
@@ -55,9 +59,6 @@ function members_can_user_view_post( $user_id, $post_id = '' ) {
|
|
55 |
// to disprove this.
|
56 |
$can_view = false;
|
57 |
|
58 |
-
// Get the post object.
|
59 |
-
$post = get_post( $post_id );
|
60 |
-
|
61 |
// Get the post type object.
|
62 |
$post_type = get_post_type_object( $post->post_type );
|
63 |
|
@@ -92,11 +93,15 @@ function members_can_user_view_post( $user_id, $post_id = '' ) {
|
|
92 |
// Set to `FALSE` to avoid hierarchical checking.
|
93 |
if ( apply_filters( 'members_check_parent_post_permission', $check_parent, $post_id, $user_id ) ) {
|
94 |
|
95 |
-
|
96 |
|
97 |
-
|
98 |
-
|
99 |
-
|
|
|
|
|
|
|
|
|
100 |
}
|
101 |
|
102 |
// Allow developers to overwrite the final return value.
|
29 |
function members_can_user_view_post( $user_id, $post_id = '' ) {
|
30 |
|
31 |
// If no post ID is given, assume we're in The Loop and get the current post's ID.
|
32 |
+
if ( ! $post_id ) {
|
33 |
$post_id = get_the_ID();
|
34 |
+
}
|
35 |
+
|
36 |
+
// Get post object.
|
37 |
+
$post = get_post( $post_id );
|
38 |
|
39 |
// Assume the user can view the post at this point. */
|
40 |
$can_view = true;
|
42 |
// The plugin is only going to handle permissions if the 'content permissions' feature
|
43 |
// is active. If not active, the user can always view the post. However, developers
|
44 |
// can roll their own handling of this and filter `members_can_user_view_post`.
|
45 |
+
if ( $post instanceof \WP_Post && members_content_permissions_enabled() ) {
|
46 |
|
47 |
// Get the roles selected by the user.
|
48 |
$roles = members_get_post_roles( $post_id );
|
59 |
// to disprove this.
|
60 |
$can_view = false;
|
61 |
|
|
|
|
|
|
|
62 |
// Get the post type object.
|
63 |
$post_type = get_post_type_object( $post->post_type );
|
64 |
|
93 |
// Set to `FALSE` to avoid hierarchical checking.
|
94 |
if ( apply_filters( 'members_check_parent_post_permission', $check_parent, $post_id, $user_id ) ) {
|
95 |
|
96 |
+
if ( $post instanceof \WP_Post ) {
|
97 |
|
98 |
+
$parent_id = $post->post_parent;
|
99 |
+
|
100 |
+
// If the post has a parent, check if the user has permission to view it.
|
101 |
+
if ( 0 < $parent_id ) {
|
102 |
+
$can_view = members_can_user_view_post( $user_id, $parent_id );
|
103 |
+
}
|
104 |
+
}
|
105 |
}
|
106 |
|
107 |
// Allow developers to overwrite the final return value.
|
lang/members.pot
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
-
# Copyright (C)
|
2 |
# This file is distributed under the same license as the Members package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Members 2.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/members\n"
|
7 |
-
"POT-Creation-Date:
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"PO-Revision-Date:
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
@@ -75,7 +75,7 @@ msgstr ""
|
|
75 |
msgid "Deny"
|
76 |
msgstr ""
|
77 |
|
78 |
-
#: _assets/class-cap-list-table.php:377 admin/class-role-list-table.php:
|
79 |
#: admin/class-role-new.php:335 admin/functions-admin.php:46
|
80 |
msgid "Edit"
|
81 |
msgstr ""
|
@@ -83,17 +83,17 @@ msgstr ""
|
|
83 |
#: _assets/class-cap-list-table.php:381 _assets/class-cap-list-table.php:520
|
84 |
#: _assets/class-capability-list-table.php:264
|
85 |
#: _assets/class-capability-list-table.php:387
|
86 |
-
#: admin/class-role-list-table.php:
|
87 |
msgid "Delete"
|
88 |
msgstr ""
|
89 |
|
90 |
-
#: _assets/class-cap-list-table.php:387 admin/class-role-list-table.php:
|
91 |
msgid "View"
|
92 |
msgstr ""
|
93 |
|
94 |
#: _assets/class-cap-list-table.php:452
|
95 |
#: _assets/class-capability-list-table.php:319
|
96 |
-
#: admin/class-role-list-table.php:
|
97 |
msgid "All %s"
|
98 |
msgid_plural "All %s"
|
99 |
msgstr[0] ""
|
@@ -101,7 +101,7 @@ msgstr[1] ""
|
|
101 |
|
102 |
#: _assets/class-cap-list-table.php:464
|
103 |
#: _assets/class-capability-list-table.php:320
|
104 |
-
#: admin/class-role-list-table.php:
|
105 |
msgid "Mine %s"
|
106 |
msgid_plural "Mine %s"
|
107 |
msgstr[0] ""
|
@@ -192,7 +192,7 @@ msgid "Capabilities"
|
|
192 |
msgstr ""
|
193 |
|
194 |
#: _assets/class-caps.php:212 admin/class-roles.php:210
|
195 |
-
#: admin/functions-help.php:46 admin/views/class-view-addons.php:
|
196 |
msgid "Overview"
|
197 |
msgstr ""
|
198 |
|
@@ -329,7 +329,7 @@ msgid "None"
|
|
329 |
msgstr ""
|
330 |
|
331 |
#: admin/class-meta-box-content-permissions.php:115
|
332 |
-
#: admin/views/class-view-general.php:63 admin/views/class-view-general.php:
|
333 |
msgid "Content Permissions"
|
334 |
msgstr ""
|
335 |
|
@@ -355,28 +355,34 @@ msgctxt "capability"
|
|
355 |
msgid "Add New"
|
356 |
msgstr ""
|
357 |
|
358 |
-
#: admin/class-meta-box-publish-role.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
359 |
msgid "Users:"
|
360 |
msgstr ""
|
361 |
|
362 |
-
#: admin/class-meta-box-publish-role.php:
|
363 |
msgid "Granted:"
|
364 |
msgstr ""
|
365 |
|
366 |
-
#: admin/class-meta-box-publish-role.php:
|
367 |
msgid "Denied:"
|
368 |
msgstr ""
|
369 |
|
370 |
-
#: admin/class-meta-box-publish-role.php:
|
371 |
msgctxt "delete role"
|
372 |
msgid "Delete"
|
373 |
msgstr ""
|
374 |
|
375 |
-
#: admin/class-meta-box-publish-role.php:
|
376 |
msgid "Update"
|
377 |
msgstr ""
|
378 |
|
379 |
-
#: admin/class-meta-box-publish-role.php:
|
380 |
msgid "Add Role"
|
381 |
msgstr ""
|
382 |
|
@@ -423,38 +429,38 @@ msgstr ""
|
|
423 |
msgid "Your Role"
|
424 |
msgstr ""
|
425 |
|
426 |
-
#: admin/class-role-list-table.php:
|
427 |
msgid "Clone"
|
428 |
msgstr ""
|
429 |
|
430 |
-
#: admin/class-role-list-table.php:
|
431 |
msgid "Change Default"
|
432 |
msgstr ""
|
433 |
|
434 |
-
#: admin/class-role-list-table.php:
|
435 |
#: inc/class-widget-users.php:59 inc/functions-cap-groups.php:121
|
436 |
msgid "Users"
|
437 |
msgstr ""
|
438 |
|
439 |
-
#: admin/class-role-list-table.php:
|
440 |
msgid "Has Users %s"
|
441 |
msgid_plural "Has Users %s"
|
442 |
msgstr[0] ""
|
443 |
msgstr[1] ""
|
444 |
|
445 |
-
#: admin/class-role-list-table.php:
|
446 |
msgid "No Users %s"
|
447 |
msgid_plural "No Users %s"
|
448 |
msgstr[0] ""
|
449 |
msgstr[1] ""
|
450 |
|
451 |
-
#: admin/class-role-list-table.php:
|
452 |
msgid "Editable %s"
|
453 |
msgid_plural "Editable %s"
|
454 |
msgstr[0] ""
|
455 |
msgstr[1] ""
|
456 |
|
457 |
-
#: admin/class-role-list-table.php:
|
458 |
msgid "Uneditable %s"
|
459 |
msgid_plural "Uneditable %s"
|
460 |
msgstr[0] ""
|
@@ -540,13 +546,13 @@ msgstr ""
|
|
540 |
msgid "You can permanently delete multiple roles at once. Select the roles you want to act on using the checkboxes, then select the action you want to take from the Bulk Actions menu and click Apply."
|
541 |
msgstr ""
|
542 |
|
543 |
-
#: admin/class-settings.php:
|
544 |
-
#: admin/class-settings.php:
|
545 |
msgctxt "admin screen"
|
546 |
msgid "Members"
|
547 |
msgstr ""
|
548 |
|
549 |
-
#: admin/class-user-edit.php:97 admin/class-user-new.php:
|
550 |
msgid "User Roles"
|
551 |
msgstr ""
|
552 |
|
@@ -622,44 +628,75 @@ msgstr ""
|
|
622 |
msgid "Add-Ons"
|
623 |
msgstr ""
|
624 |
|
625 |
-
#: admin/
|
626 |
-
msgid "
|
627 |
msgstr ""
|
628 |
|
629 |
-
#: admin/views/class-view-addons.php:
|
630 |
-
msgid "
|
631 |
msgstr ""
|
632 |
|
633 |
-
#: admin/views/class-view-addons.php:
|
634 |
-
|
635 |
-
|
|
|
|
|
|
|
636 |
msgstr ""
|
637 |
|
638 |
-
#: admin/views/class-view-addons.php:
|
639 |
-
msgid "
|
640 |
msgstr ""
|
641 |
|
642 |
-
#: admin/views/class-view-addons.php:
|
643 |
-
msgid "
|
|
|
|
|
|
|
|
|
644 |
msgstr ""
|
645 |
|
646 |
-
#: admin/views/class-view-addons.php:
|
|
|
|
|
|
|
|
|
647 |
msgid "The Add-Ons screen allows you to view available add-ons for the Members plugin. You can download some plugins directly. Others may be available to purchase."
|
648 |
msgstr ""
|
649 |
|
650 |
-
#: admin/views/class-view-addons.php:
|
651 |
msgid "Some plugins may be available for direct download. In such cases, you can click the download button to get a ZIP file of the plugin."
|
652 |
msgstr ""
|
653 |
|
654 |
-
#: admin/views/class-view-addons.php:
|
655 |
msgid "Some add-ons may require purchase before downloading them. Clicking the purchase button will take you off-site to view the add-on in more detail."
|
656 |
msgstr ""
|
657 |
|
658 |
-
#: admin/views/class-view-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
659 |
msgid "Sidebar Widgets"
|
660 |
msgstr ""
|
661 |
|
662 |
-
#: admin/views/class-view-general.php:65 admin/views/class-view-general.php:
|
663 |
msgid "Private Site"
|
664 |
msgstr ""
|
665 |
|
@@ -699,83 +736,83 @@ msgstr ""
|
|
699 |
msgid "Feed Error Message"
|
700 |
msgstr ""
|
701 |
|
702 |
-
#: admin/views/class-view-general.php:
|
703 |
msgid "Your roles and capabilities will not revert back to their previous settings after deactivating or uninstalling this plugin, so use this feature wisely."
|
704 |
msgstr ""
|
705 |
|
706 |
-
#: admin/views/class-view-general.php:
|
707 |
msgid "Enable the role manager."
|
708 |
msgstr ""
|
709 |
|
710 |
-
#: admin/views/class-view-general.php:
|
711 |
msgid "Denied capabilities should always overrule granted capabilities."
|
712 |
msgstr ""
|
713 |
|
714 |
-
#: admin/views/class-view-general.php:
|
715 |
msgid "Show human-readable capabilities when possible."
|
716 |
msgstr ""
|
717 |
|
718 |
-
#: admin/views/class-view-general.php:
|
719 |
msgid "Allow users to be assigned more than a single role."
|
720 |
msgstr ""
|
721 |
|
722 |
-
#: admin/views/class-view-general.php:
|
723 |
msgid "Enable the content permissions feature."
|
724 |
msgstr ""
|
725 |
|
726 |
-
#: admin/views/class-view-general.php:
|
727 |
msgid "Enable the login form widget."
|
728 |
msgstr ""
|
729 |
|
730 |
-
#: admin/views/class-view-general.php:
|
731 |
msgid "Enable the users widget."
|
732 |
msgstr ""
|
733 |
|
734 |
-
#: admin/views/class-view-general.php:
|
735 |
msgid "Redirect all logged-out users to the login page before allowing them to view the site."
|
736 |
msgstr ""
|
737 |
|
738 |
-
#: admin/views/class-view-general.php:
|
739 |
msgid "Require authentication for access to the REST API."
|
740 |
msgstr ""
|
741 |
|
742 |
-
#: admin/views/class-view-general.php:
|
743 |
msgid "Show error message for feed items."
|
744 |
msgstr ""
|
745 |
|
746 |
-
#: admin/views/class-view-general.php:
|
747 |
msgid "Update Settings"
|
748 |
msgstr ""
|
749 |
|
750 |
-
#: admin/views/class-view-general.php:
|
751 |
msgid "Role and Capabilities"
|
752 |
msgstr ""
|
753 |
|
754 |
-
#: admin/views/class-view-general.php:
|
755 |
msgid "The role manager allows you to manage roles on your site by giving you the ability to create, edit, and delete any role. Note that changes to roles do not change settings for the Members plugin. You are literally changing data in your WordPress database. This plugin feature merely provides an interface for you to make these changes."
|
756 |
msgstr ""
|
757 |
|
758 |
-
#: admin/views/class-view-general.php:
|
759 |
msgid "The multiple user roles feature allows you to assign more than one role to each user from the edit user screen."
|
760 |
msgstr ""
|
761 |
|
762 |
-
#: admin/views/class-view-general.php:
|
763 |
msgid "Tick the checkbox for denied capabilities to always take precedence over granted capabilities when there is a conflict. This is only relevant when using multiple roles per user."
|
764 |
msgstr ""
|
765 |
|
766 |
-
#: admin/views/class-view-general.php:
|
767 |
msgid "Tick the checkbox to show human-readable capabilities when possible. Note that custom capabilities and capabilities from third-party plugins will show the machine-readable capability name unless they are registered."
|
768 |
msgstr ""
|
769 |
|
770 |
-
#: admin/views/class-view-general.php:
|
771 |
msgid "The content permissions features adds a meta box to the edit post screen that allows you to grant permissions for who can read the post content based on the user's role. Only users of roles with the %s capability will be able to use this component."
|
772 |
msgstr ""
|
773 |
|
774 |
-
#: admin/views/class-view-general.php:
|
775 |
msgid "The sidebar widgets feature adds additional widgets for use in your theme's sidebars."
|
776 |
msgstr ""
|
777 |
|
778 |
-
#: admin/views/class-view-general.php:
|
779 |
msgid "The private site feature redirects all users who are not logged into the site to the login page, creating an entirely private site. You may also replace your feed content with a custom error message."
|
780 |
msgstr ""
|
781 |
|
@@ -1223,15 +1260,15 @@ msgstr ""
|
|
1223 |
msgid "You must be logged into the site to view this content."
|
1224 |
msgstr ""
|
1225 |
|
1226 |
-
#: inc/functions-private-site.php:
|
1227 |
msgid "You are not currently logged in."
|
1228 |
msgstr ""
|
1229 |
|
1230 |
-
#: inc/functions-private-site.php:
|
1231 |
msgid "You do not currently have access to the \"%s\" site. If you believe you should have access, please contact your network administrator."
|
1232 |
msgstr ""
|
1233 |
|
1234 |
-
#: inc/functions-private-site.php:
|
1235 |
msgid "If you reached this page by accident and meant to visit one of your own sites, try one of the following links."
|
1236 |
msgstr ""
|
1237 |
|
@@ -1243,7 +1280,7 @@ msgstr ""
|
|
1243 |
msgid "Method does not exist."
|
1244 |
msgstr ""
|
1245 |
|
1246 |
-
#: members.php:
|
1247 |
msgid "Members requires PHP version %1$s. You are running version %2$s. Please upgrade and try again."
|
1248 |
msgstr ""
|
1249 |
#. Plugin Name of the plugin/theme
|
1 |
+
# Copyright (C) 2019 Members
|
2 |
# This file is distributed under the same license as the Members package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Members 2.2.0-alpha\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/members\n"
|
7 |
+
"POT-Creation-Date: 2019-07-20 01:10:06+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2019-MO-DA HO:MI+ZONE\n"
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
75 |
msgid "Deny"
|
76 |
msgstr ""
|
77 |
|
78 |
+
#: _assets/class-cap-list-table.php:377 admin/class-role-list-table.php:355
|
79 |
#: admin/class-role-new.php:335 admin/functions-admin.php:46
|
80 |
msgid "Edit"
|
81 |
msgstr ""
|
83 |
#: _assets/class-cap-list-table.php:381 _assets/class-cap-list-table.php:520
|
84 |
#: _assets/class-capability-list-table.php:264
|
85 |
#: _assets/class-capability-list-table.php:387
|
86 |
+
#: admin/class-role-list-table.php:359 admin/class-role-list-table.php:508
|
87 |
msgid "Delete"
|
88 |
msgstr ""
|
89 |
|
90 |
+
#: _assets/class-cap-list-table.php:387 admin/class-role-list-table.php:365
|
91 |
msgid "View"
|
92 |
msgstr ""
|
93 |
|
94 |
#: _assets/class-cap-list-table.php:452
|
95 |
#: _assets/class-capability-list-table.php:319
|
96 |
+
#: admin/class-role-list-table.php:418
|
97 |
msgid "All %s"
|
98 |
msgid_plural "All %s"
|
99 |
msgstr[0] ""
|
101 |
|
102 |
#: _assets/class-cap-list-table.php:464
|
103 |
#: _assets/class-capability-list-table.php:320
|
104 |
+
#: admin/class-role-list-table.php:423
|
105 |
msgid "Mine %s"
|
106 |
msgid_plural "Mine %s"
|
107 |
msgstr[0] ""
|
192 |
msgstr ""
|
193 |
|
194 |
#: _assets/class-caps.php:212 admin/class-roles.php:210
|
195 |
+
#: admin/functions-help.php:46 admin/views/class-view-addons.php:173
|
196 |
msgid "Overview"
|
197 |
msgstr ""
|
198 |
|
329 |
msgstr ""
|
330 |
|
331 |
#: admin/class-meta-box-content-permissions.php:115
|
332 |
+
#: admin/views/class-view-general.php:63 admin/views/class-view-general.php:363
|
333 |
msgid "Content Permissions"
|
334 |
msgstr ""
|
335 |
|
355 |
msgid "Add New"
|
356 |
msgstr ""
|
357 |
|
358 |
+
#: admin/class-meta-box-publish-role.php:104
|
359 |
+
msgid "%s User"
|
360 |
+
msgid_plural "%s Users"
|
361 |
+
msgstr[0] ""
|
362 |
+
msgstr[1] ""
|
363 |
+
|
364 |
+
#: admin/class-meta-box-publish-role.php:110
|
365 |
msgid "Users:"
|
366 |
msgstr ""
|
367 |
|
368 |
+
#: admin/class-meta-box-publish-role.php:117
|
369 |
msgid "Granted:"
|
370 |
msgstr ""
|
371 |
|
372 |
+
#: admin/class-meta-box-publish-role.php:123
|
373 |
msgid "Denied:"
|
374 |
msgstr ""
|
375 |
|
376 |
+
#: admin/class-meta-box-publish-role.php:134
|
377 |
msgctxt "delete role"
|
378 |
msgid "Delete"
|
379 |
msgstr ""
|
380 |
|
381 |
+
#: admin/class-meta-box-publish-role.php:141
|
382 |
msgid "Update"
|
383 |
msgstr ""
|
384 |
|
385 |
+
#: admin/class-meta-box-publish-role.php:141
|
386 |
msgid "Add Role"
|
387 |
msgstr ""
|
388 |
|
429 |
msgid "Your Role"
|
430 |
msgstr ""
|
431 |
|
432 |
+
#: admin/class-role-list-table.php:370
|
433 |
msgid "Clone"
|
434 |
msgstr ""
|
435 |
|
436 |
+
#: admin/class-role-list-table.php:374
|
437 |
msgid "Change Default"
|
438 |
msgstr ""
|
439 |
|
440 |
+
#: admin/class-role-list-table.php:378 admin/class-roles.php:69
|
441 |
#: inc/class-widget-users.php:59 inc/functions-cap-groups.php:121
|
442 |
msgid "Users"
|
443 |
msgstr ""
|
444 |
|
445 |
+
#: admin/class-role-list-table.php:428
|
446 |
msgid "Has Users %s"
|
447 |
msgid_plural "Has Users %s"
|
448 |
msgstr[0] ""
|
449 |
msgstr[1] ""
|
450 |
|
451 |
+
#: admin/class-role-list-table.php:433
|
452 |
msgid "No Users %s"
|
453 |
msgid_plural "No Users %s"
|
454 |
msgstr[0] ""
|
455 |
msgstr[1] ""
|
456 |
|
457 |
+
#: admin/class-role-list-table.php:438
|
458 |
msgid "Editable %s"
|
459 |
msgid_plural "Editable %s"
|
460 |
msgstr[0] ""
|
461 |
msgstr[1] ""
|
462 |
|
463 |
+
#: admin/class-role-list-table.php:443
|
464 |
msgid "Uneditable %s"
|
465 |
msgid_plural "Uneditable %s"
|
466 |
msgstr[0] ""
|
546 |
msgid "You can permanently delete multiple roles at once. Select the roles you want to act on using the checkboxes, then select the action you want to take from the Bulk Actions menu and click Apply."
|
547 |
msgstr ""
|
548 |
|
549 |
+
#: admin/class-settings.php:175 admin/class-settings.php:176
|
550 |
+
#: admin/class-settings.php:276
|
551 |
msgctxt "admin screen"
|
552 |
msgid "Members"
|
553 |
msgstr ""
|
554 |
|
555 |
+
#: admin/class-user-edit.php:97 admin/class-user-new.php:109
|
556 |
msgid "User Roles"
|
557 |
msgstr ""
|
558 |
|
628 |
msgid "Add-Ons"
|
629 |
msgstr ""
|
630 |
|
631 |
+
#: admin/functions-settings.php:57
|
632 |
+
msgid "Help Fund Version 3.0"
|
633 |
msgstr ""
|
634 |
|
635 |
+
#: admin/views/class-view-addons.php:65
|
636 |
+
msgid "Go Pro With Members Add-ons"
|
637 |
msgstr ""
|
638 |
|
639 |
+
#: admin/views/class-view-addons.php:68
|
640 |
+
msgid "Take your membership site to the next level with add-ons. Pro users also enjoy live chat support and support forum access."
|
641 |
+
msgstr ""
|
642 |
+
|
643 |
+
#: admin/views/class-view-addons.php:71
|
644 |
+
msgid "Upgrade To Pro"
|
645 |
msgstr ""
|
646 |
|
647 |
+
#: admin/views/class-view-addons.php:74
|
648 |
+
msgid "Purchase Support-Only Membership"
|
649 |
msgstr ""
|
650 |
|
651 |
+
#: admin/views/class-view-addons.php:99
|
652 |
+
msgid "There are currently no add-ons to show. Please try again later."
|
653 |
+
msgstr ""
|
654 |
+
|
655 |
+
#: admin/views/class-view-addons.php:182
|
656 |
+
msgid "Download"
|
657 |
msgstr ""
|
658 |
|
659 |
+
#: admin/views/class-view-addons.php:191
|
660 |
+
msgid "Purchase"
|
661 |
+
msgstr ""
|
662 |
+
|
663 |
+
#: admin/views/class-view-addons.php:210
|
664 |
msgid "The Add-Ons screen allows you to view available add-ons for the Members plugin. You can download some plugins directly. Others may be available to purchase."
|
665 |
msgstr ""
|
666 |
|
667 |
+
#: admin/views/class-view-addons.php:224
|
668 |
msgid "Some plugins may be available for direct download. In such cases, you can click the download button to get a ZIP file of the plugin."
|
669 |
msgstr ""
|
670 |
|
671 |
+
#: admin/views/class-view-addons.php:238
|
672 |
msgid "Some add-ons may require purchase before downloading them. Clicking the purchase button will take you off-site to view the add-on in more detail."
|
673 |
msgstr ""
|
674 |
|
675 |
+
#: admin/views/class-view-donate.php:50
|
676 |
+
msgid "Donate Toward Future Development"
|
677 |
+
msgstr ""
|
678 |
+
|
679 |
+
#: admin/views/class-view-donate.php:54
|
680 |
+
msgid "The Members plugin needs funding to cover development costs toward version 3.0."
|
681 |
+
msgstr ""
|
682 |
+
|
683 |
+
#: admin/views/class-view-donate.php:58
|
684 |
+
msgid "Members itself will always remain free as long as I'm able to work on it. However, it is easily my largest and most complex plugin. A major update takes 100s of hours of development. If every user would donate just $1, it would fund fulltime development of this plugin for at least 3 years. Of course, it's not a reality that everyone is able donate. Pitching in any amount will help."
|
685 |
+
msgstr ""
|
686 |
+
|
687 |
+
#: admin/views/class-view-donate.php:62
|
688 |
+
msgid "Donate Via PayPal"
|
689 |
+
msgstr ""
|
690 |
+
|
691 |
+
#: admin/views/class-view-donate.php:65
|
692 |
+
msgid "Learn More"
|
693 |
+
msgstr ""
|
694 |
+
|
695 |
+
#: admin/views/class-view-general.php:64 admin/views/class-view-general.php:372
|
696 |
msgid "Sidebar Widgets"
|
697 |
msgstr ""
|
698 |
|
699 |
+
#: admin/views/class-view-general.php:65 admin/views/class-view-general.php:381
|
700 |
msgid "Private Site"
|
701 |
msgstr ""
|
702 |
|
736 |
msgid "Feed Error Message"
|
737 |
msgstr ""
|
738 |
|
739 |
+
#: admin/views/class-view-general.php:129
|
740 |
msgid "Your roles and capabilities will not revert back to their previous settings after deactivating or uninstalling this plugin, so use this feature wisely."
|
741 |
msgstr ""
|
742 |
|
743 |
+
#: admin/views/class-view-general.php:144
|
744 |
msgid "Enable the role manager."
|
745 |
msgstr ""
|
746 |
|
747 |
+
#: admin/views/class-view-general.php:162
|
748 |
msgid "Denied capabilities should always overrule granted capabilities."
|
749 |
msgstr ""
|
750 |
|
751 |
+
#: admin/views/class-view-general.php:169
|
752 |
msgid "Show human-readable capabilities when possible."
|
753 |
msgstr ""
|
754 |
|
755 |
+
#: admin/views/class-view-general.php:187
|
756 |
msgid "Allow users to be assigned more than a single role."
|
757 |
msgstr ""
|
758 |
|
759 |
+
#: admin/views/class-view-general.php:202
|
760 |
msgid "Enable the content permissions feature."
|
761 |
msgstr ""
|
762 |
|
763 |
+
#: admin/views/class-view-general.php:237
|
764 |
msgid "Enable the login form widget."
|
765 |
msgstr ""
|
766 |
|
767 |
+
#: admin/views/class-view-general.php:252
|
768 |
msgid "Enable the users widget."
|
769 |
msgstr ""
|
770 |
|
771 |
+
#: admin/views/class-view-general.php:267
|
772 |
msgid "Redirect all logged-out users to the login page before allowing them to view the site."
|
773 |
msgstr ""
|
774 |
|
775 |
+
#: admin/views/class-view-general.php:282
|
776 |
msgid "Require authentication for access to the REST API."
|
777 |
msgstr ""
|
778 |
|
779 |
+
#: admin/views/class-view-general.php:297
|
780 |
msgid "Show error message for feed items."
|
781 |
msgstr ""
|
782 |
|
783 |
+
#: admin/views/class-view-general.php:333
|
784 |
msgid "Update Settings"
|
785 |
msgstr ""
|
786 |
|
787 |
+
#: admin/views/class-view-general.php:354
|
788 |
msgid "Role and Capabilities"
|
789 |
msgstr ""
|
790 |
|
791 |
+
#: admin/views/class-view-general.php:400
|
792 |
msgid "The role manager allows you to manage roles on your site by giving you the ability to create, edit, and delete any role. Note that changes to roles do not change settings for the Members plugin. You are literally changing data in your WordPress database. This plugin feature merely provides an interface for you to make these changes."
|
793 |
msgstr ""
|
794 |
|
795 |
+
#: admin/views/class-view-general.php:404
|
796 |
msgid "The multiple user roles feature allows you to assign more than one role to each user from the edit user screen."
|
797 |
msgstr ""
|
798 |
|
799 |
+
#: admin/views/class-view-general.php:408
|
800 |
msgid "Tick the checkbox for denied capabilities to always take precedence over granted capabilities when there is a conflict. This is only relevant when using multiple roles per user."
|
801 |
msgstr ""
|
802 |
|
803 |
+
#: admin/views/class-view-general.php:412
|
804 |
msgid "Tick the checkbox to show human-readable capabilities when possible. Note that custom capabilities and capabilities from third-party plugins will show the machine-readable capability name unless they are registered."
|
805 |
msgstr ""
|
806 |
|
807 |
+
#: admin/views/class-view-general.php:426
|
808 |
msgid "The content permissions features adds a meta box to the edit post screen that allows you to grant permissions for who can read the post content based on the user's role. Only users of roles with the %s capability will be able to use this component."
|
809 |
msgstr ""
|
810 |
|
811 |
+
#: admin/views/class-view-general.php:440
|
812 |
msgid "The sidebar widgets feature adds additional widgets for use in your theme's sidebars."
|
813 |
msgstr ""
|
814 |
|
815 |
+
#: admin/views/class-view-general.php:454
|
816 |
msgid "The private site feature redirects all users who are not logged into the site to the login page, creating an entirely private site. You may also replace your feed content with a custom error message."
|
817 |
msgstr ""
|
818 |
|
1260 |
msgid "You must be logged into the site to view this content."
|
1261 |
msgstr ""
|
1262 |
|
1263 |
+
#: inc/functions-private-site.php:167
|
1264 |
msgid "You are not currently logged in."
|
1265 |
msgstr ""
|
1266 |
|
1267 |
+
#: inc/functions-private-site.php:191
|
1268 |
msgid "You do not currently have access to the \"%s\" site. If you believe you should have access, please contact your network administrator."
|
1269 |
msgstr ""
|
1270 |
|
1271 |
+
#: inc/functions-private-site.php:198
|
1272 |
msgid "If you reached this page by accident and meant to visit one of your own sites, try one of the following links."
|
1273 |
msgstr ""
|
1274 |
|
1280 |
msgid "Method does not exist."
|
1281 |
msgstr ""
|
1282 |
|
1283 |
+
#: members.php:323
|
1284 |
msgid "Members requires PHP version %1$s. You are running version %2$s. Please upgrade and try again."
|
1285 |
msgstr ""
|
1286 |
#. Plugin Name of the plugin/theme
|
members.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Members
|
4 |
* Plugin URI: https://themehybrid.com/plugins/members
|
5 |
* Description: A user and role management plugin that puts you in full control of your site's permissions. This plugin allows you to edit your roles and their capabilities, clone existing roles, assign multiple roles per user, block post content, or even make your site completely private.
|
6 |
-
* Version: 2.
|
7 |
* Author: Justin Tadlock
|
8 |
* Author URI: https://themehybrid.com
|
9 |
* Text Domain: members
|
@@ -25,7 +25,7 @@
|
|
25 |
* write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
26 |
*
|
27 |
* @package Members
|
28 |
-
* @version 2.
|
29 |
* @author Justin Tadlock <justintadlock@gmail.com>
|
30 |
* @copyright Copyright (c) 2009 - 2018, Justin Tadlock
|
31 |
* @link https://themehybrid.com/plugins/members
|
3 |
* Plugin Name: Members
|
4 |
* Plugin URI: https://themehybrid.com/plugins/members
|
5 |
* Description: A user and role management plugin that puts you in full control of your site's permissions. This plugin allows you to edit your roles and their capabilities, clone existing roles, assign multiple roles per user, block post content, or even make your site completely private.
|
6 |
+
* Version: 2.2.0
|
7 |
* Author: Justin Tadlock
|
8 |
* Author URI: https://themehybrid.com
|
9 |
* Text Domain: members
|
25 |
* write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
26 |
*
|
27 |
* @package Members
|
28 |
+
* @version 2.2.0
|
29 |
* @author Justin Tadlock <justintadlock@gmail.com>
|
30 |
* @copyright Copyright (c) 2009 - 2018, Justin Tadlock
|
31 |
* @link https://themehybrid.com/plugins/members
|
readme.md
CHANGED
@@ -67,9 +67,35 @@ Every capability can have one of three "states" for a role. The role can be *gr
|
|
67 |
* **Denying** a capability means that the role's users are explicitly denied permission.
|
68 |
* A role that is neither granted nor denied a capability simply doesn't have that capability.
|
69 |
|
70 |
-
**Note
|
71 |
|
72 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
### Multiple user roles
|
75 |
|
67 |
* **Denying** a capability means that the role's users are explicitly denied permission.
|
68 |
* A role that is neither granted nor denied a capability simply doesn't have that capability.
|
69 |
|
70 |
+
**Note:** When assigning multiple roles to a single user that have a conflicting capability (e.g., granted `publish_posts` and denied `published_posts` cap), it's best to enable the denied capabilities override via the Members Settings screen. This will consistently make sure that denied capabilities always overrule granted capabilities. With this setting disabled, WordPress will decide based on the *last* role given to the user, which can mean for extremely inconsistent behavior depending on the roles a user has.
|
71 |
|
72 |
+
#### How denied capabilities work
|
73 |
+
|
74 |
+
Suppose the **Super** role is *granted* these capabilities:
|
75 |
+
|
76 |
+
* `edit_posts`
|
77 |
+
|
78 |
+
Then, suppose the **Duper** role is *granted* these capabilities:
|
79 |
+
|
80 |
+
- `publish_posts`
|
81 |
+
- `edit_products`
|
82 |
+
|
83 |
+
Now, further suppose **User A** has the **Super** role because you want them to edit posts. However, you also want **User A** to be able to edit products so you assign them the **Duper** role. Suddenly, **User A** is *granted* the following capabilities:
|
84 |
+
|
85 |
+
- `edit_posts`
|
86 |
+
- `publish_posts`
|
87 |
+
- `edit_products`
|
88 |
+
|
89 |
+
For whatever reason you don't ever want users with the **Super** role to be able to publish posts. Now you have a problem. One way to solve this is to create a third role with just the caps that you want and give that single role to **User A**. However, that becomes cumbersome on larger sites with many roles.
|
90 |
+
|
91 |
+
Instead, you could explicitly *deny* the publish posts capability to the **Super** role. When you do that, **User A** is only *granted* the following capabilities:
|
92 |
+
|
93 |
+
- `edit_posts`
|
94 |
+
- `edit_products`
|
95 |
+
|
96 |
+
And is denied the following capabilities:
|
97 |
+
|
98 |
+
- `publish_posts`
|
99 |
|
100 |
### Multiple user roles
|
101 |
|
readme.txt
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
=== Members ===
|
2 |
|
3 |
Contributors: greenshady
|
4 |
-
Donate link: https://themehybrid.com/donate
|
5 |
Tags: capabilities, roles, members, users
|
6 |
Requires at least: 4.7
|
7 |
-
Tested up to:
|
8 |
Requires PHP: 5.6
|
9 |
-
Stable tag: 2.
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
@@ -30,14 +30,14 @@ It puts you in control over permissions on your site by providing a user interfa
|
|
30 |
* **Private Site:** You can make your site and its feed completely private if you want.
|
31 |
* **Plugin Integration:** Members is highly recommended by other WordPress developers. Many existing plugins integrate their custom roles and caps directly into it.
|
32 |
|
33 |
-
For more info,
|
34 |
|
35 |
### Like this plugin?
|
36 |
|
37 |
The Members plugin is a massive project with 1,000s of lines of code to maintain. A major update can take weeks or months of work. I don't make any money directly from this plugin while other, similar plugins charge substantial fees to even download them or get updates. Please consider helping the cause by:
|
38 |
|
39 |
-
* [Making a donation](https://themehybrid.com/donate).
|
40 |
-
* [Signing up at my site](https://themehybrid.com/
|
41 |
* [Rating the plugin](https://wordpress.org/support/view/plugin-reviews/members?rate=5#postform).
|
42 |
|
43 |
### Professional Support
|
@@ -108,4 +108,4 @@ If upgrading from a version prior to 2.0.0, please note that the plugin now requ
|
|
108 |
|
109 |
== Changelog ==
|
110 |
|
111 |
-
The change log is located in the `changelog.md` file in the plugin folder. You may also [view the change log](https://github.com/justintadlock/members/blob/master/changelog.md) online.
|
1 |
=== Members ===
|
2 |
|
3 |
Contributors: greenshady
|
4 |
+
Donate link: https://themehybrid.com/plugins/members#donate
|
5 |
Tags: capabilities, roles, members, users
|
6 |
Requires at least: 4.7
|
7 |
+
Tested up to: 5.2
|
8 |
Requires PHP: 5.6
|
9 |
+
Stable tag: 2.2.0
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
30 |
* **Private Site:** You can make your site and its feed completely private if you want.
|
31 |
* **Plugin Integration:** Members is highly recommended by other WordPress developers. Many existing plugins integrate their custom roles and caps directly into it.
|
32 |
|
33 |
+
For more info, visit the [Members plugin home page](https://themehybrid.com/plugins/members).
|
34 |
|
35 |
### Like this plugin?
|
36 |
|
37 |
The Members plugin is a massive project with 1,000s of lines of code to maintain. A major update can take weeks or months of work. I don't make any money directly from this plugin while other, similar plugins charge substantial fees to even download them or get updates. Please consider helping the cause by:
|
38 |
|
39 |
+
* [Making a donation](https://themehybrid.com/plugins/members#donate).
|
40 |
+
* [Signing up at my site](https://themehybrid.com/plugins/members).
|
41 |
* [Rating the plugin](https://wordpress.org/support/view/plugin-reviews/members?rate=5#postform).
|
42 |
|
43 |
### Professional Support
|
108 |
|
109 |
== Changelog ==
|
110 |
|
111 |
+
The change log is located in the `changelog.md` file in the plugin folder. You may also [view the change log](https://github.com/justintadlock/members/blob/master/changelog.md) online.
|