The docs are a bit vague. This is all they say: Registers theme support for a given feature.
I had assumed that this meant, for example, your site won’t support Featured Images unless you add ‘post-thumbnail’ support. I usually always enable it on all my websites. But I’m playing around with Codeception/wp-browser and I figured I should write a test for all my functions, so I wrote a test where the test programatically uploads a file and uses set\_post\_thumbnail to a post without first adding ‘post-thumbnail’ support, expecting the test to fail. But instead, it worked.
Does this mean add\_theme\_support is only adding these capabilities to the GUI? And you can set a Featured Image for a post regardless of if you added theme support for post-thumbnails? Also, how would I write a good unit test for add\_theme\_support?
[ad_2]