WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Well, I'm looking for source code of these two small containers (PHP backend, HTML frontend & JS used to attach the image):

Featured Image

I want to build a theme option based on Featured Image code, but I'm not able to find it. I'm pretty sure it is somewhere in wp-admin directory, but I've spent loong time there and found nothing.

Any clues?

share|improve this question
search for set-post-thumbnail- media-upload.php, set-post-thumbnail.js – Milo Aug 25 '11 at 15:15
+1 for the "most porn pic posted on WPSE"! Nice way to get answers! – kaiser Aug 25 '11 at 19:46
up vote 0 down vote accepted

Markup of that metabox is generated by _wp_post_thumbnail_html() function, contained in wp-admin/includes/post.php.

share|improve this answer
you are the man! But I'm starring at that function and I'm still unable to reconstruct the ajax-way image appears, anyways thank you! – Wordpressor Aug 25 '11 at 23:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.