PluginProbe
Adminimize / 1.7.19
Adminimize v1.7.19
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
adminimize / inc-options / theme_options.php

theme_options.php in Adminimize 1.7.19, at inc-options/theme_options.php

109 lines 5.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package Adminimize
4 * @subpackage Backend Theme options
5 * @author Frank Bültge
6 */
7 if ( ! function_exists( 'add_action' ) ) {
8 echo "Hi there! I'm just a part of plugin, not much I can do when called directly.";
9 exit;
10 }
11 ?>
12 <div id="poststuff" class="ui-sortable meta-box-sortables">
13 <div class="postbox">
14 <div class="handlediv" title="<?php _e('Click to toggle'); ?>"><br/></div>
15 <h3 class="hndle" id="set_theme"><?php _e('Set Theme', FB_ADMINIMIZE_TEXTDOMAIN ) ?></h3>
16 <div class="inside">
17 <br class="clear" />
18
19 <?php if ( ! isset($_POST['_mw_adminimize_action']) || !($_POST['_mw_adminimize_action'] == '_mw_adminimize_load_theme') ) { ?>
20 <form name="set_theme" method="post" id="_mw_adminimize_set_theme" action="?page=<?php echo $_GET['page'];?>" >
21 <?php wp_nonce_field('mw_adminimize_nonce'); ?>
22 <p><?php _e('For better peformance with many users on your blog; load only userlist, when you will change the theme options for users.', FB_ADMINIMIZE_TEXTDOMAIN ); ?></p>
23 <p id="submitbutton">
24 <input type="hidden" name="_mw_adminimize_action" value="_mw_adminimize_load_theme" />
25 <input type="submit" name="_mw_adminimize_load" value="<?php _e('Load User Data', FB_ADMINIMIZE_TEXTDOMAIN ); ?> &raquo;" class="button button-primary" />
26 </p>
27 </form>
28 <?php }
29 if ( isset($_POST['_mw_adminimize_action']) && ($_POST['_mw_adminimize_action'] == '_mw_adminimize_load_theme') ) { ?>
30 <form name="set_theme" method="post" id="_mw_adminimize_set_theme" action="?page=<?php echo $_GET['page'];?>" >
31 <?php wp_nonce_field('mw_adminimize_nonce'); ?>
32 <table class="widefat">
33 <thead>
34 <tr class="thead">
35 <th>&nbsp;</th>
36 <th class="num"><?php _e('User-ID') ?></th>
37 <th><?php _e('Username') ?></th>
38 <th><?php _e('Display name publicly as') ?></th>
39 <th><?php _e('Admin-Color Scheme') ?></th>
40 <th><?php _e('User Level') ?></th>
41 <th><?php _e('Role') ?></th>
42 </tr>
43 </thead>
44 <tbody id="users" class="list:user user-list">
45 <?php
46 $wp_user_search = $wpdb->get_results("SELECT ID, user_login, display_name FROM $wpdb->users ORDER BY ID");
47
48 $style = '';
49 foreach ( $wp_user_search as $userid ) {
50 $user_id = (int) $userid->ID;
51 $user_login = stripslashes($userid->user_login);
52 $display_name = stripslashes($userid->display_name);
53 $current_color = get_user_option('admin_color', $user_id);
54 $user_level = (int) get_user_option($table_prefix . 'user_level', $user_id);
55 $user_object = new WP_User($user_id);
56 $roles = $user_object->roles;
57 $role = array_shift($roles);
58 if ( function_exists('translate_user_role') )
59 $role_name = translate_user_role( $wp_roles->role_names[$role] );
60 elseif ( function_exists('before_last_bar') )
61 $role_name = before_last_bar( $wp_roles->role_names[$role], 'User role' );
62 else
63 $role_name = strrpos( $wp_roles->role_names[$role], '|' );
64
65 $style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"';
66 $return = '';
67 $return .= '<tr>' . "\n";
68 $return .= "\t" . '<td><input type="checkbox" name="mw_adminimize_theme_items[]" value="' . $user_id . '" /></td>' . "\n";
69 $return .= "\t" . '<td class="num">'. $user_id .'</td>' . "\n";
70 $return .= "\t" . '<td>'. $user_login .'</td>' . "\n";
71 $return .= "\t" . '<td>'. $display_name .'</td>' . "\n";
72 $return .= "\t" . '<td>'. $current_color . '</td>' . "\n";
73 $return .= "\t" . '<td class="num">'. $user_level . '</td>' . "\n";
74 $return .= "\t" . '<td>'. $role_name . '</td>' . "\n";
75 $return .= '</tr>' . "\n";
76
77 echo $return;
78 }
79 ?>
80 <tr valign="top">
81 <td>&nbsp;</td>
82 <td>&nbsp;</td>
83 <td>&nbsp;</td>
84 <td>&nbsp;</td>
85 <td>
86 <select name="_mw_adminimize_set_theme">
87 <?php foreach ( $_wp_admin_css_colors as $color => $color_info ): ?>
88 <option value="<?php echo $color; ?>"><?php echo $color_info->name . ' (' . $color . ')' ?></option>
89 <?php endforeach; ?>
90 </select>
91 </td>
92 <td>&nbsp;</td>
93 <td>&nbsp;</td>
94 </tr>
95 </tbody>
96 </table>
97 <p id="submitbutton">
98 <input type="hidden" name="_mw_adminimize_action" value="_mw_adminimize_set_theme" />
99 <input type="hidden" name="_mw_adminimize_load" value="_mw_adminimize_load_theme" />
100 <input type="submit" name="_mw_adminimize_save" value="<?php _e('Set Theme', FB_ADMINIMIZE_TEXTDOMAIN ); ?> &raquo;" class="button button-primary" />
101 </p>
102 </form>
103 <?php } ?>
104
105 <p><a class="alignright button" href="javascript:void(0);" onclick="window.scrollTo(0,0);" style="margin:3px 0 0 30px;"><?php _e('scroll to top', FB_ADMINIMIZE_TEXTDOMAIN); ?></a><br class="clear" /></p>
106 </div>
107 </div>
108 </div>
109