• Hi, I am creating plugin to help with multisite/multilingual using wordpress network install. When user saves post I need to sync attachments to other blogs in the network. So what I did was call wp_handle_upload with attachment details, which works really well. Unfortunately watermarking plugin(latest version at the moment) detects that file was uploaded from frontend(it’s actually done from admin section).

    I’ve used xdebug to track down the problem. And it seems that the problem is in Image_Watermark/handle_upload_files method, and it’s there because wp_get_referer returns url without domain and admin_url returns link with domain.

    For example: referer ‘/wp-admin/post.php’ and admin url ‘https://my-wp-blog.com/wp-admin/post.php’

    https://www.ads-software.com/plugins/image-watermark/

  • The topic ‘plugin doesn't handle handle_upload_files correctly’ is closed to new replies.