-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplified code by removing unecessary registration
- Loading branch information
1 parent
e353576
commit a09e8af
Showing
2 changed files
with
126 additions
and
138 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,140 +1,135 @@ | ||
wp.domReady(function () { | ||
wp.blocks.registerBlockVariation('core/group', { | ||
name: 'lsx/itinerary', | ||
title: 'Itinerary', | ||
icon: 'list-view', | ||
attributes: { | ||
metadata: { | ||
name: 'Itinerary', | ||
bindings: { | ||
content: { | ||
source: 'lsx/tour-itinerary' | ||
} | ||
} | ||
}, | ||
align: 'wide', | ||
layout: { | ||
type: 'constrained' | ||
} | ||
}, | ||
innerBlocks: [ | ||
['core/paragraph', { | ||
placeholder: 'Insert your Itinerary pattern here.', | ||
align: 'center' | ||
}] | ||
], | ||
isDefault: false | ||
}); | ||
wp.domReady(() => { | ||
wp.blocks.registerBlockVariation('core/group', { | ||
name: 'lsx/itinerary', | ||
title: 'Itinerary', | ||
icon: 'list-view', | ||
attributes: { | ||
metadata: { | ||
name: 'Itinerary', | ||
bindings: { | ||
content: { | ||
source: 'lsx/tour-itinerary' | ||
} | ||
} | ||
}, | ||
align: 'wide', | ||
layout: { | ||
type: 'constrained' | ||
} | ||
}, | ||
innerBlocks: [ | ||
['core/paragraph', { | ||
placeholder: 'Insert your Itinerary pattern here.', | ||
align: 'center' | ||
}] | ||
], | ||
isDefault: false | ||
}); | ||
|
||
wp.blocks.registerBlockVariation('core/group', { | ||
name: 'lsx/accommodation-units', | ||
title: 'Units', | ||
icon: 'admin-multisite', | ||
attributes: { | ||
metadata: { | ||
name: 'Units', | ||
bindings: { | ||
content: { | ||
source: 'lsx/accommodation-units' | ||
} | ||
} | ||
}, | ||
align: 'wide', | ||
layout: { | ||
type: 'constrained' | ||
} | ||
}, | ||
innerBlocks: [ | ||
['core/paragraph', { | ||
placeholder: 'Insert your Room pattern here.', | ||
align: 'center' | ||
}] | ||
], | ||
isDefault: false | ||
}); | ||
wp.blocks.registerBlockVariation('core/group', { | ||
name: 'lsx/accommodation-units', | ||
title: 'Units', | ||
icon : 'admin-multisite', | ||
attributes: { | ||
metadata: { | ||
name: 'Units', | ||
bindings: { | ||
content: { | ||
source: 'lsx/accommodation-units' | ||
} | ||
} | ||
}, | ||
align: 'wide', | ||
layout: { | ||
type: 'constrained' | ||
} | ||
}, | ||
innerBlocks: [ | ||
['core/paragraph', { | ||
placeholder: 'Insert your Room pattern here.', | ||
align: 'center' | ||
}] | ||
], | ||
isDefault: false | ||
}); | ||
|
||
wp.blocks.egisterBlockVariation('core/gallery', { | ||
name: 'lsx/gallery', | ||
title: 'TO Gallery', | ||
icon: 'admin-multisite', | ||
attributes: { | ||
metadata: { | ||
name: 'TO Gallery', | ||
bindings: { | ||
content: { | ||
source: 'lsx/gallery' | ||
} | ||
} | ||
}, | ||
linkTo: 'none', | ||
sizeSlug: 'thumbnail' | ||
}, | ||
innerBlocks: [ | ||
['core/image', { | ||
href: 'https://tour-operator.lsx.design/wp-content/plugins/tour-operator/assets/img/placeholders/placeholder-general-350x350.jpg' | ||
}], | ||
['core/image', { | ||
href: 'https://tour-operator.lsx.design/wp-content/plugins/tour-operator/assets/img/placeholders/placeholder-general-350x350.jpg' | ||
}], | ||
['core/image', { | ||
href: 'https://tour-operator.lsx.design/wp-content/plugins/tour-operator/assets/img/placeholders/placeholder-general-350x350.jpg' | ||
}] | ||
], | ||
isDefault: false | ||
}); | ||
wp.blocks.registerBlockVariation('core/gallery', { | ||
name: 'lsx/gallery', | ||
title: 'TO Gallery', | ||
icon : 'admin-multisite', | ||
attributes: { | ||
metadata: { | ||
name: 'TO Gallery', | ||
bindings: { | ||
content: { | ||
source: 'lsx/gallery' | ||
} | ||
} | ||
}, | ||
linkTo: 'none', | ||
sizeSlug: 'thumbnail' | ||
}, | ||
innerBlocks: [ | ||
['core/image', { | ||
href: 'https://tour-operator.lsx.design/wp-content/plugins/tour-operator/assets/img/placeholders/placeholder-general-350x350.jpg' | ||
}], | ||
['core/image', { | ||
href: 'https://tour-operator.lsx.design/wp-content/plugins/tour-operator/assets/img/placeholders/placeholder-general-350x350.jpg' | ||
}], | ||
['core/image', { | ||
href: 'https://tour-operator.lsx.design/wp-content/plugins/tour-operator/assets/img/placeholders/placeholder-general-350x350.jpg' | ||
}] | ||
], | ||
isDefault: false | ||
}); | ||
|
||
wp.blocks.registerBlockVariation('core/group', { | ||
name: 'lsx/price', | ||
title: 'Price', | ||
icon: 'bank', | ||
attributes: { | ||
metadata: { | ||
name: 'Price', | ||
}, | ||
align: 'wide', | ||
wp.blocks.registerBlockVariation('core/group', { | ||
name: 'lsx/price', | ||
title: 'Price', | ||
icon : 'bank', | ||
attributes: { | ||
metadata: { | ||
name: 'Price', | ||
}, | ||
align: 'wide', | ||
layout: { | ||
type: 'flex', | ||
flexWrap: 'nowrap' | ||
}, | ||
className: 'lsx-price-wrapper' | ||
}, | ||
innerBlocks: [ | ||
['core/paragraph', { | ||
padding: { | ||
top: '2px', | ||
bottom: '2px' | ||
}, | ||
typography: { | ||
fontSize: 'x-small' | ||
}, | ||
content: '<strong>From:</strong>', | ||
className: 'has-x-small-font-size', | ||
}], | ||
['core/paragraph', { | ||
metadata: { | ||
bindings: { | ||
content: { | ||
source: 'lsx/post-meta', | ||
args: { key: 'price' } | ||
} | ||
} | ||
}, | ||
className: 'has-primary-color has-text-color has-link-color', | ||
color: { | ||
link: 'primary-700', | ||
text: 'primary-700' | ||
} | ||
}] | ||
], | ||
isDefault: false | ||
}); | ||
className: 'lsx-price-wrapper' | ||
}, | ||
innerBlocks: [ | ||
[ 'core/paragraph', { | ||
padding: { | ||
top: '2px', | ||
bottom: '2px' | ||
}, | ||
typography: { | ||
fontSize: 'x-small' | ||
}, | ||
content : '<strong>From:</strong>', | ||
className: 'has-x-small-font-size', | ||
} | ||
], | ||
[ 'core/paragraph', { | ||
metadata: { | ||
bindings: { | ||
content: { | ||
source: 'lsx/post-meta', | ||
args: { key: 'price' } | ||
} | ||
} | ||
}, | ||
className: 'has-primary-color has-text-color has-link-color', | ||
color: { | ||
link: 'primary-700', | ||
text: 'primary-700' | ||
} | ||
} | ||
] | ||
], | ||
isDefault: false | ||
}); | ||
|
||
|
||
wp.blocks.registerBlockVariation('core/cover', { | ||
name: 'cover-with-link', | ||
title: 'Cover with Link', | ||
description: 'A Cover block that can be linked.', | ||
attributes: { | ||
}, | ||
isDefault: false, | ||
}); | ||
}); |
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