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 |
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
$.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
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
<script> | |
(function(document){ | |
function populateForms(){ | |
if (document.readyState == 'interactive') { | |
if (document.forms.length !== 0 && location.search) { | |
var query = location.search.substr(1); | |
query.split('&').forEach(function (part) { | |
if (part.indexOf('=') !== -1) { | |
var item = part.split('='); | |
var key = item[0]; |
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
<?php | |
// Redirect Registration Page | |
function my_registration_page_redirect() | |
{ | |
global $pagenow; | |
if ( ( strtolower($pagenow) == 'wp-login.php') && ( strtolower( $_GET['action']) == 'register' ) ) { | |
wp_redirect( home_url('/registration-url')); | |
} | |
} |
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
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.15/jquery.mask.min.js"></script> | |
<script type="text/javascript" > | |
jQuery(document).ready(function( $ ) { | |
function limpa_formulario_cep() { | |
$("#form-field-endereco").val(""); | |
$("#form-field-cidade").val(""); | |
$("#form-field-estado").val(""); | |
} |
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
<?php | |
// Conexão com o banco de dados MS-Access | |
$db = new PDO("odbc:Driver={Microsoft Access Driver (*.mdb)};Dbq=Caminho/Para/Seu/Arquivo.mdb"); | |
// Consulta para obter os usuários do MS-Access | |
$query = "SELECT * FROM usuarios"; | |
$result = $db->query($query); | |
// Loop através dos resultados | |
foreach ($result as $row) { |
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
/* | |
* PHP 8 create_function replacement. | |
* Use apenas como um paliativo para o sistema antigo voltar | |
* a funcionar e atualize em seguida. | |
* coloque este trecho dentro do arquivo functions.php do tema ativo. | |
*/ | |
if ( ! function_exists( "create_function" ) ) { | |
function create_function( $arg, $body ) { | |
static $cache = array(); | |
static $max_cache_size = 64; |
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
<?php | |
/* | |
* Fatal error: Unparenthesized a ? b : c ? d : e is not supported. Use either (a ? b : c) ? d : e or a ? b : (c ? d : e) in /var/www/wp- * content/plugins/js_composer/include/classes/editors/class-vc-frontend-editor.php on line 646 | |
* | |
*Como resolver | |
*O erro indica que a versão do WPBakery usada não é compatível com a versão do PHP atualmente ativa. Você precisaria baixar a versão | |
*mais recente do WPBakery para corrigir isso. Como WPBakery é um produto comercial, entre em contato com o suporte para mais dúvidas: | |
*https://wpbakery.com – perguntas sobre produtos comerciais não são permitidas aqui no fórum. | |
* |
OlderNewer