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
| <script> | |
| jQuery(document).ready(function($) { | |
| // Função modificada para aceitar limites como parâmetros | |
| function inicializarTratamentoCheckbox(selector, limite) { | |
| $(selector).on('change', function() { | |
| var grupo = $(this).closest('.tabs-panel'); | |
| var checkboxesSelecionados = $('input[type="checkbox"]:checked', grupo).length; | |
| if (checkboxesSelecionados > limite) { | |
| $(this).prop('checked', false); |
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
| Esse estilo CSS serve para manter o tamanho fixo da area de print no celular | |
| @media (max-width: 1200px) { | |
| #print-area { | |
| width: 1000px !important; | |
| overflow-x: auto; | |
| } | |
| } | |
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
| <script> | |
| jQuery(document).ready(function() { | |
| // Inicializa a mensagem com uma template string vazia | |
| let msgzap = ''; | |
| // Itera de 1 a 10, construindo a mensagem a partir dos elementos .txt1 até .txt10 | |
| for (let i = 1; i <= 10; i++) { | |
| let textContent = jQuery(`.txt${i}`).text().trim(); | |
| // Adiciona o texto à mensagem msgzap com a formatação desejada |
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
| <script> | |
| jQuery(document).ready(function($) { | |
| // Função para tratar a mudança nos checkboxes de 'sexo' e 'cursos' | |
| function tratarMudancaCheckbox() { | |
| // Encontra o grupo do checkbox alterado ('sexo' ou 'cursos') | |
| var grupo = $(this).closest('.tabs-panel'); | |
| // Desmarca todos os outros checkboxes no mesmo grupo | |
| $('input[type="checkbox"]', grupo).not(this).prop('checked', false); | |
| } |
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 | |
| /* Shortcode --->>> [botao_pdf] */ | |
| function registrar_shortcode_botao_pdf() { | |
| add_shortcode('botao_pdf', 'renderizar_botao_pdf'); | |
| add_action('wp_enqueue_scripts', 'adicionar_scripts_ajax'); | |
| } | |
| add_action('init', 'registrar_shortcode_botao_pdf'); | |
| function renderizar_botao_pdf() { |
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 | |
| //https://portal.api2pdf.com/ | |
| function my_enqueue_assets() { | |
| wp_enqueue_script('jquery'); | |
| wp_enqueue_style('font-awesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css'); | |
| } | |
| add_action('wp_enqueue_scripts', 'my_enqueue_assets'); |
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
| Query de Aniversariantes do Mês | |
| SELECT *, | |
| um.meta_value AS data_nascimento | |
| FROM {prefix}users AS u | |
| INNER JOIN {prefix}usermeta AS um ON u.ID = um.user_id | |
| WHERE u.user_status = 0 | |
| AND um.meta_key = '_data-nascimento' | |
| AND MONTH(um.meta_value) = MONTH(CURRENT_DATE()) | |
| ORDER BY um.meta_value ASC; |
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
| /* | |
| Crie um campo de texto chamado slug | |
| Adicione um call a hook notification -- jet-form-builder/custom-filter/save-slug | |
| */ | |
| add_action( 'jet-form-builder/form-handler/after-insert-post', function( $data ) { | |
| // Certifique-se de que o campo 'slug' está presente nos dados enviados | |
| if ( ! empty( $data['slug'] ) ) { | |
| $slug = sanitize_title( $data['slug'] ); |
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( 'jet-form-builder/custom-filter/validar_metafield', 'validar_metafield_unico', 10, 3 ); | |
| function validar_metafield_unico( $result, $request, $action_handler ) { | |
| global $wpdb; | |
| // Recuperando valores do request | |
| $type = sanitize_text_field( $request['type'] ); // Tipo: CPT ou CCT | |
| $source = sanitize_text_field( $request['source'] ); // Nome do CCT ou CPT | |
| $nome_metafield = sanitize_text_field( $request['metafield'] ); // Nome do metafield a verificar | |
| $valor_metafield = sanitize_text_field( $request[$nome_metafield] ); // Valor do metafield |
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_filter( 'jet-form-builder/custom-filter/validar', 'validar_cpf_filter', 10, 3 ); | |
| function validar_cpf_filter( $result, $request, $action_handler ) { | |
| global $wpdb; | |
| // Variáveis configuráveis |