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

Jeff Minard jeff at jrm.cc
Tue Dec 13 02:00:50 GMT 2005


Phillip Pearson wrote:
> - the ability to change where post.php redirects to after a post is 
> published.
> - do_action() calls before and after the edit form (or maybe just the 
> 'description' field) is displayed  
> - the ability to change the 'Write Post' heading into something else.

Main point...

> The reason I'm writing here is that to change the editing interface this 
> extensively, we had to step outside the plugin API. 

This is not entirely true. I made a plugin that does a *lot* of what SB 
does while working on a project for my job.

I, too, need to change H2's and other elements on the page 
significantly, and I didn't want to duplicate the page in code (for the 
same reasons you cited.)

What I ended up doing broke down to using JavaScript to heavily modify 
the look and feel of the post page -- including, at points, removing or 
adding new form elements.

I know, not every one has JS, but if we put aside that single digit 
percentage (who probably DONT run blogs, let along Structured Blogs) 
this is actually a really nice solution. Utilizing things like 
cssQuery[1] and some handy hooks in the admin_head allows you to get 
styles ready, and then at the post_editing (wrong name) hook you can 
insert the appropriate JS and BAM! it's good to go.

If this (JS) really doesn't appeal to you that's cool. I don't know that 
2.0(1.6) would get these changes, but plugin hooks certainly aren't too 
much to ask of 2.1 (2.0.1?)

Jeff Minard


[1] http://dean.edwards.name/my/cssQuery/


More information about the wp-hackers mailing list