Amazon_S3_And_CloudFront::maybe_sign_intermediate_size PHP Method

maybe_sign_intermediate_size() protected method

Sign intermediate size.
protected maybe_sign_intermediate_size ( string $url, integer $attachment_id, string | array $size, boolean | array $s3object = false ) : mixed | WP_Error
$url string
$attachment_id integer
$size string | array
$s3object boolean | array
return mixed | WP_Error
    protected function maybe_sign_intermediate_size($url, $attachment_id, $size, $s3object = false)
    {
        if (!$s3object) {
            $s3object = $this->get_attachment_s3_info($attachment_id);
        }
        $size = $this->maybe_convert_size_to_string($attachment_id, $size);
        if (isset($s3object['sizes'][$size])) {
            // Private file, add AWS signature if required
            return $this->get_attachment_s3_url($attachment_id, $s3object, null, $size);
        }
        return $url;
    }
Amazon_S3_And_CloudFront