WordPress.org

Forums

Hueman
[resolved] Front-end Editor compat (4 posts)

  1. Ella Iseulde Van Dorpe
    Member
    Posted 1 year ago #

    Hi,

    I'm working on the Front-end Editor feature plugin.
    http://make.wordpress.org/ui/tag/front-end-editor/

    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?

    Thanks!

  2. Alexander Agnarson
    Member
    Theme Author

    Posted 1 year ago #

    Hi there! Thanks for informing me about that.

    Any chance you could do a pull request here with the suggested changes if they are quick?

    (The theme also has a planned post format rebuild, but I'm awaiting OptionTree's take on post formats - which is a work in progress)

  3. Ella Iseulde Van Dorpe
    Member
    Posted 1 year ago #

    Of course, wasn't sure you whether or not you were developing on Github.

  4. Alexander Agnarson
    Member
    Theme Author

    Posted 1 year ago #

    Cheers!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.