Skip to main content
12 events
when toggle format what by license comment
Feb 28, 2011 at 20:17 comment added wyrfel @Jan Fabry: Ahh you just want to get the reputation for both. ;-) Naa, you're right, of course. Just because i asked both out of the same motivation doesn't mean they are really duplicates.
Feb 28, 2011 at 20:13 comment added Jan Fabry @wyrfel: No, the other question is good when you are developing a plugin. This question is good when you are reading the WP code. It's not guaranteed that people will find this question when they are looking for the other one. And maybe there are other good ways to handle plugin actions besides this one?
Feb 28, 2011 at 19:33 comment added wyrfel @Jan Fabry: Lol...i think that should be flagged as a duplicate, now. ;-) Thanks for all that.
Feb 28, 2011 at 19:31 comment added Jan Fabry @wyrfel: OK, the fact that admin.php gets included in many (but not all) admin pages put me on the wrong track. This hook only works when you call admin.php directly. I have updated this answer, and now I know enough to answer your related question!
Feb 28, 2011 at 19:25 history edited Jan Fabry CC BY-SA 2.5
admin.php must be called directly for this to work
Feb 28, 2011 at 18:50 history edited Jan Fabry CC BY-SA 2.5
Removed incorrect part of Akismet description
Feb 28, 2011 at 18:48 comment added wyrfel @Jan Fabry: The noheader qv is a good hint, too. Thanks for digging that up.
Feb 28, 2011 at 18:46 vote accept wyrfel
Feb 28, 2011 at 18:35 comment added Jan Fabry @wyrfel: I know, I just finished a major edit of my answer. It now includes how Akismet does it. The trick is to not use your plugin page as the form action handler. When you are on a plugin page, admin.php even calls exit before this action is reached, so it is not called at all.
Feb 28, 2011 at 18:34 history edited Jan Fabry CC BY-SA 2.5
Major correction for plugin pages, added Akismet example.
Feb 28, 2011 at 17:59 comment added wyrfel @Jan Fabry: You're a bit mistaken there (i studied admin.php up and down). It includes everything (admin-header.php, the pages themselves, and admin-footer.php) within that single file. And after it's done all that comes that call. So it is the last thing executed. Thanks for the pointers, though, i'll have a look.
Feb 28, 2011 at 17:38 history answered Jan Fabry CC BY-SA 2.5