WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

NKMImageField

NKMImageField provides an easy graphical interface for inserting image URLs from the Media gallery into custom fields. **NOTE:** Version 0.4.1 fixes

Instructions

The plugin installs a new administration screen under the Settings menu. Use this screen to create, edit, and remove new fields. There is no limit to the number of fields that may be created.

Please note that when a field is deleted, all values for that field for all posts are also deleted.

Data is not destroyed when the plugin is uninstalled.

Each field and its description are displayed under the content edit box on the Post and Page writing and editing screens. To insert an image into a field, click the graphic beside the field, choose an image from the gallery (or upload a new one), and click the "insert into post" button. The image's URL will appear in the text field. Any changes will be saves when the page/post is saved.

Template Tags

Image URLs are stored in a separate table rather than alongside other post metadata (aka customfields). The data can be retrieved in templates in one of three ways:

get_nkm_imagefields([$post_id]) -- Returns an array containing all custom image field data for the current post.

get_nkm_imagefield($fieldname [, $post_id]) -- Returns an array containing all data for the indicated field for the current post.

get_nkm_imageurl($fieldname [, $post_id]) -- Returns a string containing the URL for the indicated field for the current post.

All three template tages also take an optional $post_id parameter indicating the post for which to retrieve the image field. This parameter is optional within the Loop (where it will default to the current post) and mandatory outside the Loop.

Compatibility

This plugin currently requires PHP 5 in order to run. It will not install properly using PHP 4.

Acknowledgements

Thank you to Hani AbuGhazaleh (http://www.mmbarn.com/) for his invaluable assistance in bug hunting and troubleshooting.

Requires: 2.7 or higher
Compatible up to: 2.8.6
Last Updated: 2009-12-16
Downloads: 2,790

Ratings

4 stars
4.2 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

50,2,1
0,1,0
100,1,1
100,1,1
100,1,1
0,2,0
0,1,0