Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function initializeEditor() {
// register and setup blocks
registerCoreBlocks();
// disable Code and More blocks for the release
// eslint-disable-next-line no-undef
if ( typeof __DEV__ === 'undefined' || ! __DEV__ ) {
unregisterBlockType( 'core/code' );
unregisterBlockType( 'core/more' );
}
}
export function initialize( id, settings ) {
registerCoreBlocks();
if ( process.env.GUTENBERG_PHASE === 2 ) {
__experimentalRegisterExperimentalCoreBlocks( settings );
}
render( , document.getElementById( id ) );
}
export function customizerInitialize( id, settings ) {
registerCoreBlocks();
render(
,
document.getElementById( id )
);
}
export function initializeEditor( id, postType, postId, settings, initialEdits ) {
const target = document.getElementById( id );
const reboot = reinitializeEditor.bind( null, postType, postId, target, settings, initialEdits );
registerCoreBlocks();
dispatch( 'core/nux' ).triggerGuide( [
'core/editor.inserter',
'core/editor.settings',
'core/editor.preview',
'core/editor.publish',
] );
render(
,
export function initialize( id, settings ) {
registerCoreBlocks();
render(
,
document.getElementById( id )
);
}
export function initialize( id, settings ) {
registerCoreBlocks();
if ( process.env.GUTENBERG_PHASE === 2 ) {
__experimentalRegisterExperimentalCoreBlocks( settings );
}
render( , document.getElementById( id ) );
}