Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
wp-content
/
plugins
/
orderable
/
inc
/
modules
/
receipt-layouts
/
source
/
admin
/
js
/
block-editor
:
receipt-layouts-block-editor.js
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
const { addFilter } = wp.hooks; addFilter( 'blocks.registerBlockType', 'orderable/modify-block-supports', function ( settings, name ) { if ( ! settings?.supports || ! name.includes( 'core/' ) ) { return { ...settings, attributes: { ...settings.attributes, style: { type: 'object', default: { ...settings.attributes.style?.default, color: { ...settings.attributes.style?.default?.color, text: '#111111', }, }, }, }, }; } return { ...settings, supports: { ...settings.supports, align: false, anchor: false, spacing: { margin: true, padding: true, }, typography: { textAlign: true, fontSize: false, }, color: { text: true, background: true, }, }, attributes: { ...settings.attributes, style: { type: 'object', default: { color: { text: '#111111', }, }, }, }, }; } ); wp.data .dispatch( 'core/notices' ) .createInfoNotice( wp.i18n.__( 'This preview will contain real data order once the receipt is generated, and will adapt to the width of your printer page setup. Please ensure you have selected a default layout in Orderable > Settings > Printing.', 'orderable' ), { isDismissible: false } );