Plugin: How to make links in admin page open up inside of the admin panel


In writing my plugin, I’ve added my menus and submenus to the admin page. The pages load and perform as meant. What I’m attempting to do is create some links inside of these pages that may go a parameter to a brand new page. I’m close to undertaking this but the page always opens up outdoors of the admin display. I’m fairly new at this and completely caught.

Here is a screenshot.

How can I get a link from an admin page to open inside of the admin panel?

Here is the perform I’m calling to get the submit data which can go the id to the page that handles the database edit.

add_action( 'admin_post_add_recid', 'prefix_admin_add_recid' );
perform prefix_admin_add_recid() {        
    embody( plugin_dir_path( __FILE__ ) . '/management_tools/edit.php' );

and the hyperlink that calls it, the place 1 is the id that i want to go to the edit page.


Here is background on what/why I’m doing this if you would like to be bored. I’m migrating content from a non-wordpress web site. The solely factor wordpress can’t accommodate proper out of the box is a few previous php database stuff that has been around for awhile. I need to put this database code right into a plugin in order that it can be managed inside wordpress, backed up and migrated if that want ever arises. It is a particular use plugin that’s not going to be distributed. The present code hasn’t been modified because it was created and in all probability will not want modified again as soon as it’s in wordpress. All of the database learn and insert code is working inside of the plugin. Basically I’m actually close to finishing the process with out having to rewrite it from scratch which I haven’t got the budget to do. I simply can’t discover a means to open the edit/delete admin pages inside of the admin panel. Thanks for studying and for any assist you to can provide.


Source link

Leave a Reply