Show Image in Plugin Development

admin2025-01-07  4

I am developing a plugin. I am fetching information using API along with Image. My code is like below.

`$this->short_code .= '<div class="ft_wi_weather_all" >' . (  ( array_key_exists( 'weather_symbol', $meta_details ) && 'on' == $meta_details['weather_symbol'][0] ) ? '<div class="ft_wi_image"><img src="' . esc_url( '/' . $this->weather_info->weather[0]->icon . '.png' ) . '"></div>' : '' );`

I am checking my Plugin code using Plugin Check plugin. I am getting an error Images should be added using wp_get_attachment_image() or similar functions.

How to show image in WordPress Plugin Development which is fetched from API ?

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736254500a211.html

最新回复(0)