We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Needed a shortcut here, which I solved with:
/** * Add "Switch to User" button to User Profile screen */ add_action('wp_user_profiles_status_metabox_after', function ($user) { if (! function_exists('switch_to_user') || ! $user || ! current_user_can('switch_to_user', $user->ID)) { return; } $url = add_query_arg([ 'redirect_to' => rawurlencode(user_switching::current_url()), ], user_switching::switch_to_url($user)); ?> <div class="submitbox"> <div id="major-publishing-actions"> <div id="publishing-action"> <a href="<?php echo esc_url($url); ?>"><?php esc_html_e('Switch To', 'user-switching') ?></a> </div> <div class="clear"></div> </div> </div> <?php });
It adds a "Switch to this user" link below the save button.
Is this something that could land in the plugin? If yes, happy to add a PR if you let me know where it fits best.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Needed a shortcut here, which I solved with:
It adds a "Switch to this user" link below the save button.
Is this something that could land in the plugin? If yes, happy to add a PR if you let me know where it fits best.
The text was updated successfully, but these errors were encountered: