Adminimize - Version 1.10.4

Version Description

(2016-06-03) = * Add support for multiple roles to remove the Admin Bar via global options. * Add support for multiple roles to remove the Admin Bar Back end items. * Add also this support for Front End Admin Bar items. * Multiple roles supported now on "Menu Options", "Global Options", "Admin Bar Back end options" and "Admin Bar Front end options".

Download this release

Release Info

Developer Bueltge
Plugin Icon wp plugin Adminimize
Version 1.10.4
Comparing to
See all releases

Code changes from version 1.10.3 to 1.10.4

CHANGELOG.md ADDED
@@ -0,0 +1,374 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## 1.10.4
2
+ * Add support for multiple roles to remove the Admin Bar via global options.
3
+ * Add support for multiple roles to remove the Admin Bar Back end items.
4
+ * Add also this support for Front End Admin Bar items.
5
+ * Multiple roles supported now on "Menu Options", "Global Options", "Admin Bar Back end options" and "Admin Bar Front end options".
6
+
7
+ ## 1.10.3
8
+ * Fix exclude of set new Admin Bar on settings page of Adminimize.
9
+ * Fix check for settings page.
10
+ * Fix colors on raw, column of the settings page.
11
+ * Add buffering for debug helper in the console.
12
+ * Fix caching for Dashboard Widget options.
13
+
14
+ ## 1.10.2
15
+ * Add possibility for custom menu slugs, especially for Plugins, Themes, there add different slug for different roles.
16
+ * Add the possibility to use the WP object cache for settings, if the webspace support this, like Memcached, APC.
17
+ * More clarity for the "own options" label.
18
+
19
+ ## 1.10.1
20
+ * Fix the Removing of Admin Color Scheme Select on the profile page.
21
+ * Back-end options are also excluded on the settings page.
22
+ * Add new settings area for options of the plugin self.
23
+ * The support for multiple roles is now optional.
24
+ * The support for bbPress is now active and optional.
25
+
26
+ ## 1.10.0
27
+ * Rewrite the Admin Bar settings, simplify the source and new hook to get and render the Admin Bar.
28
+ * Change settings screen for custom post type.
29
+ * Fix "select all" on Admin Bar settings.
30
+ * Fix exclude settings page for pages, there is the current screen not existent.
31
+ * Improve the exclude settings page function for hooks, there fired before `get_current_screen`.
32
+ * Remove more legacy code before WP 3.3.
33
+ * Change removal of Menu and Sub-Menu items to WP core functions, possible to non support older WP Versions.
34
+ * Supports multiple roles on "Menu Options" and "Global Options".
35
+ * Add possibility to hide Admin Notices globally, new setting point in "Global Options".
36
+
37
+ ## 1.9.2 (2016-01-30)
38
+ * Change get role name, return now a array with slug and name to fix "Select All" function for custom roles.
39
+ * Change Menu Items to Key value, not the id. Makes possible to hide also menu items, there have a stupid menu entry.
40
+ * Remove https fix; not necessary for the plugin. If you will usage, add this custom [plugin](https://gist.github.com/bueltge/01f37a868e2e1321b931).
41
+ * Update pot and de_De language files.
42
+
43
+ ## 1.9.1 (2016-25-01)
44
+ * Fixing ssl protocol in WP core on include styles and scripts.
45
+
46
+ ## 1.9.0 (2016-01-21)
47
+ * Change Ex-/Import functions to use JSON format and remove mysql topics, there no longer valid in WP core.
48
+ * Add more checks to hide also dynamically menu items, like Customizer.
49
+ * Update spanish and german language file.
50
+ * Fix PHP Warning [PHP Warning: in_array()](https://wordpress.org/support/topic/php-warning-in_array-expects-parameter-2-to-be-array?replies=3)
51
+ * Fix PHP Notice: Array to string conversion
52
+ * UI change: Fixed head on tables.
53
+ * Update italian language files, props to marcochiesi.
54
+ * Add global option to hide admin notices for each role.
55
+ * Replace static source to get option, only one function to get it.
56
+ * Change Admin Bar Feature: Difference between front-end and back-end.
57
+ * More stability on admin bar settings. Switch hook to set, get data of admin bar.
58
+ * Add possibility to select/unselect all checkboxes for each area.
59
+ * Fix redirect feature, if Dashboard menu item is active for a role.
60
+ * Remove functions for WordPress versions smaller 3.5.
61
+ * Remove css styles small WP 4.0
62
+ * Add minify js/css.
63
+ * Several code changes.
64
+ * Add custom fix for hide editors on post types.
65
+ * Several performance changes, like replace from `array_push`.
66
+ * Fix Role check, new function to fix [#22624](https://core.trac.wordpress.org/ticket/22624).
67
+ * Exclude Settings page and Super Admin from remove Dashboard function.
68
+
69
+ ## 1.8.5 (2015-03-19)
70
+ * Add brazilian portuguese translation, thanks to [Rafael Funchal](http://www.rafaelfunchal.com.br/)
71
+ * Small code changes for php notices
72
+ * Fix Admin Bar Feature
73
+ * Different code maintenance
74
+ * Enhance readme for helpful links under FAQ
75
+ * Fix to remove admin bar
76
+
77
+ ## 1.8.4 (06/06/2013)
78
+ * Change Widget Settings, better to unregister widgets from other themes and plugins
79
+ * Add more usability to the settings page
80
+ * Small major changes
81
+
82
+ ## 1.8.3 (04/07/2013)
83
+ * Fix for use it with bbPress
84
+ * Small minor changes
85
+
86
+ ## 1.8.2 (02/15/2013)
87
+ * Fix PHP Notice message for empty var, see [support](http://wordpress.org/support/topic/undefined-index-current_screen)
88
+ * Changes for load files and functions only, if it necessary
89
+ * Fix, that the changes on Admin Bar work always in all admin pages
90
+
91
+ ## 1.8.1 (01/10/2013)
92
+ * Fix PHP notice on message for network
93
+ * Check for active links manager; change from WP 3.5
94
+ * Add Widget settings (Beta)
95
+ * Fix for remove admin bar in backend
96
+ * Remove Backend options, there not usable with WP 3.5 and earlier
97
+ * Fix 'Category Height' on Meta Box on write post; See always all categories, without scrolling inside Meta Box
98
+ * Fix to hide footer, but this is still usable by adding custom content
99
+ * Fix Hints, Options for Multisite install
100
+ * Add Admin Bar options (Beta)
101
+
102
+ ## v1.8.0
103
+ * Simple Support for WP Multisite
104
+ * Enhancement for hide Text-Tab on editors in custom post types
105
+ * Small fix for PHP notice
106
+
107
+ ## v1.7.27
108
+ * Fix for hide Admin Bar in WP 3.4
109
+ * Fix for remove sections on custom post types in edit screen table
110
+ * Enhancements for reduce sections on edit post and page
111
+ * Enhancement for User Info to use also in Admin Bar in front end
112
+ * Fix for different pages in admin, see [forum thread](http://wordpress.org/support/topic/plugin-adminimize-hide-page-and-subpages-editphp)
113
+ * Fix, if you don't use redirect for php notice
114
+ * Add romanian language
115
+
116
+ ## v1.7.26
117
+ * Typo for settings message [see thread](http://wordpress.org/support/topic/plugin-adminimize-what-does-the-settings-page-ignores-this-settings-mean?replies=4)
118
+ * Fix for custom areas on Custom Post Types, [see thread](http://wordpress.org/support/topic/plugin-adminimize-bug-in-custom-metabox-ids-for-custom-types?replies=3)
119
+ * Exclude backend theme options, was used only smaller 2.0 of WP
120
+ * Exclude Hint in Footer
121
+ * Exclude write scroll options
122
+ * Different cleaner actions
123
+
124
+ ## v1.7.25
125
+ * Update for fix menu-items with entities
126
+ * [Fix](http://plugins.trac.wordpress.org/changeset/494274) for display settings on menu, if items are deactivated
127
+ * Add Separator to settings of menu, for hide this for different roles
128
+ * Add notice for settings page, that no settings work on this page
129
+ * Fix rewrite, if change the user info area and define an rewrite
130
+ * List Separator on menu-items; also possible to hide this
131
+
132
+ ## v1.7.24
133
+ * Maintenance: add ID for hide html-tab on Editor also in WP 3.3
134
+ * Bug fixing for WP 3.2.1 with the new functions :(
135
+
136
+ ## v1.7.23
137
+ * Maintenance: change function to remove admin bar for WP 3.3, see [Forum item](http://wordpress.org/support/topic/694201)
138
+ * Maintenance: change for USer Info to works also in WP 3.3
139
+
140
+ ## v1.7.22
141
+ * Security fix for $_GET on the admin-settings-page
142
+
143
+ ## v1.7.21
144
+ * SORRY: i had an svn bug; here the complete version
145
+ * no changes; only a new commit to svn
146
+
147
+ ## v1.7.20
148
+ * fix small bug for use plugin Localization
149
+ * add Dashboard Widgets to remove for different roles
150
+
151
+ ## v1.7.19
152
+ * fix page for links - `link.php`
153
+ * add irish language files
154
+ * add bulgarian language files
155
+
156
+ ## v1.7.18 (06/07/2011)
157
+ * Fixes Small User info on right top with Admin Bar, also ready for WP 3.2
158
+ * Fixes Error for xmlrpc
159
+ * Add QuickEdit-Areas for hide this
160
+ * Different changes on source
161
+ * With WP 3.2 remove all Admin Styles !
162
+ * Add support for custom post type
163
+ * many small changes on source
164
+ * update de_DE language files
165
+ * tested only in version 3.1 and 3.2-beta; don't test in smaller version
166
+ * add hindi language file
167
+
168
+ ## v1.7.17 (04/11/2011)
169
+ * Fixes on Admin-CSS Styles for WP 3.*
170
+ * Reduce backend Styles of the Plugins - Goal: kill all styles!!! (to heavy for Maintenance)
171
+
172
+ ## v1.7.16 (04/01/2011)
173
+ * Bug-fix: change init-function; admin bar also on frontend and backend and all other options of global only on backend
174
+ * Remove new hock on wp admin bar; include inline styles; only on deactivate admin bar
175
+ * Fix language errors
176
+ * Add meta box post formats
177
+ * Update de_DE language files
178
+
179
+ ## v1.7.15 (03/30/2011)
180
+ * Change functions for reduce WP Nav Menu
181
+ * change to check for super admin; add new function and option on Global Options to set this
182
+ * Maintenance: check for functions in Multisite, Super-admin for use the plugin smaller WP 3.0
183
+ * Feature: add css for more usability on settings
184
+ * Bug-fix: custom values for WP Nav Menu
185
+ * Add Option for Super Admin
186
+ * Change option for rewrite, after deactivate Dashboard; now you use a custom url, incl. http://
187
+ * Maintenance: Language File
188
+
189
+ ## v1.7.14 (03/03/2011)
190
+ * Maintenance: remove php notice on role editor
191
+ * Maintenance: Add fallback for don't load menu/sub-menu
192
+ * Maintenance: Exclude all options in different files
193
+
194
+ ## v1.7.13 (03/02/2011)
195
+ * Maintenance: different changes on code
196
+ * Maintenance: usable in WP 3.1
197
+ * Feature: Remove Admin Bar per role
198
+ * Feature: Add options for WP Nav Menu
199
+ * Bug-fix: php warning for wrong data-type [WP Forum](http://wordpress.org/support/topic/plugin-adminimize-warning-in-array)
200
+ * Bug-fix: php warning on foreach [WP Forum](http://wordpress.org/support/topic/plugin-adminimize-warning-error-invalid-argument-supplied-for-foreach)
201
+
202
+ ## v1.7.12 (10/02/2010)
203
+ * Bug-fix: Fallback for deactivate profile.php on roles smaller administration
204
+ * Bug-fix: Redirect from Dashboard on different roles
205
+ * Maintenance: small changes on code
206
+
207
+ ## v1.7.11 (09/24/2010)
208
+ * Bug-fix: for WP < 3.0; function get_post_type_object() is not exist
209
+
210
+ ## v1.7.10 (09/24/2010)
211
+ * Bug-fix: link-page in admin
212
+ * Bug-fix: meta-boxes on link-page
213
+ * Bug-fix: check for post or page with WP 3.*
214
+ * Maintenance: german language files
215
+ * Maintenance: pot-file
216
+ * Feature: new css for "User-info" in WP 3.0
217
+ * Maintenance: incl. the new css-file
218
+
219
+ ## v1.7.9 (09/15/2010)
220
+ * Bug-fix for new role-checking
221
+
222
+ ## v1.7.8 (09/13/2010)
223
+ * changes for WPMU and WP 3.0 MultiSite
224
+ * bug-fix for admin-menu in WPMU and WP 3.0 MultiSite
225
+ * bug-fix for meta boxes in WPMU and WP 3.0 MultiSite
226
+ * bug-fix for global settings in WPMU and WP 3.0 MultiSite
227
+ * bug-fix for link-options in WPMU and WP 3.0 MultiSite
228
+ * bug-fix for custom redirect after login
229
+ * different bug-fixes fpr php-warnings
230
+
231
+ ## v1.7.7 (03/18/2010)
232
+ * small fixes for redirect on deactivate Dashboard
233
+ * add dutch language file
234
+
235
+ ## v1.7.6 (01/14/2010)
236
+ * fix array-check on new option disable HTML Editor
237
+
238
+ ## v1.7.5 (01/13/2010)
239
+ * new function: disable HTML Editor on edit post/page
240
+
241
+ ## v1.7.4 (01/10/2010)
242
+ * Fix on Refresh menu and sub-menu on settings-page
243
+ * Fix for older WordPress versions and function current_theme_supports
244
+
245
+ ## v1.7.3 (01/08/2010)
246
+ * Add Im-/Export function
247
+ * Add new meta boxes from WP 2.9 post_thumbnail, if active from the Theme
248
+ * Small modifications and code and css
249
+ * Add new functions: hide tab for help and options on edit post or edit page; category meta box with ful height, etc.
250
+
251
+ ## v1.7.2 (07/08/2009)
252
+ * Add fix to deactivate user.php/profile.php
253
+
254
+ ## v1.7.1 (17/06/2009)
255
+ * Add belorussian language file, thanks to Fat Cow
256
+
257
+ ## v1.7.1 (16/06/2009)
258
+ * changes for load user date on settings themes; better for performance on blogs with many Users
259
+ * small bug-fixes on textdomain
260
+ * changes on hint for settings on menu
261
+ * new de_DE language file
262
+ * comments meta box add to options on post
263
+
264
+ ## v1.7 (23/06/2009)
265
+ * Bug-fix for WordPress 2.6; Settings-Link
266
+ * alternate for `before_last_bar()` and change class of div
267
+
268
+ ## 1.6.9 (19/06/2009)
269
+ * Bug-fix, Settingslink gefixt;
270
+ * Changes on own defines with css selectors; first name, second css selector
271
+ * Bug-fix in own options to pages
272
+
273
+ ## 1.6.8 (18/06/2009)
274
+ * Bug-fix in german language file
275
+
276
+ ## 1.6.6-7 (10/06/2009)
277
+ * Add Meta Link in 2.8
278
+
279
+ ## 1.6.5 (08/05/2009)
280
+ * Bug-fix, Doculink only on admin page of Adminimize
281
+
282
+ ## 1.6.4 (27/04/2009)
283
+ * new Backend-Themes
284
+ * more options
285
+ * multilanguage for role-names
286
+
287
+ ## 1.6.1, 1.6.3 (24/05/2009)
288
+ * ready for own roles
289
+ * new options for link-area on WP backend
290
+ * own options for all areas, use css selectors
291
+ * ...
292
+
293
+ ## v1.6
294
+ * ready for WP 2.7
295
+ * new options area, parting of page and post options
296
+ * add wp_nonce for own logout
297
+ * ...
298
+
299
+ ## v1.5.3-8
300
+ * Changes for WP 2.7
301
+ * changes on CSS design
302
+ * ...
303
+
304
+ ## v1.5.2
305
+ * own redirects possible
306
+
307
+ ## v1.5.1
308
+ * Bug-fix f&uuml;r rekursiven Array; Redirect bei deaktivem Dashboard funktionierte nicht
309
+
310
+ ## v1.5
311
+ * F&uuml;r jede Nutzerrolle besteht nun die M&uuml;glichkeit, eigene Menus und Metaboxes zu setzen. Erweiterungen im Backend-Bereich und Vorbereitung f&uuml;r WordPress Version 2.7
312
+
313
+ ## v1.4.7
314
+ * Bug-fix CSS-Adresse f&uuml;r WP 2.5
315
+
316
+ ## v1.4.3-6
317
+ * Aufrufe diverser JS ge&auml;ndert, einige &uuml;bergreifende Funktionen nun auch ohne aktives Adminimize-Theme
318
+
319
+ ## v1.4.2
320
+ * kleine Erweiterungen, Variablenabfragen ge&auml;ndert
321
+
322
+ ## v1.4.1
323
+ * Bug-fixes und Umstellung Sprache
324
+
325
+ ## v1.4
326
+ * Performanceoptimierung; <strong>Achtung:</strong> nur noch 1 Db-Eintrag, bei Update auf Version 1.4 zuvor die Deinstallation-Option nutzen und die Db von &uuml;berfl&uuml;ssigen Eintr&auml;gen befreien.
327
+
328
+ ## v1.3
329
+ * Backendfunktn. erweitert, Update f&uuml;r PressThis im Bereich Schreiben, etc.
330
+
331
+ ## v1.2
332
+ * Erweiterungen der MetaBoxen
333
+
334
+ ## v1.1
335
+ * Schreiben-, Verwalten-Bereich ist deaktivierbar; CSS-Erweiterungen des WP 2.3 Themes f&uuml;r WP 2.6; Sidebar im Schreiben-Bereich noch mehr konfigurierbar, Optionsseite ausgebaut, kleine Code-Ver&auml;nderungen
336
+
337
+ ## v1.0
338
+ * JavaScript schlanker durch die Hilfe von <a href="http://www.schloebe.de/">Oliver Schl&uuml;be</a>
339
+
340
+ ## v0.8.1
341
+ * Hinweis im Footer m&uuml;glich, optional mit optionalen Text, Weiterleitung immer ersichtlich
342
+
343
+ ## v0.8
344
+ * Weiterleitung nach Logout m&uuml;glich
345
+
346
+ ## v0.7.9
347
+ * Zus&auml;tzlich ist innerhalb der Kategorien nur "Kategorien hinzuf&uuml;gen" deaktiverbar
348
+
349
+ ## v0.7.8
350
+ * Mehrsprachigkeit erweitert
351
+
352
+ ## v0.7.7
353
+ * Bug-fix f&uuml;r Metabox ausblenden in Write Page
354
+
355
+ ## v0.7.6
356
+ * Checkbox f&uuml;r alle ausw&auml;hlen auch in Page und Post, Korrektur in Texten
357
+
358
+ ## v0.7.5
359
+ * Checkbox f&uuml;r alle ausw&auml;hlen, Theme zuweisen
360
+
361
+ ## v0.7.3
362
+ * Optionale Weiterleitung bei deaktiviertem Dashboard, Einstellungen per Plugin-Seite m&uuml;glich, Admin-Footer erg&auml;nzt um Plugin-infos
363
+
364
+ ## v0.7.2
365
+ * Update Options Button zus&auml;tzlich im oberen Abschnitt
366
+
367
+ ## v0.7.1
368
+ * Thickbox Funktion optional
369
+
370
+ ## v0.7
371
+ * WriteScroll optional, MediaButtons deaktivierbar
372
+
373
+ ## v0.6.9
374
+ * Theme WordPress 2.3 hinzugekommen, Footer deaktivierbar
LICENSE.txt CHANGED
File without changes
adminimize.php CHANGED
@@ -7,13 +7,13 @@
7
  * Description: Visually compresses the administrative meta-boxes so that more admin page content can be initially seen. The plugin that lets you hide 'unnecessary' items from the WordPress administration menu, for all roles of your install. You can also hide post meta controls on the edit-area to simplify the interface. It is possible to simplify the admin in different for all roles.
8
  * Author: Frank Bültge
9
  * Author URI: http://bueltge.de/
10
- * Version: 1.10.3
11
  * License: GPLv3+
12
  *
13
  * @package WordPress
14
  * @author Frank Bültge <frank@bueltge.de>
15
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
16
- * @version 2016-05-10
17
  */
18
 
19
  /**
7
  * Description: Visually compresses the administrative meta-boxes so that more admin page content can be initially seen. The plugin that lets you hide 'unnecessary' items from the WordPress administration menu, for all roles of your install. You can also hide post meta controls on the edit-area to simplify the interface. It is possible to simplify the admin in different for all roles.
8
  * Author: Frank Bültge
9
  * Author URI: http://bueltge.de/
10
+ * Version: 1.10.4
11
  * License: GPLv3+
12
  *
13
  * @package WordPress
14
  * @author Frank Bültge <frank@bueltge.de>
15
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
16
+ * @version 22016-06-03
17
  */
18
 
19
  /**
adminimize_page.php CHANGED
File without changes
css/mw_cat_full.css CHANGED
File without changes
css/mw_small_user_info.css CHANGED
File without changes
css/style.css CHANGED
File without changes
inc-options/admin_bar.php CHANGED
@@ -83,6 +83,7 @@ if ( ! isset( $user_roles_names ) ) {
83
 
84
  $is_parent = ! empty( $value->parent );
85
  $has_link = ! empty( $value->href );
 
86
  // No title on the item.
87
  if ( ! $value->title ) {
88
  $value->title = '<b><i>' . esc_attr__( 'No Title!', 'adminimize' ) . '</i></b>';
83
 
84
  $is_parent = ! empty( $value->parent );
85
  $has_link = ! empty( $value->href );
86
+
87
  // No title on the item.
88
  if ( ! $value->title ) {
89
  $value->title = '<b><i>' . esc_attr__( 'No Title!', 'adminimize' ) . '</i></b>';
inc-options/backend_options.php CHANGED
File without changes
inc-options/dashboard_options.php CHANGED
File without changes
inc-options/deinstall_options.php CHANGED
File without changes
inc-options/global_options.php CHANGED
File without changes
inc-options/im_export_options.php CHANGED
File without changes
inc-options/links_options.php CHANGED
File without changes
inc-options/menu_options.php CHANGED
File without changes
inc-options/minimenu.php CHANGED
File without changes
inc-options/self_settings.php CHANGED
@@ -40,7 +40,7 @@ if ( ! function_exists( 'add_action' ) ) {
40
  name="mw_adminimize_multiple_roles" <?php checked(
41
  _mw_adminimize_get_option_value( 'mw_adminimize_multiple_roles' ),
42
  1, TRUE ); ?>>
43
- <?php esc_attr_e( 'If the user have more as one role and this function is active, Adminimize hide only items, there are active on each role of this user.', 'adminimize' ); ?>
44
  </td>
45
  </tr>
46
  <tr>
40
  name="mw_adminimize_multiple_roles" <?php checked(
41
  _mw_adminimize_get_option_value( 'mw_adminimize_multiple_roles' ),
42
  1, TRUE ); ?>>
43
+ <?php esc_attr_e( 'A user with multiple roles must have an option selected for all roles in order to hide the selected option. If the option is unselected for any of the user’s roles, then the item will appear.', 'adminimize' ); ?>
44
  </td>
45
  </tr>
46
  <tr>
inc-options/settings_notice.php CHANGED
File without changes
inc-options/theme_options.php CHANGED
File without changes
inc-options/widget_options.php CHANGED
File without changes
inc-options/wp_nav_menu_options.php CHANGED
File without changes
inc-options/write_cp_options.php CHANGED
File without changes
inc-options/write_page_options.php CHANGED
File without changes
inc-options/write_post_options.php CHANGED
File without changes
inc-setup/admin-bar-items.php CHANGED
@@ -79,34 +79,55 @@ function _mw_adminimize_change_admin_bar() {
79
  return;
80
  }
81
 
 
 
 
 
 
82
  /** @var $wp_admin_bar WP_Admin_Bar */
83
  global $wp_admin_bar;
84
 
85
  // Get current user data.
86
  $user = wp_get_current_user();
87
- if ( ! $user->roles[ 0 ] ) {
88
  return;
89
  }
90
- $user_role = $user->roles[ 0 ];
 
 
 
 
91
 
92
  // Get Backend Admin Bar settings for the current user role.
93
  if ( is_admin() ) {
94
- $disabled_admin_bar_option_[ $user_role ] = _mw_adminimize_get_option_value(
95
- 'mw_adminimize_disabled_admin_bar_' . $user_role . '_items'
96
- );
 
 
97
  } else {
98
  // Get Frontend Admin Bar settings for the current user role.
99
- $disabled_admin_bar_option_[ $user_role ] = (array) _mw_adminimize_get_option_value(
100
- 'mw_adminimize_disabled_admin_bar_frontend_' . $user_role . '_items'
101
- );
 
 
 
 
 
 
 
 
 
 
102
  }
103
 
104
  // No settings for this role, exit.
105
- if ( ! $disabled_admin_bar_option_[ $user_role ] ) {
106
  return;
107
  }
108
 
109
- foreach ( $disabled_admin_bar_option_[ $user_role ] as $admin_bar_item ) {
110
  $wp_admin_bar->remove_node( $admin_bar_item );
111
  }
112
  }
79
  return;
80
  }
81
 
82
+ // If the admin bar is not active, filtering is not necessary.
83
+ if ( ! is_admin_bar_showing() ) {
84
+ return;
85
+ }
86
+
87
  /** @var $wp_admin_bar WP_Admin_Bar */
88
  global $wp_admin_bar;
89
 
90
  // Get current user data.
91
  $user = wp_get_current_user();
92
+ if ( ! $user->roles ) {
93
  return;
94
  }
95
+
96
+ // Get all roles of logged in user.
97
+ $user_roles = $user->roles;
98
+ //$user_roles = _mw_adminimize_get_all_user_roles();
99
+ $disabled_admin_bar_option_ = array();
100
 
101
  // Get Backend Admin Bar settings for the current user role.
102
  if ( is_admin() ) {
103
+ foreach ( $user_roles as $role ) {
104
+ $disabled_admin_bar_option_[ $role ] = (array) _mw_adminimize_get_option_value(
105
+ 'mw_adminimize_disabled_admin_bar_' . $role . '_items'
106
+ );
107
+ }
108
  } else {
109
  // Get Frontend Admin Bar settings for the current user role.
110
+ foreach ( $user_roles as $role ) {
111
+ $disabled_admin_bar_option_[ $role ] = (array) _mw_adminimize_get_option_value(
112
+ 'mw_adminimize_disabled_admin_bar_frontend_' . $role . '_items'
113
+ );
114
+ }
115
+ }
116
+
117
+ // Merge multidimensional array in to one, flat.
118
+ $disabled_admin_bar_option_ = array_reduce( $disabled_admin_bar_option_, 'array_merge', array() );
119
+
120
+ // Support Multiple Roles for users.
121
+ if ( _mw_adminimize_get_option_value( 'mw_adminimize_multiple_roles' ) && 1 < count( $user->roles ) ) {
122
+ $disabled_admin_bar_option_ = _mw_adminimize_get_duplicate( $disabled_admin_bar_option_ );
123
  }
124
 
125
  // No settings for this role, exit.
126
+ if ( ! $disabled_admin_bar_option_ ) {
127
  return;
128
  }
129
 
130
+ foreach ( $disabled_admin_bar_option_ as $admin_bar_item ) {
131
  $wp_admin_bar->remove_node( $admin_bar_item );
132
  }
133
  }
inc-setup/admin-footer.php CHANGED
File without changes
inc-setup/dashboard.php CHANGED
File without changes
inc-setup/meta-boxes.php CHANGED
File without changes
inc-setup/remove-admin-bar.php CHANGED
@@ -160,32 +160,39 @@ function _mw_adminimize_remove_admin_bar() {
160
  }
161
 
162
  $user_roles = _mw_adminimize_get_all_user_roles();
 
163
 
164
  foreach ( $user_roles as $role ) {
165
- $disabled_global_option_[ $role ] = _mw_adminimize_get_option_value(
166
  'mw_adminimize_disabled_global_option_' . $role . '_items'
167
  );
168
  }
169
 
 
 
 
170
  foreach ( $user_roles as $role ) {
171
- if ( ! isset( $disabled_global_option_[ $role ][ '0' ] ) ) {
172
- $disabled_global_option_[ $role ][ '0' ] = '';
 
 
 
 
 
 
173
  }
 
 
 
 
 
 
174
  }
175
 
176
- $user = wp_get_current_user();
177
  $remove_adminbar = FALSE;
178
- // new 1.7.8
179
- foreach ( $user_roles as $role ) {
180
- if ( is_array( $user->roles ) && in_array( $role, $user->roles, FALSE ) ) {
181
- if ( _mw_adminimize_current_user_has_role( $role )
182
- && isset( $disabled_global_option_[ $role ] )
183
- && is_array( $disabled_global_option_[ $role ] )
184
- && _mw_adminimize_recursive_in_array( '.show-admin-bar', $disabled_global_option_[ $role ] )
185
- ) {
186
- $remove_adminbar = TRUE;
187
- }
188
- }
189
  }
190
 
191
  if ( $remove_adminbar ) {
160
  }
161
 
162
  $user_roles = _mw_adminimize_get_all_user_roles();
163
+ $disabled_global_option_ = array();
164
 
165
  foreach ( $user_roles as $role ) {
166
+ $disabled_global_option_[ $role ] = (array) _mw_adminimize_get_option_value(
167
  'mw_adminimize_disabled_global_option_' . $role . '_items'
168
  );
169
  }
170
 
171
+ $mw_global_options = array();
172
+ $user = wp_get_current_user();
173
+
174
  foreach ( $user_roles as $role ) {
175
+
176
+ if ( in_array( $role, $user->roles, FALSE )
177
+ && _mw_adminimize_current_user_has_role( $role )
178
+ ) {
179
+ // Create array about all items with all affected roles, important for multiple roles.
180
+ foreach ( $disabled_global_option_[ $role ] as $global_item ) {
181
+ $mw_global_options[] = $global_item;
182
+ }
183
  }
184
+
185
+ }
186
+
187
+ // Support Multiple Roles for users.
188
+ if ( _mw_adminimize_get_option_value( 'mw_adminimize_multiple_roles' ) && 1 < count( $user->roles ) ) {
189
+ $mw_global_options = _mw_adminimize_get_duplicate( $mw_global_options );
190
  }
191
 
 
192
  $remove_adminbar = FALSE;
193
+ // Check for admin bar selector to set to remove the Admin Bar.
194
+ if ( _mw_adminimize_recursive_in_array( '.show-admin-bar', $mw_global_options ) ) {
195
+ $remove_adminbar = TRUE;
 
 
 
 
 
 
 
 
196
  }
197
 
198
  if ( $remove_adminbar ) {
inc-setup/widget.php CHANGED
File without changes
js/adminimize.js CHANGED
File without changes
js/remove_footer.js CHANGED
File without changes
js/remove_header.js CHANGED
File without changes
js/tb_window.js CHANGED
File without changes
js/timestamp.js CHANGED
File without changes
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Adminimize ===
2
- Contributors: Bueltge
3
  Donate link: https://www.paypal.me/FrankBueltge
4
  Tags: color, scheme, theme, admin, dashboard, color scheme, plugin, interface, ui, metabox, hide, editor, minimal, menu, customization, interface, administration, lite, light, usability, lightweight, layout, zen
5
  Requires at least: 4.0
6
  Tested up to: 4.5.2
7
- Stable tag: 1.10.3
8
 
9
  Adminimize that lets you hide 'unnecessary' items from the WordPress backend
10
 
@@ -25,6 +25,8 @@ It is possible to add own options to hide areas in the back-end of WordPress. It
25
  = Compatibility with plugins for MetaBoxes in Write-area =
26
  You can add your own options, you must only check for css selectors.
27
 
 
 
28
  == Installation ==
29
  = Requirements =
30
  * WordPress version 4.0 and later; tested only in last stable version.
@@ -41,7 +43,13 @@ Use the installer via back-end of your install or ...
41
  1. Settings area in WP 4.5-alpha
42
 
43
  == Changelog ==
44
- = 1.10.3 (2016-05-11)=
 
 
 
 
 
 
45
  * Fix exclude of set new Admin Bar on settings page of Adminimize.
46
  * Fix check for settings page.
47
  * Fix colors on raw, column of the settings page.
1
  === Adminimize ===
2
+ Contributors: Bueltge, inpsyde
3
  Donate link: https://www.paypal.me/FrankBueltge
4
  Tags: color, scheme, theme, admin, dashboard, color scheme, plugin, interface, ui, metabox, hide, editor, minimal, menu, customization, interface, administration, lite, light, usability, lightweight, layout, zen
5
  Requires at least: 4.0
6
  Tested up to: 4.5.2
7
+ Stable tag: 1.10.4
8
 
9
  Adminimize that lets you hide 'unnecessary' items from the WordPress backend
10
 
25
  = Compatibility with plugins for MetaBoxes in Write-area =
26
  You can add your own options, you must only check for css selectors.
27
 
28
+ **Crafted by [Inpsyde](http://inpsyde.com) · Engineering the web since 2006.**
29
+
30
  == Installation ==
31
  = Requirements =
32
  * WordPress version 4.0 and later; tested only in last stable version.
43
  1. Settings area in WP 4.5-alpha
44
 
45
  == Changelog ==
46
+ = 1.10.4 (2016-06-03) =
47
+ * Add support for multiple roles to remove the Admin Bar via global options.
48
+ * Add support for multiple roles to remove the Admin Bar Back end items.
49
+ * Add also this support for Front End Admin Bar items.
50
+ * Multiple roles supported now on "Menu Options", "Global Options", "Admin Bar Back end options" and "Admin Bar Front end options".
51
+
52
+ = 1.10.3 (2016-05-11) =
53
  * Fix exclude of set new Admin Bar on settings page of Adminimize.
54
  * Fix check for settings page.
55
  * Fix colors on raw, column of the settings page.