Opened 17 years ago
Closed 15 years ago
#4064 closed enhancement (fixed)
Extra API Hooks
Reported by: | mwdmeyer | Owned by: | |
---|---|---|---|
Milestone: | 2.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | needs-patch dev-feedback |
Focuses: | Cc: |
Description
I'm in the process of writing an event plugin. Unfortunately there just isn't enough event/trigger type hooks.
I'd like to see the following hooks added to Wordpress:
+wp_upgrade that runs in wp_upgrade(). This would be used to let plugins know that an upgrade is about to happen (so they can disable themselves). wp_upgrade might want to pass the version of Wordpress that is being upgraded to.
+An event that is triggered when a login fails. This should pass the username that was tried, so I can track failed login attempts.
+An akismet trigger when the connection to akismet times out or fails.
+A trigger when a trackback or pingback fails. The trackback url should be passed to this.
+A trigger when an email is sent. This should pass the TO: email address.
+A trigger once an (wordpress) upgrade has been completed, again passing the new version upgraded to.
Thanks for your time.
Attachments (1)
Change History (8)
#2
@
17 years ago
Akismet stuff can go to WP-plugins.org Trac (http://dev.wp-plugins.org/).
Apart from that, I don't agree that we shouldn't put more hooks in the core, especially if it's for plugin development. One of the "bragging points" is that we are extremely extensible, but there *are* a few places where hooks should go.
#3
@
17 years ago
I didn't say we shouldn't put hooks. I said we shouldn't litter hooks where they aren't necessary. One of the nice things is that with the way that the system is set up, for many tasks you don't necessarily need hooks, you can use standard PHP tools to find a way to get it done. When the method is simple, I don't see the need to litter the code with hooks.
Failed logins can be detected currently with no additional hooks. As can the upgrade script being run. URL-fu is sufficient, imho, no need to litter the code with unnecessary hooks.
For sending e-mails, right now you can override the wp_mail function with your own and add whatever hooks at whatever point you'd like.
Akismet stuff needs to go somewhere else, this isn't the place.