-
Notifications
You must be signed in to change notification settings - Fork 809
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate all properties but supports from Tiled Gallery deprecation e…
…xport default object
- Loading branch information
1 parent
e349bad
commit fac1da0
Showing
6 changed files
with
19 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 3 additions & 4 deletions
7
projects/plugins/jetpack/extensions/blocks/tiled-gallery/deprecated/v5/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import attributes from './attributes'; | ||
import save from './save'; | ||
import supports from './supports'; | ||
|
||
export { default as attributes } from './attributes'; | ||
export { default as save } from './save'; | ||
|
||
export default { | ||
attributes, | ||
supports, | ||
save, | ||
}; |
23 changes: 3 additions & 20 deletions
23
projects/plugins/jetpack/extensions/blocks/tiled-gallery/deprecated/v6/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,8 @@ | ||
import attributes from './attributes'; | ||
import save from './save'; | ||
import supports from './supports'; | ||
|
||
export { default as attributes } from './attributes'; | ||
export { default as save } from './save'; | ||
|
||
export default { | ||
attributes, | ||
migrate: oldAttributes => { | ||
// If the old block has classNames set, clean up any old "is-style-*" classes | ||
// that will clash with the new one we're adding. | ||
const className = ( | ||
( oldAttributes.className || '' ).replace( /is-style-[^ ]+/, '' ) + | ||
` is-style-${ oldAttributes.mapStyle }` | ||
) | ||
.replace( /\s+/g, ' ' ) | ||
.trim(); | ||
const { mapStyle, ...newAttributes } = oldAttributes; | ||
return { | ||
...newAttributes, | ||
showFullscreenButton: true, | ||
className, | ||
}; | ||
}, | ||
supports, | ||
save, | ||
}; |