wpalchemy icon indicating copy to clipboard operation
wpalchemy copied to clipboard

the confirmation on group delete button should be togglable and text should be custom

Open opicron opened this issue 14 years ago • 1 comments

I believe that the code would improve by being able to have the user define if the group delete button should have an javascript confirm alert, and if yes it should be customizable.

This can be done globally by setting an wordpress javascript variable like so:

wp_localize_script( , , <value/array/etc>); wp_localize_script( 'MetaBox', 'confirmation', array('delete_confirm'=>'true', 'text'=>__('sometext')) );

Not sure the scriptname will work, because you load your javascript inside metabox. I like to seperate it. Which might be a good idea for an future version also.

opicron avatar Dec 19 '10 15:12 opicron

I agree, good idea, i want to give as much control to the developer as needed.

farinspace avatar Dec 19 '10 18:12 farinspace