{"id":1310,"date":"2018-08-08T09:50:58","date_gmt":"2018-08-08T09:50:58","guid":{"rendered":"https:\/\/www.taywa.ch\/blog\/?p=1310"},"modified":"2018-08-08T09:50:58","modified_gmt":"2018-08-08T09:50:58","slug":"how-to-make-emil-olssons-hi-response-full-wordpress-theme-php-7-2-compatible","status":"publish","type":"post","link":"https:\/\/www.taywa.ch\/blog\/wordpress\/how-to-make-emil-olssons-hi-response-full-wordpress-theme-php-7-2-compatible\/","title":{"rendered":"how to make Emil Olssons hi-response\/hi-response-full\/hi-response-single WordPress Theme php 7.2 compatible"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>Replace\u00a0<strong>eregi<\/strong> with\u00a0<strong>preg_match <\/strong>in:<\/p>\n<p>snippets\/image-grab-src.php<\/p>\n<pre class=\"lang:php decode:true\">&lt;?php\r\n\/\/ Grab image, if .gif, always use full size to make sure it displays correctly\r\n$image = wp_get_attachment_image_src($attachment_id);\r\n\/\/ old if (eregi('.gif', $image[0])) {$size = \"full\";}\r\nif (preg_match('\/.gif\/i', $image[0])) {\r\n    $size = \"full\";\r\n}\r\n$image = wp_get_attachment_image_src($attachment_id, $size);\r\n?&gt;<\/pre>\n<p>&nbsp;<\/p>\n<p>snippets\/image-grab-hover-src.php<\/p>\n<pre class=\"lang:php decode:true\">&lt;?php\r\n\/\/ Grab image, if .gif, always use full size to make sure it displays correctly\r\n$image_hover = wp_get_attachment_image_src($attachment_id_2);\r\n\/\/ old if (eregi('.gif', $image_hover[0])) {$size = \"full\";} \r\nif (preg_match('\/.gif\/i', $image_hover[0])) {\r\n    $size = \"full\";\r\n}    \r\n$image_hover = wp_get_attachment_image_src($attachment_id_2, $size);\r\n?&gt;<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Replace\u00a0eregi with\u00a0preg_match in: snippets\/image-grab-src.php &lt;?php \/\/ Grab image, if .gif, always use full size to make sure it displays correctly $image = wp_get_attachment_image_src($attachment_id); \/\/ old if (eregi(&#8218;.gif&#8216;, $image[0])) {$size = &#8222;full&#8220;;} if (preg_match(&#8218;\/.gif\/i&#8216;, $image[0])) { $size = &#8222;full&#8220;; } $image = wp_get_attachment_image_src($attachment_id, $size); ?&gt; &nbsp; snippets\/image-grab-hover-src.php &lt;?php \/\/ Grab image, if .gif, always use<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[206,205,186],"class_list":["post-1310","post","type-post","status-publish","format-standard","hentry","category-wordpress","tag-hi-response","tag-theme","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/posts\/1310","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/comments?post=1310"}],"version-history":[{"count":1,"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/posts\/1310\/revisions"}],"predecessor-version":[{"id":1311,"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/posts\/1310\/revisions\/1311"}],"wp:attachment":[{"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/media?parent=1310"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/categories?post=1310"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/tags?post=1310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}