indieweb / wordpress-micropub

A Micropub Endpoint plugin for WordPress
https://wordpress.org/plugins/micropub
51 stars 12 forks source link

Uploaded URLs filenames wont include query strings #258

Closed Ruxton closed 2 years ago

Ruxton commented 2 years ago

Ensures that when sent a URL with query strings (like instagram) the filename saved doesnt include the query string.

dshanske commented 2 years ago

WordPress would use wp_parse_url, not parse_url.

https://www.php.net/manual/en/features.file-upload.post-method.php

You also don't need to access the array, parse_url and wp_parse_url have a second parameter.

It should be wp_parse_url( $url, PHP_URL_PATH )