File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -633,7 +633,19 @@ public function attachment_url( $url, $attachment_id ) {
633633 if ( false !== $ previous_url ) {
634634 return substr ( $ url , $ previous_url );
635635 }
636- if ( ! doing_action ( 'wp_insert_post_data ' ) && false === $ this ->in_downsize && ! apply_filters ( 'cloudinary_doing_upload ' , '__return_false ' ) ) {
636+ if (
637+ ! doing_action ( 'wp_insert_post_data ' )
638+ && false === $ this ->in_downsize
639+ /**
640+ * Filter doing upload.
641+ * If so, return the default attachment URL.
642+ *
643+ * @param bool Default false.
644+ *
645+ * @return bool
646+ */
647+ && ! apply_filters ( 'cloudinary_doing_upload ' , false )
648+ ) {
637649 if ( $ this ->cloudinary_id ( $ attachment_id ) ) {
638650 $ url = $ this ->cloudinary_url ( $ attachment_id );
639651 }
You can’t perform that action at this time.
0 commit comments