views:

43

answers:

1

While editing a post that contains an image, WP attaches a properties inspector icon over the image to allow editing basic properties such as size, alignment, link etc.

I'd like to know how difficult it would be to hack into this dialog screen and add some custom programming to the link area.

I'd like to add a popup menu there that I can access with the click of a button (next to the existing "Link to Image" button.

I'd prefer to hook into this dialog via a file in my theme's folder or via a plug-in. I don't want to alter the wordpress code itself (to allow this to be more portable and theme specific).

+1  A: 

The edit image popup is a TinyMCE plugin (the rich text editor that Wordpress uses), the files for which are in wp-includes/js/tinymce/plugins/wpeditimage/.

As such you can't simply use the Wordpress plugin API to modify it. You'd need to create your own TinyMCE plugin, probably by duplicating the wpeditimage plugin and adding your extra functionality. You'd also need to create a Wordpress plugin to activate the TinyMCE plugin, see these codex pages for more information on working with TinyMCE plugins in Wordpress:

Richard M