[wp-hackers] Modifying admin forms via plugins

Zarniwoop florian.jung at gmail.com
Tue Jun 22 21:44:24 UTC 2004


On Tue, 22 Jun 2004 17:02:30 -0400, Owen Winkler
<ringmaster at midnightcircus.com> wrote:
> [...]
> First, we plugin writers would like a nice, non-javascript way to get
> our form elements inside the WordPress post form.
> 
> Currently, my plugin uses an action called 'wp_edit_advanced'.  I think
> someone else (Zarniwoop?) might be using this, too.  What it's called
> doesn't matter too much to me, nor does the fact that my positioning is
> different from your suggestion.  I insert the do_action(...) just above
> the </form> tag so my content appears below the custom fields fieldset.
> That seemed the least intrusive, and my form can always (in fact, it
> does) add an additional Submit button so the user need not scroll a lot.

(I already postet it to the list but because the topic changed I'll
post it again:)
I would suggest to add two hooks to the advanced edit form, since
there a two major scenarios I can imagine:
1) One hook for small plugins like which need to be very close to the
post content area (e.g. additional quicktags, popup windows like Image
Browser,...),
2) Another one below the user-defined fields for larger applications
(e.g. exhibit,... ).


> The second issue is the issue of plugin configuration options.
> 
> We plugin writers would like to store our config options in the
> database.  We can, and that's cool, but there is no common interface for
> us to use to edit those values, nor is there a hook available to display
> such an editor in the admin interface directly.
> 
> A page should exist that displays a section of the options table for
> editing - perhaps even using the metadata in the optiongroups and
> optiongroup_options tables (are these b2 remnants or unused new stuff?)
> - so that we don't have to write our own interfaces for this.  It could
> filter based on an option group so that only the settings that apply to
> a single plugin (which would name an option group) would appear in the
> table at one time.
> 
> Then, plugin authors could include a static link in their plugin
> description that points to the settings page with the filter in the
> querystring (wp-settings.php?filter=myplugin).
> 
> Owen

Maybe you can have a look at
http://mpt.net.nz/archive/2004/05/23/design for why I don't consider
an auto-generated approach to plugin configuration useful.
Nevertheless it would be an easement to have a common way to manage
plugin options. I imagine something like `set_option('plugin
name','option','value')` and `get_options('plugin name','option')`
without having to interface directly with the database.

It would be nice to have a "Configure..." link in the
admin-panel/plugins because I think this is the place it belongs to
(just below activate/deactivate). As a workaround for WP 1.2 the
configuration link could be added to the descriptional text.



More information about the hackers mailing list