| @@ -7,14 +7,21 @@ | ||
| 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 | +} | |
| 11 | 19 | ?> |
| 12 | 20 | |
| 13 | 21 | <div id="poststuff" class="ui-sortable meta-box-sortables"> |
| 14 | 22 | <div class="postbox"> |
| 15 | - <div class="handlediv" title="<?php esc_attr_e( 'Click to toggle', 'adminimize' ); ?>"><br /></div> | |
| 16 | - <h3 class="hndle" id="config_edit_post" title="<?php esc_attr_e( 'Click to toggle', 'adminimize' ); ?>"><?php | |
| 23 | + <h3 class="hndle ui-sortable-handle" title="<?php esc_attr_e( 'Click to toggle', 'adminimize' ); ?>" id="config_edit_post" title="<?php esc_attr_e( 'Click to toggle', 'adminimize' ); ?>"><?php | |
| 17 | 24 | esc_attr_e( 'Write options - Post', 'adminimize' ); ?></h3> |
| 18 | 25 | |
| 19 | 26 | <div class="inside"> |
| 20 | 27 | <br class="clear" /> |
| @@ -22,9 +29,9 @@ | ||
| 22 | 29 | <table summary="config_edit_post" class="widefat"> |
| 23 | 30 | <colgroup> |
| 24 | 31 | <?php |
| 25 | 32 | $col = 0; |
| 26 | - foreach ( $user_roles_names as $role_name ) { | |
| 33 | + foreach ( (array) $user_roles_names as $role_name ) { | |
| 27 | 34 | echo '<col class="col' . $col . '">' . "\n"; |
| 28 | 35 | $col ++; |
| 29 | 36 | } |
| 30 | 37 | ?> |
| @@ -32,21 +39,18 @@ | ||
| 32 | 39 | <thead> |
| 33 | 40 | <tr> |
| 34 | 41 | <th><?php esc_attr_e( 'Write options - Post', 'adminimize' ); ?></th> |
| 35 | 42 | <?php |
| 36 | - foreach ( $user_roles_names as $role_name ) { ?> | |
| 37 | - <th><?php esc_attr_e( 'Deactivate for', 'adminimize' ); | |
| 38 | - echo '<br/>' . $role_name; ?></th> | |
| 43 | + foreach ( (array) $user_roles_names as $role_name ) { ?> | |
| 44 | + <th><?php esc_attr_e( 'Deactivate for', 'adminimize' ); echo '<br/>' . $role_name; ?></th> | |
| 39 | 45 | <?php } ?> |
| 40 | 46 | </tr> |
| 41 | 47 | <tr> |
| 42 | 48 | <td><?php esc_attr_e( 'Select all', 'adminimize' ); ?></td> |
| 43 | 49 | <?php |
| 44 | - foreach ( $user_roles as $role_slug ) { | |
| 45 | - echo '<td class="num">'; | |
| 46 | - echo '<input id="select_all" class="write_post_options_' . $role_slug | |
| 47 | - . '" type="checkbox" name="" value="" />'; | |
| 48 | - echo '</td>' . "\n"; | |
| 50 | + foreach ( (array) $user_roles as $role_slug ) { | |
| 51 | + echo '<td class="num"><input id="select_all" class="write_post_options_' | |
| 52 | + . esc_attr( $role_slug ) . '" type="checkbox" name="" value="" /></td>' . "\n"; | |
| 49 | 53 | } ?> |
| 50 | 54 | </tr> |
| 51 | 55 | </thead> |
| 52 | 56 | |
| @@ -54,8 +58,9 @@ | ||
| 54 | 58 | <?php |
| 55 | 59 | $metaboxes = array( |
| 56 | 60 | '#contextual-help-link-wrap', |
| 57 | 61 | '#screen-options-link-wrap', |
| 62 | + '.page-title-action', | |
| 58 | 63 | '#title, #titlediv, th.column-title, td.title', |
| 59 | 64 | '#pageslugdiv', |
| 60 | 65 | '#tags, #tagsdiv,#tagsdivsb,#tagsdiv-post_tag, th.column-tags, td.tags', |
| 61 | 66 | '#categories, #categorydiv, #categorydivsb, th.column-categories, td.categories', |
| @@ -69,9 +74,9 @@ | ||
| 69 | 74 | '#wp-word-count', |
| 70 | 75 | '#slugdiv,#edit-slug-box', |
| 71 | 76 | '#misc-publishing-actions', |
| 72 | 77 | '#commentstatusdiv', |
| 73 | - '#editor-toolbar #edButtonHTML, #quicktags, #content-html, .wp-switch-editor.switch-html' | |
| 78 | + '#editor-toolbar #edButtonHTML, #quicktags, #content-html, .wp-switch-editor.switch-html', | |
| 74 | 79 | ); |
| 75 | 80 | |
| 76 | 81 | $post_type = 'post'; |
| 77 | 82 | foreach ( $GLOBALS[ '_wp_post_type_features' ][ $post_type ] as $post_type_support => $key ) { |
| @@ -124,16 +129,17 @@ | ||
| 124 | 129 | ); |
| 125 | 130 | $metaboxes = array_merge( $metaboxes, $quickedit_areas ); |
| 126 | 131 | |
| 127 | 132 | $metaboxes_names = array( |
| 128 | - esc_attr__( 'Help' ), | |
| 129 | - esc_attr__( 'Screen Options' ), | |
| 133 | + esc_attr__( 'Help', 'adminimize' ), | |
| 134 | + esc_attr__( 'Screen Options', 'adminimize' ), | |
| 135 | + esc_attr__( 'Add New', 'adminimize' ), | |
| 130 | 136 | esc_attr__( 'Title', 'adminimize' ), |
| 131 | 137 | esc_attr__( 'Permalink', 'adminimize' ), |
| 132 | 138 | esc_attr__( 'Tags', 'adminimize' ), |
| 133 | 139 | esc_attr__( 'Categories', 'adminimize' ), |
| 134 | 140 | esc_attr__( 'Add New Category', 'adminimize' ), |
| 135 | - esc_attr__( 'Date' ), | |
| 141 | + esc_attr__( 'Date', 'adminimize' ), | |
| 136 | 142 | esc_attr__( 'Password Protect This Post', 'adminimize' ), |
| 137 | 143 | esc_attr__( 'Related, Shortcuts', 'adminimize' ), |
| 138 | 144 | esc_attr__( 'Messages', 'adminimize' ), |
| 139 | 145 | esc_attr__( 'h2: Advanced Options', 'adminimize' ), |
| @@ -140,10 +146,10 @@ | ||
| 140 | 146 | esc_attr__( 'Media Buttons (all)', 'adminimize' ), |
| 141 | 147 | esc_attr__( 'Word count', 'adminimize' ), |
| 142 | 148 | esc_attr__( 'Post Slug', 'adminimize' ), |
| 143 | 149 | esc_attr__( 'Publish Actions', 'adminimize' ), |
| 144 | - esc_attr__( 'Discussion' ), | |
| 145 | - esc_attr__( 'HTML Editor Button' ) | |
| 150 | + esc_attr__( 'Discussion', 'adminimize' ), | |
| 151 | + esc_attr__( 'HTML Editor Button', 'adminimize' ) | |
| 146 | 152 | ); |
| 147 | 153 | |
| 148 | 154 | foreach ( $GLOBALS[ '_wp_post_type_features' ][ $post_type ] as $post_type_support => $key ) { |
| 149 | 155 | if ( post_type_supports( $post_type, $post_type_support ) ) { |
| @@ -272,9 +278,9 @@ | ||
| 272 | 278 | ); ?> »" /><input type="hidden" name="page_options" value="'dofollow_timeout'" /> |
| 273 | 279 | </p> |
| 274 | 280 | |
| 275 | 281 | <p> |
| 276 | - <a class="alignright button" href="javascript:void(0);" onclick="window.scrollTo(0,0);" style="margin:3px 0 0 30px;"><?php esc_attr_e( | |
| 282 | + <a class="alignright button adminimize-scroltop" href="#" style="margin:3px 0 0 30px;"><?php esc_attr_e( | |
| 277 | 283 | 'scroll to top', 'adminimize' |
| 278 | 284 | ); ?></a><br class="clear" /></p> |
| 279 | 285 | |
| 280 | 286 | </div> |