bp_document_scaled_image_path( $attachment_id )
Return absolute path of the document file.
Description
Parameters
- $path
-
(Required)
Source
File: bp-templates/bp-nouveau/includes/document/functions.php
function bp_document_scaled_image_path( $attachment_id ) { $is_image = wp_attachment_is_image( $attachment_id ); $img_url = get_attached_file( $attachment_id ); $meta = wp_get_attachment_metadata( $attachment_id ); $img_url_basename = wp_basename( $img_url ); if ( ! $is_image ) { if ( ! empty( $meta['sizes']['full'] ) ) { $img_url = str_replace( $img_url_basename, $meta['sizes']['full']['file'], $img_url ); } } return $img_url; }
Changelog
Version | Description |
---|---|
BuddyBoss 1.4.1 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.