Support » Plugin: WP Voice » abs_path_to_url Method doesn’t work with all installations

  • Resolved lucastello

    (@lucastello)


    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)

    • This topic was modified 2 months, 2 weeks ago by lucastello.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author dna88

    (@dna88)

    Hi,

    Many thanks for the nice words and bringing this issue to our attention. You are right. We will fix this accordingly and release a new version early next week.

    Thank you again!

    Thread Starter lucastello

    (@lucastello)

    Thanks for the quick answer…
    What about the onSend js callback?
    sth like

    
    if(vmwpmdpContacterWP.onSend){
    	vmwpmdpContacterWP.onSend( cForm )
    }
    

    is there any public repository where i can collaborate?

    • This reply was modified 2 months, 2 weeks ago by lucastello.
    • This reply was modified 2 months, 2 weeks ago by lucastello.
    Plugin Author dna88

    (@dna88)

    Hi,

    We released a new version with your requested updated.

    We have not gotten around to uploading to a git account yet. Will do so very soon and let you know.

    We appreciate your feedback and suggestions deeply.

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.