Skip to content

Conversation

@DavidCramer
Copy link
Contributor

No description provided.

}
}

$content = str_replace( $asset, $new_tag, $content );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be simplified to

Suggested change
$content = str_replace( $asset, $new_tag, $content );
$content = str_replace( array( $asset, $url ), array( $new_tag, $cloudinary_url ), $content );


$content = str_replace( $asset, $new_tag, $content );
// Additional URL change for backgrounds etc..
$content = str_replace( $url, $cloudinary_url, $content );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the change suggested above is used, this line can be removed 😄

Copy link
Contributor

@dugajean dugajean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a minor potential improvement which is not mandatory. Good catch with this!

Copy link
Contributor

@pereirinha pereirinha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DavidCramer

This looks good to me. I agree with @dugajean suggestion, but not required.
I'm merging for the time being.

@pereirinha pereirinha merged commit bb06d57 into develop Sep 23, 2020
@dugajean dugajean deleted the fix/replace-urls-in-content branch September 23, 2020 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants