Gets the attachment path relative to the upload directory.
Parameters
$file
stringrequired- Attachment file name.
Source
return isset( $image[0] ) ? $image[0] : false;
}
/**
* Gets the attachment path relative to the upload directory.
*
* @since 4.4.1
* @access private
*
* @param string $file Attachment file name.
* @return string Attachment path relative to the upload directory.
*/
function _wp_get_attachment_relative_path( $file ) {
$dirname = dirname( $file );
Changelog
Version | Description |
---|---|
4.4.1 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.