PluginProbe ʕ •ᴥ•ʔ
Easy Updates Manager / 9.0.7
Easy Updates Manager v9.0.7
trunk 2.0.0 2.1.0 2.2.0 2.2.1 2.3.0 2.4.0 2.5.0 2.5.1 2.6.0 2.7.0 3.0.0 3.1.0 3.2.0 3.3.0 3.4.0 3.5.0 3.6.0 4.0 4.0.2 4.0.3 4.1.0 4.1.10 4.1.12 4.2.21 4.2.24 4.3.0 4.3.10 4.3.12 4.3.13 4.6.0 4.7.0 5.0.0 5.1.0 5.1.1 5.2.0 5.3.0 5.3.1 5.3.2 5.4.0 5.4.1 5.4.2 5.4.3 5.4.5 6.0.0 6.0.1 6.0.3 6.0.5 6.1.0 6.1.1 6.1.3 6.1.5 6.1.8 6.2.0 6.2.11 6.2.2 6.2.3 6.2.5 6.2.7 6.2.9 6.3.0 6.3.1 6.3.3 6.4.0 6.4.4 6.4.6 6.4.7 6.4.8 7.0.0 7.0.1 7.0.2 7.0.3 8.0.1 8.0.2 8.0.3 8.0.5 8.1.0 8.1.1 8.2.0 9.0.0 9.0.1 9.0.10 9.0.11 9.0.12 9.0.13 9.0.14 9.0.15 9.0.16 9.0.17 9.0.18 9.0.19 9.0.20 9.0.21 9.0.3 9.0.5 9.0.6 9.0.7 9.0.8 9.0.9
stops-core-theme-and-plugin-updates / templates / exclude-users.php
stops-core-theme-and-plugin-updates / templates Last commit date
notices 5 years ago admin-bar.php 7 years ago admin-tab-advanced.php 7 years ago admin-tab-logs.php 5 years ago admin-tab-main.php 7 years ago admin-tab-plugins.php 5 years ago admin-tab-themes.php 5 years ago advanced-premium-preview.php 7 years ago advanced-premium.php 5 years ago exclude-users.php 5 years ago force-updates.php 5 years ago reset-options.php 5 years ago
exclude-users.php
41 lines
1 <?php
2 if (!defined('ABSPATH')) die('No direct access.');
3
4 echo '<div class="eum-advanced-settings-container exclude-users" style="display: block;">';
5 printf('<h3>%s</h3>', esc_html__('Exclude users', 'stops-core-theme-and-plugin-updates'));
6 printf('<p>%s</p>', esc_html__('Select users who will be forbidden to access the settings of this plugin.', 'stops-core-theme-and-plugin-updates'));
7 printf('<p>%s</p>', esc_html__('This option is useful if, for example, you would like to disable updates, but have a user account that can still update WordPress.', 'stops-core-theme-and-plugin-updates'));
8 printf('<p><strong>%s</strong></p>', esc_html__('Users to be forbidden', 'stops-core-theme-and-plugin-updates'));
9
10 // Code from wp-admin/includes/class-wp-ms-users-list-table
11 $users = array();
12 if (is_multisite()) {
13 global $wpdb;
14 $logins = implode("', '", get_super_admins());
15 $users = $wpdb->get_col("SELECT ID FROM $wpdb->users WHERE user_login IN ('$logins') GROUP BY user_login");
16 } else {
17 /**
18 * Determine which role gets queried for admin users.
19 *
20 * Determine which role gets queried for admin users.
21 *
22 * @since 5.0.0
23 *
24 * @param string $var administrator.
25 */
26 $role = apply_filters('mpsum_admin_role', 'administrator');
27 $users = get_users(array('role' => $role, 'orderby' => 'display_name', 'order' => 'ASC', 'fields' => 'ID'));
28 }
29 if (is_array($users) && !empty($users)) {
30 echo '<input type="hidden" value="0" name="mpsum_excluded_users[]" />';
31 $options = MPSUM_Updates_Manager::get_options('advanced');
32 $excluded_users = isset($options['excluded_users']) ? $options['excluded_users'] : array();
33 foreach ($users as $index => $user_id) {
34 $user = get_userdata($user_id);
35 $disabled = get_current_user_id() === absint($user_id) ? 'disabled="true"' : '';
36 printf('<input type="checkbox" name="mpsum_excluded_users[]" id="mpsum_user_%1$d" value="%1$d" %3$s %4$s />&nbsp;<label for="mpsum_user_%1$d">%2$s</label><br />', esc_attr($user_id), esc_html($user->display_name), checked(true, in_array($user_id, $excluded_users), false), $disabled);
37 }
38 }
39 printf('<p class="submit"><input type="submit" name="submit" id="save-excluded-users" class="button button-primary" value="%s"></p>', esc_attr__('Save users', 'stops-core-theme-and-plugin-updates'));
40 echo '</div>';
41