Add a UI hint for managing capabilities using the Members plugin [MAILPOET-1123]

This commit is contained in:
stoletniy
2017-10-02 12:01:24 +03:00
committed by pavel-mailpoet
parent db226b54a8
commit 92dbf966a1
2 changed files with 22 additions and 0 deletions

View File

@ -411,6 +411,7 @@ class Menu {
'premium_key_valid' => !empty($this->premium_key_valid), 'premium_key_valid' => !empty($this->premium_key_valid),
'mss_active' => Bridge::isMPSendingServiceEnabled(), 'mss_active' => Bridge::isMPSendingServiceEnabled(),
'mss_key_valid' => !empty($mp_api_key_valid), 'mss_key_valid' => !empty($mp_api_key_valid),
'members_plugin_active' => is_plugin_active('members/members.php'),
'pages' => Pages::getAll(), 'pages' => Pages::getAll(),
'flags' => $flags, 'flags' => $flags,
'current_user' => wp_get_current_user(), 'current_user' => wp_get_current_user(),

View File

@ -67,6 +67,27 @@
</p> </p>
</td> </td>
</tr> </tr>
<!-- roles and capabilities -->
<tr>
<th scope="row">
<%= __('Roles and capabilities') %>
<p class="description">
<%= __('Manage which WordPress roles access which features of MailPoet.') %>
</p>
</th>
<td>
<% if (members_plugin_active) %>
<p>
<a href="<%= admin_url('users.php?page=roles') %>"><%= __('Manage using the Members plugin') %></a>
</p>
<% else %>
<%= __('Install the plugin [link]Members[/link] (free) to manage permissions.')
|replaceLinkTags('https://wordpress.org/plugins/members/', {'target' : '_blank'})
|raw
%>
<% endif %>
</td>
</tr>
<!-- link tracking --> <!-- link tracking -->
<tr> <tr>
<th scope="row"> <th scope="row">