Skip to content
New issue

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

Back button returns user to potentially wrong admin URL. #25

Open
plutotom opened this issue Feb 23, 2022 · 1 comment
Open

Back button returns user to potentially wrong admin URL. #25

plutotom opened this issue Feb 23, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@plutotom
Copy link

The back button on pages, Edit, Results, and Clone returns the user to a URL that is hardcoded as <button onclick="window.location = '/wp-admin/admin.php?page=sjs-main-menu'">&lt&nbspBack</button>

Removing styling from button for readability.

I believe this would be a more dynamic way of returning the user to the admin page.

<button onclick="window.location = '<?php echo get_admin_url() ?>?page=sjs-main-menu'">&lt&nbspBack</button>

I bring this up because if a developer is working in a development environment then they may have a URL that looks like localhost/wordpress/site2/wp-admin/admin.php?page=sjs-main-menu as opposed to assuming the URL: localhost/wp-admin/admin.php?page=sjs-main-menu.

The problem is that in the current implementation of onclick="window.location = '/wp-admin/ will return the user to the URL localhost/wp-admin/ every time, even if it should return them to the URL localhost/wordpress/site2/wp-admin/.

@plutotom plutotom changed the title Back button returns user to potentially wrong admin page. Back button returns user to potentially wrong admin URL. Feb 23, 2022
@tsv2013 tsv2013 added the enhancement New feature or request label Feb 24, 2022
@tsv2013
Copy link
Member

tsv2013 commented Feb 24, 2022

Thank you for the feedback. We'll take it in account during future plugin improvements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants