Question

What is the definite hook which identifies links.php page (add, edit, delete, etc. Blogroll Links), and only this page?

Any help would be appreciated.

Thanks, cadeyrn

EDIT

Sorry, I forgot to mention, I need this hook in the admin area. I have a plugin, that brakes an other one, because both are triggered by the admin_menu add_action. Therefore I need an add_action point that is only valid for the admin menu's link edit/add/delete part.

Was it helpful?

Solution

OK, I made an awful, but working solution: the hook is admin_menu, than, in the called function, I added

if( strstr($_SERVER['PHP_SELF'],'link.php')

in the begining.

If there's a better solution, please someone send it.

OTHER TIPS

Inside the (public) wp template hierarchy there's no links.php file expected. Links are a built in taxonomy, so I (guess) it's if ( is_archive( 'link_category' ) ) /* do stuff */.

Or are you talking about admin pages?

Hook for what exactly?

And in any case it is easy to use any hook and check if you are at the right page. For example by comparing global $hook_suffix variable to link-manager.php (there is no links.php by the way). There is also block of dynamic hooks that rely on this variable in admin-header.php.

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top