Created
February 13, 2017 11:00
-
-
Save asha23/281a7751957c473610a100d16d668694 to your computer and use it in GitHub Desktop.
Advanced Custom Fields Row Delete Alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fix for the field delete | |
add_action('acf/input/admin_head', 'my_acf_admin_head'); | |
function my_acf_admin_head() { | |
?> | |
<script type="text/javascript"> | |
(function($) { | |
acf.add_action('ready', function(){ | |
$('body').on('click', '.-minus.small', function( e ){ | |
return confirm("Do you really want to delete this?"); | |
}); | |
}); | |
})(jQuery); | |
</script> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment