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

Allow transform shortcode tag to be array #4264

merged 2 commits into from Jan 4, 2018


None yet
3 participants

travislopes commented Jan 3, 2018


This PR lets the shortcode tag defined for a transform be an array instead of only a string, allowing you to utilize one set of rules for multiple shortcode tags. This is helpful for instances where a shortcode has aliases (e.g. [gravityform] and [gravityforms]). The transform's tag is converted to an array if set as a string allowing for simply defining a single tag.

How Has This Been Tested?

Tested using a shortcode transform on a custom block where the transform was defined as a string and then changed to be defined as an array.


  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows has proper inline documentation.

@aduth aduth requested review from iseulde and mcsf Jan 3, 2018


mcsf approved these changes Jan 4, 2018

This looks good, thank you. Normally I'd expect some updates to the documentation, but there's nothing for transforms yet.

@mcsf mcsf merged commit 241fb65 into WordPress:master Jan 4, 2018

2 checks passed

codecov/project 39.16% (+<.01%) compared to 0b93b06
continuous-integration/travis-ci/pr The Travis CI build passed

@travislopes travislopes deleted the travislopes:add/multiple-shortcode-tag-support branch Jan 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment