Skip to content

Commit c494216

Browse files
authored
Merge pull request #905 from cloudinary/feature/seo-urls
Add support for `$attachment_id` on `cloudinary_seo_public_id` filter
2 parents 7909a81 + 55d1a07 commit c494216

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

php/connect/class-api.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,10 +851,11 @@ public function get_public_id( $attachment_id, $original_public_id = null, $args
851851
*
852852
* @param $public_id {string} The suffixed public_id.
853853
* @param $original_public_id {string} The original public_id.
854+
* @param $attachment_id {int} The attachment ID.
854855
*
855856
* @return {string}
856857
*/
857-
$public_id = apply_filters( 'cloudinary_seo_public_id', "{$public_id}/{$filename}.{$relationship->format}", $original_public_id );
858+
$public_id = apply_filters( 'cloudinary_seo_public_id', "{$public_id}/{$filename}.{$relationship->format}", $original_public_id, $attachment_id );
858859
}
859860

860861
return $public_id;

0 commit comments

Comments
 (0)