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_frontend.php +18 -18 1.11.9 → 1.9.1 View file →
@@ -12,12 +12,8 @@
12 12 if ( ! isset( $wp_admin_bar ) ) {
13 13 $wp_admin_bar = '';
14 14 }
15 15
16 -if ( ! isset( $user_roles ) ) {
17 - $user_roles = _mw_adminimize_get_all_user_roles();
18 -}
19 -
20 16 if ( ! isset( $user_roles_names ) ) {
21 17 $user_roles_names = _mw_adminimize_get_all_user_roles_names();
22 18 }
23 19 ?>
@@ -22,9 +18,10 @@
22 18 }
23 19 ?>
24 20 <div id="poststuff" class="ui-sortable meta-box-sortables">
25 21 <div class="postbox">
26 - <h3 class="hndle ui-sortable-handle" id="admin_bar_frontend_options" title="<?php esc_attr_e( 'Click to toggle', 'adminimize' ); ?>"><?php
22 + <div class="handlediv" title="<?php esc_attr_e( 'Click to toggle' ); ?>"><br /></div>
23 + <h3 class="hndle" id="admin_bar_frontend_options" title="<?php esc_attr_e( 'Click to toggle' ); ?>"><?php
27 24 esc_attr_e( 'Admin Bar Front end Options', 'adminimize' ); ?></h3>
28 25
29 26 <div class="inside">
30 27 <br class="clear" />
@@ -50,12 +47,13 @@
50 47 </tr>
51 48 <tr>
52 49 <td><?php esc_attr_e( 'Select all', 'adminimize' ); ?></td>
53 50 <?php
54 - foreach ( $user_roles as $role_slug ) {
51 + foreach ( $user_roles_names as $role_name ) {
52 + $role_name = strtolower( $role_name );
55 53 echo '<td class="num">';
56 - echo '<input id="select_all" class="admin_bar_frontend_' . $role_slug
57 - . '" type="checkbox" value="" />';
54 + echo '<input id="select_all" class="admin_bar_frontend_' . $role_name
55 + . '" type="checkbox" name="mw_adminimize_select_all' . $role_name . '" value="" />';
58 56 echo '</td>' . "\n";
59 57 } ?>
60 58 </tr>
61 59 </thead>
@@ -78,9 +76,9 @@
78 76
79 77 $message = '';
80 78 if ( ! empty( $admin_bar_frontend_items ) && is_array( $admin_bar_frontend_items ) ) {
81 79 foreach ( $admin_bar_frontend_items as $key => $value ) {
82 - $value = (is_object($value)) ? $value : (object) $value;
80 +
83 81 $is_parent = ! empty( $value->parent );
84 82 $has_link = ! empty( $value->href );
85 83 // No title on the item.
86 84 if ( ! $value->title ) {
@@ -86,12 +84,14 @@
86 84 if ( ! $value->title ) {
87 85 $value->title = '<b><i>' . esc_attr__( 'No Title!', 'adminimize' ) . '</i></b>';
88 86 }
89 87
88 + $item_class = ' class="form-invalid"';
90 89 $item_string = '&bull; ';
91 90 $before_title = '<b>';
92 91 $after_title = '</b> <small>' . esc_attr__( 'Group', 'adminimize' ) . '</small>';
93 92 if ( $is_parent ) {
93 + $item_class = '';
94 94 $item_string = '&mdash; ';
95 95 $before_title = '';
96 96 $after_title = '';
97 97 }
@@ -104,9 +104,9 @@
104 104 )
105 105 ) ? ' checked="checked"' : '';
106 106 }
107 107
108 - echo '<tr>' . "\n";
108 + echo '<tr' . $item_class . '>' . "\n";
109 109 echo '<td>'. $before_title . $item_string . strip_tags( $value->title, '<strong><b><em><i>' )
110 110 . $after_title . ' <span>(' . $key . ')</span> </td>' . "\n";
111 111 foreach ( $user_roles as $role ) {
112 112 echo '<td class="num"><input id="check_post' . $role . $x
@@ -116,15 +116,15 @@
116 116 }
117 117 echo '</tr>' . "\n";
118 118 $x ++;
119 119 }
120 + } else {
121 + $message = '<span style="font-size: 35px;">&#x261D;</span>'
122 + . esc_attr__(
123 + 'Display the front end include load or refresh of the site to get all items of the admin bar in the front end area.',
124 + 'adminimize'
125 + );
120 126 }
121 - $message = '<span style="font-size: 35px;">&#x261D;</span>'
122 - . esc_attr__(
123 - 'You must open the front end of the site in this browser in order for the plugin to discover the Admin Bar items that are currently not visible.',
124 - 'adminimize'
125 - );
126 -
127 127 ?>
128 128 </tbody>
129 129 </table>
130 130
@@ -137,9 +137,9 @@
137 137 ); ?> &raquo;" /><input type="hidden" name="page_options" value="'dofollow_timeout'" />
138 138 </p>
139 139
140 140 <p>
141 - <a class="alignright button adminimize-scroltop" href="#"
141 + <a class="alignright button" href="javascript:void(0);" onclick="window.scrollTo(0,0);"
142 142 style="margin:3px 0 0 30px;"><?php esc_attr_e(
143 143 'scroll to top', 'adminimize'
144 144 ); ?></a>
145 145 <br class="clear" />
@@ -146,5 +146,5 @@
146 146 </p>
147 147
148 148 </div>
149 149 </div>
150 -</div>
150 +</div>