farinspace / wpalchemy

Thin framework for wordpress
http://wpalchemy.com/
Other
415 stars 112 forks source link

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

Open opicron opened 13 years ago

opicron commented 13 years ago

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.

farinspace commented 13 years ago

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