[wp-hackers] Structured Blogging - getting extra plugin hooks inserted in the WP code

Owen Winkler ringmaster at midnightcircus.com
Tue Dec 13 02:02:18 GMT 2005


Phillip Pearson wrote:
> The reason I'm writing here is that to change the editing interface this 
> extensively, we had to step outside the plugin API.  We've copied 
> post.php to sb-post-common.php and edit-form.php to sb-edit-form.php, 
> made our changes in there, and used them when publishing the new post 
> types.  This isn't much fun, as it means we need to track post.php and 
> edit-form.php and release a new version whenever anything important 
> happens.

Most of the hooks you have requested can be accomplished using output 
buffering from the admin_head hook or DOM scripting from the 
admin_footer hook.

You can probably sink publish_post and/or save_post to redirect to where 
you want after a post is saved.

One place that's troublesome to script into is the DBX boxes on the 
Write page, since DBX modifies them before a newly added DOM 
addLoadEvent function can shift new things into that div.  An additional 
hook in that area would be useful for simplifying adding things into 
that area, and might also be useful for containing your specialized form 
fields.

Owen


More information about the wp-hackers mailing list