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
{ | |
"workbench.startupEditor": "newUntitledFile", | |
"editor.fontSize": 14, | |
"editor.lineHeight": 1.8, | |
"javascript.suggest.autoImports": true, | |
"javascript.updateImportsOnFileMove.enabled": "always", | |
"editor.rulers": [80, 120], | |
"extensions.ignoreRecommendations": true, | |
"typescript.tsserver.log": "off", | |
"files.associations": { |
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
<form action="process-form.php" method="post"> | |
<label for="nome">Nome:</label> | |
<input type="text" name="nome" id="nome"> | |
<label for="telefone">Telefone:</label> | |
<input type="text" name="telefone" id="telefone"> | |
<label for="email">E-mail:</label> | |
<input type="text" name="email" id="email"> |
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
<?php | |
add_action('elementor_pro/forms/new_record', function ($record) { | |
global $post; // Adicionando a declaração global para $post | |
// Saia se não for o formulário pretendido | |
$form_name = $record->get_form_settings('form_name'); | |
if ('ALTERAR-NOMEDOFORM' !== $form_name) { | |
return; | |
} |
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
// Função para retornar o ano atual | |
function ano_atual_shortcode() { | |
$ano_atual = date('Y'); | |
return $ano_atual; | |
} | |
// Registrar o shortcode | |
add_shortcode('ano_atual', 'ano_atual_shortcode'); |
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
<? | |
// Função para alterar o valor do campo metafield | |
function alterar_valor_metafield($atts) { | |
// Extrai os atributos do shortcode | |
$atts = shortcode_atts( | |
array( | |
'post_id' => 0, // ID do post | |
'metafield' => '', // Nome do campo metafield | |
'valor_on' => 'on', // Valor quando o switcher está ativado | |
'valor_off' => 'off' // Valor quando o switcher está desativado |
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
<? | |
add_filter('pafe/form_builder/custom_message', 'piotnet_check_code', 10, 4); | |
function piotnet_check_code($bool, $form_submission, $remote_request_response, $webhook_response) { | |
// Only run this filter for Code submit form | |
$form_id = $form_submission['form']['id']; | |
if ($form_id != 'atendimento2') { | |
return null; | |
} |
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
<? add_action( 'elementor_pro/forms/new_record', function( $record, $handler ) { | |
//Setar o form_name | |
$form_name = $record->get_form_settings( 'form_name' ); | |
//Definir o formulário | |
if ( 'contato' !== $form_name ) { | |
return; | |
} | |
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
<? | |
function limpar_cache_redis($post_id) { | |
// Verificar se o Redis está instalado e ativo | |
if (class_exists('Redis')) { | |
// Configurações do Redis | |
$redis_host = 'localhost'; | |
$redis_port = 6379; | |
// Conectar ao servidor Redis | |
$redis = new Redis(); |