I know I can get a post’s featured image using get_the_post_thumbnail() but how would I go about programmatically setting a post’s featured image in a plugin. After looking through the data in the wp_posts and wp_postmeta tables, I can see no difference between an image embedded within a post and one set as a featured image.