• If you upload an image to be used as the post featured image it is added to the media library.

    We have a situation where we needed *all* uploaded media to be added to the media library. We’re using the Gravity Media LIbrary add-on to achieve this, which works well

    https://www.gravityforms.com/add-ons/media-library/

    The Media LIbrary plugin gets in first, so the issue we have is that the Post Update plugin doesn’t check to see if the file is already in the media library before it does its thing so you end up with a duplicate.

    This could be rectified by putting a check in the ‘process_featured_image’ method to see whether the $file_path variable is already in the library.

    if( attachment_url_to_postid($file_path) ) {
    return;
    }

    There might be other edge cases elsewhere but hopefully that’s something that could be added?

  • You must be logged in to reply to this topic.