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'">< Back</button>
Removing styling from button for readability.
I believe this would be a more dynamic way of returning the user to the admin page.
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/.
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'">< Back</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'">< Back</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 URLlocalhost/wp-admin/
every time, even if it should return them to the URLlocalhost/wordpress/site2/wp-admin/
.