1

If the $context variable isn't empty inside wp_insert_attachment(), post meta info gets added with a meta key of _wp_attachment_context. What is the intended purpose of _wp_attachment_context? For example, can someone give some examples of the meta values I might store with this key?

0

After a little more research, I found out that WordPress stores values such as custom-header and custom-background against the meta key. I guess it's a way to distinguish them from the rest of the attachments in the system.

  • So what exactly does custom-header mean in wp? What does it mean if it has _wp_attached_file postmeta that is a serialized WP_Error? – NoBugs Mar 29 '16 at 6:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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