How to check if single.php has already called the_post_thumbnail function

There are several hooks in get_the_post_thumbnail for example

  • begin_fetch_post_thumbnail_html
  • end_fetch_post_thumbnail_html

/wp-includes/post-thumbnail-template.php

You could add a function to one of these actions which removes your filter on first run.

If you need further help with this please add some code how you filter the_content.