This file contains 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
Coloque o código abaixo no arquivo wp-config.php na raiz da instalação do WordPress | |
// Desabilitar as revisões do post | |
// insert above the ‘ABSPATH’ otherwise it won’t work | |
define('AUTOSAVE_INTERVAL', 300); // seconds | |
define('WP_POST_REVISIONS', 3); // true ou false qualquer número de revisões |
This file contains 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
$.validator.addMethod('CNH', function(value, element) { | |
var ret, | |
cnh = value, | |
firstChar = cnh.charAt(0); | |
if (cnh.replace(/[^\d]/g, '').length === 11 && firstChar.repeat(11) !== cnh) { | |
var dsc = 0; | |
for (var i = 0, j = 9, v = 0; i < 9; ++i, --j) { |
This file contains 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
jQuery.validator.addMethod("cnpj", function (value, element) { | |
var numeros, digitos, soma, i, resultado, pos, tamanho, digitos_iguais; | |
if (value.length == 0) { | |
return false; | |
} | |
value = value.replace(/\D+/g, ''); | |
digitos_iguais = 1; |
This file contains 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
Ordem: UF->Estado | |
AC|Acre | |
AL|Alagoas | |
AM|Amazonas | |
AP|Amapá | |
BA|Bahia | |
CE|Ceará | |
DF|Distrito Federal |
NewerOlder