I’m working on the Front-end Editor feature plugin.
I noticed that you include a caption and description with the feature image.
$caption = get_post(get_post_thumbnail_id())->post_excerpt; $description = get_post(get_post_thumbnail_id())->post_content;
Since we manipulate the functions so that featured images areas are displayed, even if there is none, the theme tries to get the caption an description of
get_post_thumbnail_id( true ). Which will either return the first post or throw notices when ‘Trying to get property of non-object’.
Could you add some additional checks to make sure
get_post()returns an object?
- The topic ‘Front-end Editor compat’ is closed to new replies.