<script src="https://dvdent.com.br/novo/wp-content/themes/dvdent/assets/js/jquery.mask.js"></script>

<script>
/** phone mask **/
	var CellphoneORPhoneMask = function (val) {
		return val.replace(/\D/g, '')[2] === '9' ? '(00) 00000-0000' : '(00) 0000-0000';
	},
	spOptions = {
		onKeyPress: function(val, e, field, options) {
			field.mask(CellphoneORPhoneMask.apply({}, arguments), options);
		}
	};

jQuery('#form-field-phone').mask(CellphoneORPhoneMask, spOptions);
</script>