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/write_page_options.php +31 -47 1.11.12 → 1.9.1 View file →
@@ -7,50 +7,36 @@
7 7 if ( ! function_exists( 'add_action' ) ) {
8 8 echo "Hi there! I'm just a part of plugin, not much I can do when called directly.";
9 9 exit;
10 10 }
11 -
12 -if ( ! isset( $user_roles ) ) {
13 - $user_roles = _mw_adminimize_get_all_user_roles();
14 -}
15 -
16 -if ( ! isset( $user_roles_names ) ) {
17 - $user_roles_names = _mw_adminimize_get_all_user_roles_names();
18 -}
19 11 ?>
20 -
21 12 <div id="poststuff" class="ui-sortable meta-box-sortables">
22 13 <div class="postbox">
23 - <h3 class="hndle ui-sortable-handle" title="<?php esc_attr_e( 'Click to toggle', 'adminimize' ); ?>" id="config_edit_page"><?php esc_attr_e( 'Write options - Page', 'adminimize' ); ?></h3>
14 + <div class="handlediv" title="<?php esc_attr_e( 'Click to toggle' ); ?>"><br /></div>
15 + <h3 class="hndle" id="config_edit_page"><?php esc_attr_e( 'Write options - Page', 'adminimize' ); ?></h3>
24 16 <div class="inside">
25 17 <br class="clear" />
26 18
27 19 <table summary="config_edit_page" class="widefat">
28 - <colgroup>
29 - <?php
30 - $col = 0;
31 - foreach ( (array) $user_roles_names as $role_name ) {
32 - echo '<col class="col' . (int) $col . '">' . "\n";
33 - $col ++;
34 - }
35 - ?>
36 - </colgroup>
37 20 <thead>
38 21 <tr>
39 22 <th><?php esc_attr_e( 'Write options - Page', 'adminimize' ); ?></th>
40 23 <?php
41 -
42 - foreach ( (array) $user_roles_names as $role_name ) {
43 - echo '<th>' . esc_attr__( 'Deactivate for', 'adminimize' )
44 - . '<br />' . esc_attr( $role_name ) . '</th>';
45 - } ?>
24 + foreach ( $user_roles_names as $role_name ) { ?>
25 + <th><?php esc_attr_e( 'Deactivate for', 'adminimize' );
26 + echo '<br />' . $role_name; ?></th>
27 + <?php } ?>
46 28 </tr>
47 29 <tr>
48 30 <td><?php esc_attr_e( 'Select all', 'adminimize' ); ?></td>
49 31 <?php
50 - foreach ( (array) $user_roles as $role_slug ) {
51 - echo '<td class="num"><input id="select_all" class="write_page_options_'
52 - . esc_attr( $role_slug ) . '" type="checkbox" name="" value="" /></td>' . "\n";
32 + foreach ( $user_roles_names as $role_name ) {
33 + $role_name = strtolower( $role_name );
34 + $role_name = preg_replace( '/[^a-z0-9]+/', '', $role_name );
35 + echo '<td class="num">';
36 + echo '<input id="select_all" class="write_page_options_' . $role_name
37 + . '" type="checkbox" name="" value="" />';
38 + echo '</td>' . "\n";
53 39 } ?>
54 40 </tr>
55 41 </thead>
56 42
@@ -59,9 +45,8 @@
59 45 // pages
60 46 $metaboxes_page = array(
61 47 '#contextual-help-link-wrap',
62 48 '#screen-options-link-wrap',
63 - '.page-title-action',
64 49 '#title, #titlediv, th.column-title, td.title',
65 50 '#pageslugdiv',
66 51 '#pagepostcustom, #pagecustomdiv, #postcustom',
67 52 '#pagecommentstatusdiv, #commentsdiv, #comments, th.column-comments, td.comments',
@@ -79,9 +64,9 @@
79 64 '#wp-word-count',
80 65 '#slugdiv,#edit-slug-box',
81 66 '#misc-publishing-actions',
82 67 '#commentstatusdiv',
83 - '#editor-toolbar #edButtonHTML, #quicktags, #content-html',
68 + '#editor-toolbar #edButtonHTML, #quicktags, #content-html'
84 69 );
85 70
86 71 $post_type = 'page';
87 72 foreach ( $GLOBALS[ '_wp_post_type_features' ][ $post_type ] as $post_type_support => $key ) {
@@ -128,22 +113,21 @@
128 113 );
129 114 $metaboxes_page = array_merge( $metaboxes_page, $quickedit_page_areas );
130 115
131 116 $metaboxes_names_page = array(
132 - esc_attr__( 'Help', 'adminimize' ),
133 - esc_attr__( 'Screen Options', 'adminimize' ),
134 - esc_attr__( 'Add New', 'adminimize' ),
117 + esc_attr__( 'Help' ),
118 + esc_attr__( 'Screen Options' ),
135 119 esc_attr__( 'Title', 'adminimize' ),
136 120 esc_attr__( 'Permalink', 'adminimize' ),
137 - esc_attr__( 'Custom Fields', 'adminimize' ),
121 + esc_attr__( 'Custom Fields' ),
138 122 esc_attr__( 'Comments &amp; Pings', 'adminimize' ),
139 - esc_attr__( 'Date', 'adminimize' ),
123 + esc_attr__( 'Date' ),
140 124 esc_attr__( 'Password Protect This Page', 'adminimize' ),
141 125 esc_attr__( 'Attributes', 'adminimize' ),
142 126 esc_attr__( 'Page Template', 'adminimize' ),
143 127 esc_attr__( 'Page Order', 'adminimize' ),
144 - esc_attr__( 'Page Author', 'adminimize' ),
145 - esc_attr__( 'Page Revisions', 'adminimize' ),
128 + esc_attr__( 'Page Author' ),
129 + esc_attr__( 'Page Revisions' ),
146 130 esc_attr__( 'Related', 'adminimize' ),
147 131 esc_attr__( 'Messages', 'adminimize' ),
148 132 esc_attr__( 'h2: Advanced Options', 'adminimize' ),
149 133 esc_attr__( 'Media Buttons (all)', 'adminimize' ),
@@ -171,15 +155,15 @@
171 155 // quick edit names
172 156 $quickedit_page_names = array(
173 157 '<strong>' . esc_attr__( 'Quick Edit Link', 'adminimize' ) . '</strong>',
174 158 esc_attr__( 'QE', 'adminimize' ) . ' ' . esc_attr__( 'Inline Edit Left', 'adminimize' ),
175 - '&emsp;' . esc_attr__( 'QE', 'adminimize' ) . ' &rArr;' . ' ' . esc_attr__( 'All Labels', 'adminimize' ),
176 - '&emsp;' . esc_attr__( 'QE', 'adminimize' ) . ' &rArr;' . ' ' . esc_attr__( 'Date', 'adminimize' ),
177 - '&emsp;' . esc_attr__( 'QE', 'adminimize' ) . ' &rArr;' . ' ' . esc_attr__( 'Author' ),
178 - '&emsp;' . esc_attr__( 'QE', 'adminimize' ) . ' &rArr;' . ' ' . esc_attr__( 'Password and Private', 'adminimize' ),
159 + '&emsp;QE &rArr;' . ' ' . esc_attr__( 'All Labels', 'adminimize' ),
160 + '&emsp;QE &rArr;' . ' ' . esc_attr__( 'Date', 'adminimize' ),
161 + '&emsp;QE &rArr;' . ' ' . esc_attr__( 'Author' ),
162 + '&emsp;QE &rArr;' . ' ' . esc_attr__( 'Password and Private', 'adminimize' ),
179 163 esc_attr__( 'QE', 'adminimize' ) . ' ' . esc_attr__( 'Inline Edit Right', 'adminimize' ),
180 - '&emsp;' . esc_attr__( 'QE', 'adminimize' ) . ' &rArr;' . ' ' . esc_attr__( 'Parent, Order, Template', 'adminimize' ),
181 - '&emsp;' . esc_attr__( 'QE', 'adminimize' ) . ' &rArr;' . ' ' . esc_attr__( 'Status', 'adminimize' ),
164 + '&emsp;QE &rArr;' . ' ' . esc_attr__( 'Parent, Order, Template', 'adminimize' ),
165 + '&emsp;QE &rArr;' . ' ' . esc_attr__( 'Status', 'adminimize' ),
182 166 esc_attr__( 'QE', 'adminimize' ) . ' ' . esc_attr__( 'Cancel/Save Button', 'adminimize' )
183 167 );
184 168 $metaboxes_names_page = array_merge( $metaboxes_names_page, $quickedit_page_names );
185 169
@@ -212,9 +196,9 @@
212 196 echo '<td>' . $metaboxes_names_page[ $index ] . ' <span>(' . $metabox . ')</span> </td>' . "\n";
213 197 foreach ( $user_roles as $role ) {
214 198 echo '<td class="num">';
215 199 echo '<input id="check_page' . $role . $x . '" class="write_page_options_'
216 - . preg_replace( '/[^a-z0-9_-]+/', '', $role ) . '" type="checkbox"'
200 + . preg_replace( '/[^a-z0-9]+/', '', $role ) . '" type="checkbox"'
217 201 . $checked_user_role_[ $role ] . ' name="mw_adminimize_disabled_metaboxes_page_'
218 202 . $role . '_items[]" value="' . $metabox . '" />';
219 203 echo '</td>' . "\n";
220 204 }
@@ -232,13 +216,13 @@
232 216 <br style="margin-top: 10px;" />
233 217 <table summary="config_own_page" class="widefat">
234 218 <thead>
235 219 <tr>
236 - <th><?php esc_attr_e( 'Your own options', 'adminimize' );
220 + <th><?php esc_attr_e( 'Your own page options', 'adminimize' );
237 221 echo '<br />';
238 - esc_attr_e( 'Option name', 'adminimize' ); ?></th>
222 + esc_attr_e( 'ID or class', 'adminimize' ); ?></th>
239 223 <th><?php echo '<br />';
240 - esc_attr_e( 'Selector, ID or class', 'adminimize' ); ?></th>
224 + esc_attr_e( 'Option', 'adminimize' ); ?></th>
241 225 </tr>
242 226 </thead>
243 227
244 228 <tbody>
@@ -278,9 +262,9 @@
278 262 'Update Options', 'adminimize'
279 263 ); ?> &raquo;" /><input type="hidden" name="page_options" value="'dofollow_timeout'" />
280 264 </p>
281 265 <p>
282 - <a class="alignright button adminimize-scroltop" href="#" style="margin:3px 0 0 30px;"><?php esc_attr_e(
266 + <a class="alignright button" href="javascript:void(0);" onclick="window.scrollTo(0,0);" style="margin:3px 0 0 30px;"><?php esc_attr_e(
283 267 'scroll to top', 'adminimize'
284 268 ); ?></a><br class="clear" /></p>
285 269
286 270 </div>