Skip to content

Commit 6aa2020

Browse files
Ensure disabled assets aren't delivered
1 parent 23764da commit 6aa2020

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

php/class-delivery.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,6 +1064,11 @@ public function convert_tags( $content, $context = 'view' ) {
10641064
if ( empty( $relation['public_id'] || $url === $relation['public_id'] ) ) {
10651065
continue; // We don't need the public_id relation item.
10661066
}
1067+
1068+
if ( 'disable' === $relation['post_state'] ) {
1069+
continue; // We should not deliver disabled items.
1070+
}
1071+
10671072
$base = $type . ':' . $url;
10681073
$public_id = ! is_admin() ? $relation['public_id'] . '.' . $relation['format'] : null;
10691074
$cloudinary_url = $this->media->cloudinary_url( $relation['post_id'], array(), $relation['transformations'], $public_id );

0 commit comments

Comments
 (0)