Sindbad~EG File Manager
var el = wp.element.createElement,
registerBlockType = wp.blocks.registerBlockType,
TextControl = wp.components,
InnerBlocks = wp.editor.InnerBlocks,
RichText = wp.editor.RichText;
registerBlockType('mwp/alert-info',{
title: 'Alert Info',
icon: 'info',
category: 'mwp-all-blocks',
edit(){
return el( 'div', { className: 'alert alert-info'},
el( InnerBlocks, { allowedBlocks: [ 'core/paragraph', 'core/list' ] } )
);
},
save(){
return el( 'div', { className: 'alert alert-info'},
el( InnerBlocks.Content )
);
},
});
registerBlockType('mwp/alert-success',{
title: 'Alert Success',
icon: 'yes',
category: 'mwp-all-blocks',
edit(){
return el( 'div', { className: 'alert alert-success'},
el( InnerBlocks, { allowedBlocks: [ 'core/paragraph', 'core/list' ] } )
);
},
save(){
return el( 'div', { className: 'alert alert-success'},
el( InnerBlocks.Content )
);
},
});
registerBlockType('mwp/alert-danger',{
title: 'Alert Danger',
icon: 'warning',
category: 'mwp-all-blocks',
edit(){
return el( 'div', { className: 'alert alert-danger'},
el( InnerBlocks, { allowedBlocks: [ 'core/paragraph', 'core/list' ] } )
);
},
save(){
return el( 'div', { className: 'alert alert-danger'},
el( InnerBlocks.Content )
);
},
});
registerBlockType('mwp/alert-warning',{
title: 'Alert Warning',
icon: 'dismiss',
category: 'mwp-all-blocks',
edit(){
return el( 'div', { className: 'alert alert-warning'},
el( InnerBlocks, { allowedBlocks: [ 'core/paragraph', 'core/list' ] } )
);
},
save(){
return el( 'div', { className: 'alert alert-warning'},
el( InnerBlocks.Content )
);
},
});
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists