mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 12:44:31 +00:00
Don't ever use the guid value when retrieving URLs for media, use wp_get_attachment_url(). Use get_attached_file() for path to file.
Fixes #33386. git-svn-id: https://develop.svn.wordpress.org/trunk@34163 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1116,7 +1116,7 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
|
||||
*/
|
||||
final public function create_attachment_object( $cropped, $parent_attachment_id ) {
|
||||
$parent = get_post( $parent_attachment_id );
|
||||
$parent_url = $parent->guid;
|
||||
$parent_url = wp_get_attachment_url( $parent->ID );
|
||||
$url = str_replace( basename( $parent_url ), basename( $cropped ), $parent_url );
|
||||
|
||||
$size = @getimagesize( $cropped );
|
||||
|
||||
Reference in New Issue
Block a user