Adding Notices In The Block Editor Wordpress

[Solved] Adding Notices In The Block Editor Wordpress | Php - Code Explorer | yomemimo.com
Question : Adding Notices in the Block Editor Wordpress

Answered by : softhunt

( function ( wp ) { wp.data.dispatch( 'core/notices' ).createNotice( 'success', // Can be one of: success, info, warning, error. 'Post published.', // Text string to display. { isDismissible: true, // Whether the user can dismiss the notice. // Any actions the user can perform. actions: [ { url: '#', label: 'View post', }, ], } );
} )( window.wp );

Source : https://softhunt.net/how-to-add-custom-admin-notices-in-wordpres/ | Last Update : Sun, 17 Apr 22

Answers related to adding notices in the block editor wordpress

Code Explorer Popular Question For Php