• This is a really nice plugin, thanks for taking the time to write and maintain it.

    Using native WP galleries, I cannot get photonic to use the “description” field vs. the “caption” field (as seen in the WP media editor). If the “caption” is empty but the “description” is not, photonic will not display any content.

    I believe this is because at line 127 of Photonic_Native_Processor you always use the caption:

    $photo_object['description'] = esc_attr($wp_details['caption']);

    If this is expected, perhaps the plugin can use the WordPress labels as seen in the media item library, where ‘caption’ is equivalent to the post_excerpt field and ‘description’ is equivalent to the post_content? (So the shortcode caption options might be “title-caption” or “caption”, etc?)

    This could also potentially be solved by calling get_the_excerpt using the attachment ID, as WP would (in theory) look at the post_caption field first and if nothing was there automatically generate an excerpt from the post_content field.

Viewing 1 replies (of 1 total)
  • Plugin Author Sayontan


    This is intended behaviour for the plugin.

    Photonic looks at two things – the title and the caption. In this matter the behavior is consistent with WP. Without Photonic, when you insert a photo using the “Add Media” button, if you put in a title, that is what shows up when you hover over a picture, and if you put in a caption, that shows up below the photo. The description that you put in is never shown by WP. In line with this, Photonic only considers the title and the caption, and not the description, and there is no intention of changing this behaviour, since it has been this way since the very early versions.

    I can consider adding a filter to the generated text roughly around the line of code that you pointed out, but I cannot change the existing functionality.

Viewing 1 replies (of 1 total)
  • The topic ‘“Caption” vs. “Description”’ is closed to new replies.