Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media Replace Flow: Don't show the URL option unless there is a handler #19063

merged 1 commit into from Dec 18, 2019


Copy link

scruffian commented Dec 11, 2019


In the site logo block we want to use the MediaReplaceFlow component, but we don't want to offer the URL option. This change ensures that the "Insert From URL" option only shows when a onSelectURL handler is passed. This is what we do in MediaPlaceholder

How has this been tested?

  • Use the site logo branch (#18811)
  • Then apply this change on top
  • Check that the site logo block doesn't have an "Insert From URL" option
  • Check that the image block still has a "Insert From URL" option


Types of changes

Bug fix (non-breaking change which fixes an issue)


  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
@scruffian scruffian mentioned this pull request Dec 11, 2019
3 of 3 tasks complete
@draganescu draganescu assigned draganescu and unassigned draganescu Dec 11, 2019
@scruffian scruffian force-pushed the scruffian:update/media-replace-flow branch from 5b594de to 3ae1655 Dec 18, 2019
@draganescu draganescu merged commit 993bfe0 into WordPress:master Dec 18, 2019
2 checks passed
2 checks passed
Travis CI - Pull Request Build Passed
@youknowriad youknowriad added this to the Gutenberg 7.2 milestone Jan 6, 2020
@scruffian scruffian deleted the scruffian:update/media-replace-flow branch Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.