override has_post_thumbnail

Is there a way to alter/change core has_post_thumbnail function?

I need to check folder on server with images first before code looks for post image attachment.

I see lots of filters to change image html but they either affect single post page or loop thumbnail and with woocommerce several other places plus admin tables, etc.

I need to place the server directory check before it even hits _post_thumbnail() or get_image so it looks like has_post_thumbnail is very first check unless I’m wrong.

Please help, suggest what can be done.

Thank you

Read more here:: override has_post_thumbnail

Leave a Reply

Your email address will not be published. Required fields are marked *