abs_path_to_url Method doesn’t work with all installations
-
Hi,
Very nice plugin!
But i have an issue with the audio file link:
The current implementation of abs_path_to_url only works when the uploads folder is inside the wordpress folder.
This can be fixed by replacing:$url = str_replace( wp_normalize_path( untrailingslashit( ABSPATH ) ), site_url(), wp_normalize_path( $path ) );
with
$upload_dir = wp_get_upload_dir(); $url = str_replace( wp_normalize_path( $upload_dir['basedir'] ), $upload_dir['baseurl'], wp_normalize_path( $path ) );
Another useful feature would be to have a filter to add a callback for sendButton ajax request.
( i can’t find the plugin on GH otherwise i would propose a pull request)
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘abs_path_to_url Method doesn’t work with all installations’ is closed to new replies.