[wp-hackers] user-specified default post fields

Giacomo Lacava giacomo.lacava at bakerstreetsystems.co.uk
Wed Aug 11 20:23:11 UTC 2004


Ryan Boren wrote:

> Look at the sample plugin I posted.  It can be extended to handle
> however many custom fields a person could want.  Fields could be
> packaged per plugin, as a set, or whatever.  No need to go hacking on
> the core to get this now. 

Totally agree. For the lazy sods on the list, you hack on the main UI 
via plugin in two steps:
- first, output the controls you want to add
- second, output some javascript code to position the control where you 
need it, e.g. to put a control just before the "Save" row of buttons:
buttonrow = document.getElementById("save").parentNode;
buttonrow.insertBefore(newControlElement, someButtonAlreadyThere);

These two scripts must be hooked to admin_footer. Done it on my Version 
Control plugin, it works great.

Giacomo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: giacomo.lacava.vcf
Type: text/x-vcard
Size: 301 bytes
Desc: not available
Url : /pipermail/hackers_wordpress.org/attachments/20040811/569bff63/giacomo.lacava.vcf


More information about the hackers mailing list