Add select field to media uploader that adds a class to the image
To apply the class you need a custom function to do something with the value of your setting. To make sure the selected stays selected use the WP selected() function $form_fields[‘image-type’][‘html’] = “<select name=”attachments[{$post->ID}][profile_image_select]”>”; $form_fields[‘image-type’][‘html’] .= ‘<option ‘.selected(get_post_meta($post->ID, “_profile_image_select”, true), ‘default’,false).’ value=”‘ . $normal_image . ‘”>Normal Image</option>’; $form_fields[‘image-type’][‘html’] .= ‘<option ‘.selected(get_post_meta($post->ID, “_profile_image_select”, true), ‘default’,false).’ value=”‘ … Read more