PluginProbe
Adminimize / 1.9.1
Adminimize v1.9.1
1.11.14 1.11.13 1.11.1 1.11.10 1.11.11 1.11.12 1.11.2 1.11.3 1.11.4 1.11.5 1.11.6 1.11.7 1.11.8 1.11.9 1.3 1.4.7 1.6 1.7.12 1.7.13 1.7.14 1.7.15 1.7.16 1.7.17 1.7.18 1.7.19 All 53 releases
← All changes | inc-options/admin_bar.php +15 -16 1.11.11 → 1.9.1 View file →
@@ -8,17 +8,12 @@
8 8 if ( ! function_exists( 'add_action' ) ) {
9 9 die( "Hi there! I'm just a part of plugin, not much I can do when called directly." );
10 10 }
11 11
12 -/** @var $wp_admin_bar WP_Admin_Bar */
13 12 if ( ! isset( $wp_admin_bar ) ) {
14 13 $wp_admin_bar = '';
15 14 }
16 15
17 -if ( ! isset( $user_roles ) ) {
18 - $user_roles = _mw_adminimize_get_all_user_roles();
19 -}
20 -
21 16 if ( ! isset( $user_roles_names ) ) {
22 17 $user_roles_names = _mw_adminimize_get_all_user_roles_names();
23 18 }
24 19 ?>
@@ -23,10 +18,11 @@
23 18 }
24 19 ?>
25 20 <div id="poststuff" class="ui-sortable meta-box-sortables">
26 21 <div class="postbox">
27 - <h3 class="hndle ui-sortable-handle" id="admin_bar_options" title="<?php esc_attr_e( 'Click to toggle', 'adminimize' ); ?>"><?php
28 - esc_attr_e( 'Admin Bar Back end Options', 'adminimize' ); ?></h3>
22 + <div class="handlediv" title="<?php esc_attr_e( 'Click to toggle' ); ?>"><br /></div>
23 + <h3 class="hndle" id="admin_bar_options" title="<?php esc_attr_e( 'Click to toggle' ); ?>"><?php
24 + esc_attr_e( 'Admin Bar Back end options', 'adminimize' ); ?></h3>
29 25
30 26 <div class="inside">
31 27 <br class="clear" />
32 28
@@ -51,11 +47,12 @@
51 47 </tr>
52 48 <tr>
53 49 <td><?php esc_attr_e( 'Select all', 'adminimize' ); ?></td>
54 50 <?php
55 - foreach ( $user_roles as $role_slug ) {
51 + foreach ( $user_roles_names as $role_name ) {
52 + $role_name = strtolower( $role_name );
56 53 echo '<td class="num">';
57 - echo '<input id="select_all" class="admin_bar_' . $role_slug
54 + echo '<input id="select_all" class="admin_bar_' . $role_name
58 55 . '" type="checkbox" name="" value="" />';
59 56 echo '</td>' . "\n";
60 57 } ?>
61 58 </tr>
@@ -81,18 +78,19 @@
81 78 foreach ( $admin_bar_items as $key => $value ) {
82 79
83 80 $is_parent = ! empty( $value->parent );
84 81 $has_link = ! empty( $value->href );
85 -
86 82 // No title on the item.
87 83 if ( ! $value->title ) {
88 84 $value->title = '<b><i>' . esc_attr__( 'No Title!', 'adminimize' ) . '</i></b>';
89 85 }
90 86
87 + $item_class = ' class="form-invalid"';
91 88 $item_string = '&bull; ';
92 89 $before_title = '<b>';
93 90 $after_title = '</b> <small>' . esc_attr__( 'Group', 'adminimize' ) . '</small>';
94 91 if ( $is_parent ) {
92 + $item_class = '';
95 93 $item_string = '&mdash; ';
96 94 $before_title = '';
97 95 $after_title = '';
98 96 }
@@ -100,14 +98,14 @@
100 98 $checked_user_role_ = array();
101 99 foreach ( $user_roles as $role ) {
102 100 $checked_user_role_[ $role ] = ( isset( $disabled_admin_bar_option_[ $role ] )
103 101 && in_array(
104 - $key, $disabled_admin_bar_option_[ $role ], FALSE
102 + $key, $disabled_admin_bar_option_[ $role ]
105 103 )
106 104 ) ? ' checked="checked"' : '';
107 105 }
108 106
109 - echo '<tr>' . "\n";
107 + echo '<tr' . $item_class . '>' . "\n";
110 108 echo '<td>'. $before_title . $item_string . strip_tags( $value->title, '<strong><b><em><i>' )
111 109 . $after_title . ' <span>(' . $key . ')</span> </td>' . "\n";
112 110 foreach ( $user_roles as $role ) {
113 111 echo '<td class="num"><input id="check_post' . $role . $x . '" class="admin_bar_'
@@ -117,11 +115,12 @@
117 115 }
118 116 echo '</tr>' . "\n";
119 117 $x ++;
120 118 }
119 + } else {
120 + $message = '<span style="font-size: 35px;">&#x261D;</span>'
121 + . esc_attr__( 'Switch to another back-end page and come back to update the options to get all items of the admin bar in the back end area.', 'adminimize' );
121 122 }
122 - $message = '<span style="font-size: 35px;">&#x261D;</span>'
123 - . esc_attr__( 'Switch to another back-end page and come back to update the options to get all items of the admin bar in the back end area.', 'adminimize' );
124 123 ?>
125 124 </tbody>
126 125 </table>
127 126
@@ -133,9 +132,9 @@
133 132 ); ?> &raquo;" /><input type="hidden" name="page_options" value="'dofollow_timeout'" />
134 133 </p>
135 134
136 135 <p>
137 - <a class="alignright button adminimize-scroltop" href="#"
136 + <a class="alignright button" href="javascript:void(0);" onclick="window.scrollTo(0,0);"
138 137 style="margin:3px 0 0 30px;"><?php esc_attr_e(
139 138 'scroll to top', 'adminimize'
140 139 ); ?></a>
141 140 <br class="clear" />
@@ -142,5 +141,5 @@
142 141 </p>
143 142
144 143 </div>
145 144 </div>
146 -</div>
145 +</div>