Skip to content

Commit ac61a08

Browse files
committed
add in the loop check
1 parent 1091f6e commit ac61a08

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)