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
| <div class="foto"> | |
| <img src="foto1.png"> | |
| <button class="copy-foto" data-img-src="foto1.png">Copiar</button> | |
| </div> | |
| <div class="foto"> | |
| <img src="foto2.png"> | |
| <button class="copy-foto" data-img-src="foto2.png">Copiar</button> | |
| </div> | |
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 get_spotify_iframe($atts) { | |
| // Acesso global ao objeto $wpdb para operações de banco de dados | |
| global $wpdb; | |
| // Obtenção do ID da postagem a partir do atributo 'id' | |
| $post_id = isset($atts['id']) ? intval($atts['id']) : 0; | |
| // Se não houver um ID válido, retorna vazio | |
| if (!$post_id) { | |
| 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
| jQuery(document).ready(function() { | |
| // Função para adicionar o listener de mudança em um select box | |
| function setupLimitForSelectBox(selectBoxId, limitFieldName) { | |
| jQuery(selectBoxId).on('change', function() { | |
| var limit = parseInt(jQuery('input[name="' + limitFieldName + '"]').val(), 10); | |
| var selectedOptions = jQuery(this).find('option:selected'); | |
| if (selectedOptions.length > limit) { | |
| // Reverter a última seleção | |
| selectedOptions.each(function(index) { |
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
| <div id="counter"></div> | |
| <script> | |
| jQuery(document).ready(function() { | |
| function calcularSubtotalDoItem(itemElemento) { | |
| var valorTextoElemento = jQuery(itemElemento).find('.sn_valor2 .jet-listing-dynamic-field__content').text().trim(); | |
| var valorNumerico = parseFloat(valorTextoElemento); | |
| var quantidadeInput = jQuery(itemElemento).find('.qtd-input.sn_qtd'); | |
| var quantidadeNumerica = parseFloat(quantidadeInput.val()); |
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
| // Adicionar coluna personalizada | |
| add_filter('manage_pedidos_posts_columns', function ($columns) { | |
| $columns['reenviar_email'] = 'Reenviar por E-mail'; | |
| return $columns; | |
| }); | |
| // Exibir conteúdo na coluna personalizada | |
| add_action('manage_pedidos_posts_custom_column', function ($column, $post_id) { | |
| if ($column == 'reenviar_email') { | |
| echo '<a href="#" class="reenviar-email" data-post-id="' . $post_id . '">Reenviar</a>'; |
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
| <div id="counter"></div> | |
| <script> | |
| jQuery(document).ready(function() { | |
| function calcularSubtotalDoItem(itemElemento) { | |
| var valorTextoElemento = jQuery(itemElemento).find('.sn_valor2 .jet-listing-dynamic-field__content').text().trim(); | |
| var valorNumerico = parseFloat(valorTextoElemento); | |
| var quantidadeInput = jQuery(itemElemento).find('.qtd-input.sn_qtd'); | |
| var quantidadeNumerica = parseFloat(quantidadeInput.val()); |
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 show_taxonomy_lista() { | |
| $nome_tax = 'estados'; | |
| $CSS = ' | |
| <style> | |
| .tax-style { | |
| font-size: 16px; | |
| color: #333333; | |
| } | |
| .tax-parent { |
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 definir o link do WhatsApp | |
| function setWhatsAppLinks() { | |
| jQuery('.jet-listing-grid__item').each(function() { | |
| var zapLugar = jQuery(this).find('.zap_lugar .jet-listing-dynamic-field__content').text().trim(); | |
| var siteURL = window.location.href; | |
| var message = `Olá, vi uma publicação no site ${siteURL}, gostaria de mais informações.`; | |
| var whatsappURL = `https://wa.me/55${zapLugar}?text=${encodeURIComponent(message)}`; |
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
| /* CSS | |
| Em uma seção/container nomei a class css para = box-content | |
| Dentro dela coloque um outro container ou componente de texto com a class = unfold-content | |
| Dentro dessa mesma área coloque um botão com a class = unfold-btn | |
| */ | |
| /* |
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 código permite que através do options page | |
| seja possível fazer um update nos campos padrão do WordPress */ | |
| function update_site_info_from_options_page() { | |
| // Obter o array dos metafields do JetEngine | |
| $options = get_option('site-config'); | |
| // Definir os nomes dos metafields |