// Add custom submenu page for restricted name change users function add_restricted_name_change_users_submenu_page() { add_submenu_page( ‘users.php’, // parent slug __(‘Restricted Name Change Users’), // page title __(‘Restricted Name Change Users’), // menu title ‘manage_options’, // capability ‘restricted_name_change_users’, // menu slug ‘display_restricted_name_change_users’…Continue reading
function remove_color_scheme_options() { remove_action(‘admin_color_scheme_picker’, ‘admin_color_scheme_picker’); } add_action(‘admin_init’, ‘remove_color_scheme_options’);Continue reading
if ( ! is_admin() || ! function_exists( ‘get_current_screen’ ) ) return; $current_screen = get_current_screen(); if ( $current_screen && ‘profile’ === $current_screen->id ) { // Your code here } add_filter( “aioseo_user_profile_tab_disable”, “__return_true” );Continue reading
function modify_user_list_columns($columns) { if (!current_user_can(‘edit_users’)) { return $columns; } // Add our custom column right after the ‘pmpro_membership_level’ column. $new_columns = array(); $add_after = ‘pmpro_membership_level’; // Adjust if necessary. foreach ($columns as $key => $value) { $new_columns[$key] = $value; if…Continue reading
// Register the form field and save action only if the Code Snippets plugin is active if (function_exists(‘add_action’)) { // Show the new username field on the user profile page for admins add_action(‘edit_user_profile’, ‘custom_admin_edit_username_field’); // Save the new username if…Continue reading
add_action(‘admin_footer’, ‘hide_toolbar_checkbox_js’); function hide_toolbar_checkbox_js() { ?>Continue reading
add_action(‘admin_menu’, ‘add_custom_users_sorting_link_as_first’); function add_custom_users_sorting_link_as_first() { global $submenu; // Check if current user has the capability to list users if (!current_user_can(‘list_users’)) { return; } // Define the custom submenu item $custom_submenu_item = array( ‘Last Registered User’, // Menu title ‘list_users’, //…Continue reading
function hide_elements_in_profile_page() { $screen = get_current_screen(); // Check if the current screen is the profile or user edit screen if ( $screen->id == “profile” || $screen->id == “user-edit” ) { echo ‘ ‘; } } add_action(‘admin_head’, ‘hide_elements_in_profile_page’);Continue reading
function custom_admin_css() { echo ‘ ‘; } add_action(‘admin_head’, ‘custom_admin_css’);Continue reading
function custom_admin_styles_and_scripts() { ?>Continue reading