Skip to content

Commit 221abc5

Browse files
authored
Merge pull request #461 from cloudinary/fix/globals-video-filter-key
add in the loop check
2 parents b223700 + ac61a08 commit 221abc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

php/media/class-global-transformations.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ protected function get_current_post() {
578578
*/
579579
$post_id = apply_filters( 'cloudinary_current_post_id', null );
580580

581-
if ( is_null( $post_id ) ) {
581+
if ( is_null( $post_id ) && ! in_the_loop() ) {
582582
return null;
583583
}
584584

0 commit comments

Comments
 (0)