Amazon_S3_And_CloudFront::get_attachment_url PHP Method

get_attachment_url() public method

Get the url of the file from Amazon S3
public get_attachment_url ( integer $post_id, integer | null $expires = null, string | null $size = null, array | null $meta = null, array $headers = [], boolean $skip_rewrite_check = false ) : boolean | mixed | void | WP_Error
$post_id integer Post ID of the attachment
$expires integer | null Seconds for the link to live
$size string | null Size of the image to get
$meta array | null Pre retrieved _wp_attachment_metadata for the attachment
$headers array Header overrides for request
$skip_rewrite_check boolean Always return the URL regardless of the 'Rewrite File URLs' setting. Useful for the EDD and Woo addons to not break download URLs when the option is disabled.
return boolean | mixed | void | WP_Error
    public function get_attachment_url($post_id, $expires = null, $size = null, $meta = null, $headers = array(), $skip_rewrite_check = false)
    {
        if (!($s3object = $this->is_attachment_served_by_s3($post_id, $skip_rewrite_check))) {
            return false;
        }
        $url = $this->get_attachment_s3_url($post_id, $s3object, $expires, $size, $meta, $headers);
        return apply_filters('as3cf_wp_get_attachment_url', $url, $post_id);
    }
Amazon_S3_And_CloudFront