function custom_admin_bar_links($wp_admin_bar) { // Check if the current user has the ‘manage_options’ capability if (!current_user_can(‘manage_options’)) { return; // Exit if the user is not an administrator } // Add a link to the ‘Plugins’ admin page $wp_admin_bar->add_node(array( ‘id’ => ‘admin-bar-plugins’,…Continue reading
function extend_user_search($wp_user_query) { if (!is_admin() || strpos($wp_user_query->query_where, ‘@’) !== false) { return; } if (empty($_GET[“s”])) { return; } global $wpdb; $search_term = sanitize_text_field($_GET[“s”]); $search_terms = explode(‘ ‘, $search_term); // Prepare the search term for a LIKE query. $search_term_like = ‘%’…Continue reading
// Add custom JavaScript to hide the “Source” column in the user list function hide_source_column_script() { ?>Continue reading
// Add new column to the Users page in WP Admin, right after the username function add_player_name_column_next_to_username($columns) { $new_columns = []; foreach ($columns as $key => $title) { $new_columns[$key] = $title; if ($key == ‘username’) { // Insert the Player…Continue reading
function custom_admin_logo() { $image_url = get_site_url() . ‘/wp-content/uploads/2024/04/elementor.png’; // Make sure the path is correct echo ” “; } add_action(‘admin_head’, ‘custom_admin_logo’);Continue reading
add_action(‘admin_footer’, ‘duplicate_names_click_handler’); function duplicate_names_click_handler() { // Only add this script on the Users page to avoid unnecessary loading on other admin pages. $current_screen = get_current_screen(); if ($current_screen && ‘users’ === $current_screen->id) : ?>Continue reading
/** * Remove subscription delay for current or past members. This will remove all subscription delays from checkout for any level if the user is an active member or had a prior level (and is renewing). * * title: Subscription…Continue reading