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/global_options.php +11 -18 1.11.4 → 1.9.1 View file →
@@ -11,9 +11,9 @@
11 11 ?>
12 12
13 13 <div id="poststuff" class="ui-sortable meta-box-sortables">
14 14 <div class="postbox">
15 - <div class="handlediv" title="<?php esc_attr_e( 'Click to toggle', 'adminimize' ); ?>"><br /></div>
15 + <div class="handlediv" title="<?php esc_attr_e( 'Click to toggle' ); ?>"><br /></div>
16 16 <h3 class="hndle" id="global_options"><?php esc_attr_e( 'Global options', 'adminimize' ); ?></h3>
17 17
18 18 <div class="inside">
19 19 <br class="clear" />
@@ -18,17 +18,8 @@
18 18 <div class="inside">
19 19 <br class="clear" />
20 20
21 21 <table summary="config_edit_post" class="widefat">
22 - <colgroup>
23 - <?php
24 - $col = 0;
25 - foreach ( $user_roles_names as $role_name ) {
26 - echo '<col class="col' . $col . '">' . "\n";
27 - $col ++;
28 - }
29 - ?>
30 - </colgroup>
31 22 <thead>
32 23 <tr>
33 24 <th><?php esc_attr_e( 'Option', 'adminimize' ); ?></th>
34 25 <?php
@@ -39,11 +30,13 @@
39 30 </tr>
40 31 <tr>
41 32 <td><?php esc_attr_e( 'Select all', 'adminimize' ); ?></td>
42 33 <?php
43 - foreach ( $user_roles as $role_slug ) {
34 + foreach ( $user_roles_names as $role_name ) {
35 + $role_name = strtolower( $role_name );
36 + $role_name = preg_replace( '/[^a-z0-9]+/', '', $role_name );
44 37 echo '<td class="num">';
45 - echo '<input id="select_all" class="global_options_' . $role_slug
38 + echo '<input id="select_all" class="global_options_' . $role_name
46 39 . '" type="checkbox" name="" value="" />';
47 40 echo '</td>' . "\n";
48 41 } ?>
49 42 </tr>
@@ -98,18 +91,18 @@
98 91 continue;
99 92 }
100 93
101 94 $checked_user_role_ = array();
102 - foreach ( (array) $user_roles as $role ) {
95 + foreach ( $user_roles as $role ) {
103 96 $checked_user_role_[ $role ] = ( isset( $disabled_global_option_[ $role ] )
104 - && in_array( $global_option, $disabled_global_option_[ $role ], true ) ) ? ' checked="checked"'
97 + && in_array( $global_option, $disabled_global_option_[ $role ] ) ) ? ' checked="checked"'
105 98 : '';
106 99 }
107 100 echo '<tr>' . "\n";
108 101 echo '<td>' . $global_options_names[ $index ] . ' <span>(' . $global_option . ')</span> </td>' . "\n";
109 - foreach ( (array) $user_roles as $role ) {
102 + foreach ( $user_roles as $role ) {
110 103 echo '<td class="num"><input id="check_post' . $role . $x . '" class="global_options_'
111 - . preg_replace( '/[^a-z0-9_-]+/', '', $role ) . '" type="checkbox"'
104 + . preg_replace( '/[^a-z0-9]+/', '', $role ) . '" type="checkbox"'
112 105 . $checked_user_role_[ $role ] . ' name="mw_adminimize_disabled_global_option_'
113 106 . $role . '_items[]" value="' . $global_option . '" /></td>' . "\n";
114 107 }
115 108 echo '</tr>' . "\n";
@@ -128,11 +121,11 @@
128 121 <thead>
129 122 <tr>
130 123 <th><?php esc_attr_e( 'Your own options', 'adminimize' );
131 124 echo '<br />';
132 - esc_attr_e( 'Option name', 'adminimize' ); ?></th>
125 + esc_attr_e( 'ID or class', 'adminimize' ); ?></th>
133 126 <th><?php echo '<br />';
134 - esc_attr_e( 'Selector, ID or class', 'adminimize' ); ?></th>
127 + esc_attr_e( 'Option', 'adminimize' ); ?></th>
135 128 </tr>
136 129 </thead>
137 130
138 131 <tbody>