mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-06 07:36:58 +00:00
Shortcodes: Make sure wp.shortcode.string() accepts the attrs array keys in any order.
Props yale01, georgestephanis, adamsilverstein, zsusag, mircoraffinetti, SergeyBiryukov. Fixes #36263. git-svn-id: https://develop.svn.wordpress.org/trunk@47003 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -227,8 +227,8 @@ window.wp = window.wp || {};
|
||||
this.attrs = wp.shortcode.attrs( attrs );
|
||||
|
||||
// Identify a correctly formatted `attrs` object.
|
||||
} else if ( _.isEqual( _.keys( attrs ), [ 'named', 'numeric' ] ) ) {
|
||||
this.attrs = attrs;
|
||||
} else if ( _.difference( _.keys( attrs ), [ 'named', 'numeric' ] ).length === 0 ) {
|
||||
this.attrs = _.defaults( attrs, this.attrs );
|
||||
|
||||
// Handle a flat object of attributes.
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user