I am currently writing a plugin for my client in wordpress. The issue I am having is when a user clicks on edit to change a record I am not sure how to create the admin link to do this.
i.e.
<a hr开发者_StackOverflow中文版ef="<?php echo get_bloginfo('url'); ?>/wp-admin/admin.php?page=wpsc_product_seo_details">Edit</a>
function wpsc_product_seo_details()
{
echo "<h2>Hello</h2>";
}
I know my markup for the tag is probably wrong but I was just testing. Do I need to register a hook to do this.
The hook you are looking for is to add actions to the sidebar; there are various ways - add_options_page will add to the options menu, for example. add_menu_page will create a new group for you to add your links.
Check the documentation on adding admin menus for more information.
精彩评论