Can anyone tell me how to auto fill/add same image title in title, caption, alt text and description while uploading any image in my WordPress Posts.
3 comments
Comments are closed.
Can anyone tell me how to auto fill/add same image title in title, caption, alt text and description while uploading any image in my WordPress Posts.
Comments are closed.
added_post_meta
seems like a good time to hook into a new image. Not only is the default meta already set but the function gives you the$post_id
along with$meta_value
which holds the attachment metadata. From there you can get all the fields and set the ones you want.Reference taken from
For a simpler solution, you can use this WordPress plugin that I made a while back.
The plugin comes with a bulk updater too that will update the image attributes for images already in your media library if you want to do that as well.