abort preventiont of publication if address country invalid
This commit is contained in:
21
srcs/plugins/map_prof/scripts/mp_publish_error.js
Normal file
21
srcs/plugins/map_prof/scripts/mp_publish_error.js
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
console.log("publish error");
|
||||
|
||||
wp.data.dispatch( 'core/notices' ).createNotice(
|
||||
'error', // Can be one of: success, info, warning, error.
|
||||
'impossible de publier : le pays est invalide', // Text string to display.
|
||||
{
|
||||
isDismissible: true, // Whether the user can dismiss the notice.
|
||||
}
|
||||
);
|
||||
|
||||
//( function ( wp ) {
|
||||
// console.log("publish error");
|
||||
// wp.data.dispatch( 'core/notices' ).createNotice(
|
||||
// 'error', // Can be one of: success, info, warning, error.
|
||||
// 'impossible de publie : le pays est invalide', // Text string to display.
|
||||
// {
|
||||
// isDismissible: true, // Whether the user can dismiss the notice.
|
||||
// }
|
||||
// );
|
||||
//} )( window.wp );
|
||||
Reference in New Issue
Block a user