回答編集履歴
1
add
test
CHANGED
@@ -1 +1,4 @@
|
|
1
|
-
|
1
|
+
念のため
|
2
|
+
[get_the_post_thumbnail_url()](https://developer.wordpress.org/reference/functions/get_the_post_thumbnail_url/)や[exif_imagetype()](https://www.php.net/manual/ja/function.exif-imagetype.php)が何を返しているかは見ておいた方が良いと思います。
|
3
|
+
|
4
|
+
あとは、拡張子は単なる文字列なので一例として[ . ]で[explode](https://www.php.net/manual/ja/function.explode.php)した結果の配列の最後の文字列が所定(自身で決めた)拡張子文字列とイコールかどうかで比較すれば、とりあえず判断できます。
|