Hi!
I am running 3.0 alpha (latest build) and P2 on my local machine, and there is an issue witht he mdeia uploader buttons: their URL is http://localdomain.dev/wp-admin/http://localdomain.dev/wp-admin/images/media-button-image.gif, so you cannot see the images.
I believe this is due to the functions below, but I can't figure out out to solve the issue: I can display the images by removing return P2::make_media_urls_absolute( ob_get_clean() );, but then the buttons won't work.
function media_buttons() {
include_once ABSPATH . '/wp-admin/includes/media.php';
ob_start();
do_action( 'media_buttons' );
return P2::make_media_urls_absolute( ob_get_clean() );
}
function make_media_urls_absolute( $string ) {
$string = str_replace( 'images/', P2::admin_url( 'images/' ), $string );
// This line does not work in .org
return str_replace( 'media-upload.php?', P2::admin_url( 'media-upload.php?p2-upload=true&' ), $string );
}
Can somebody help me with that?
Thanks!