: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* Set a shortcode attribute.
* Automatically detects whether `attr` is named or numeric and routes it
* @param {(number|string)} attr Attribute key.
* @param {string} value Attribute value.
* @return {WPShortcode} Shortcode instance.
this.attrs[typeof attr === 'number' ? 'numeric' : 'named'][attr] = value;
* Transform the shortcode into a string.
* @return {string} String representation of the shortcode.
let text = '[' + this.tag;
this.attrs.numeric.forEach(value => {
text += ' "' + value + '"';
Object.entries(this.attrs.named).forEach(([name, value]) => {
text += ' ' + name + '="' + value + '"';
// If the tag is marked as `single` or `self-closing`, close the tag and
// ignore any additional content.
if ('single' === this.type) {
} else if ('self-closing' === this.type) {
// Complete the opening tag.
return text + '[/' + this.tag + ']';
/* harmony default export */ const build_module = (shortcode);
(window.wp = window.wp || {}).shortcode = __webpack_exports__["default"];