small change to the code
-
On line 17, you have:
if(!$atts['size'])
size might not be defined which triggers a warning telling you that your using an invalid offset. It should be replaced by:
if(empty($atts['size']))
which checks if it’s set first.Thanks for the plugin.
http://ww.wp.xz.cn/extend/plugins/add-post-thumbnail-shortcode/
The topic ‘small change to the code’ is closed to new replies.