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 | |
// O WordPress 'add_action' registra uma nova ação com a tag 'jet-engine/register-macros' | |
add_action( 'jet-engine/register-macros', function() { | |
/** | |
* Classe que formata uma string de data. | |
*/ | |
class Format_Date_String extends \Jet_Engine_Base_Macros { |
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 | |
require_once( $_SERVER['DOCUMENT_ROOT'] . '/wp-load.php' ); | |
global $wpdb; | |
$prefix = $wpdb->prefix; | |
$resultado = $wpdb->get_results("SELECT * FROM {$prefix}jet_cct_profissionais WHERE cct_status='publish' ORDER BY nome ASC", ARRAY_A); | |
$data = array(); |
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 | |
/* | |
Author: Dante Testa | |
Date: 26/06/2023 | |
www.dantetesta.com.br | |
*/ | |
add_action( 'jet-form-builder/custom-action/add_tax', function( $request, $action_handler ) { | |
if (!isset($request['nome']) || !isset($request['taxonomia'])) { |
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() { | |
var taxonomia_id = jQuery('select[name="tipoproduto"]').val(); | |
var query_title = jQuery('input[name="query"]').val(); | |
function fetch_data() { | |
jQuery.ajax({ | |
url: ajaxurl, | |
method: 'POST', |
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(){ | |
jQuery.ajax({ | |
url: '/wp-content/uploads/sistema-petshop/select-servicos.php', | |
type: 'GET', | |
dataType: 'json', // Tipo de dado esperado do servidor, nesse caso, um objeto JSON | |
success: function(data) { | |
var dropdown = jQuery("#servicos"); |
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 custom_produtos_rewrite_rule() { | |
add_rewrite_rule( | |
'^([^/]+)/?$', | |
'index.php?post_type=produtos&name=$matches[1]', | |
'top' | |
); | |
} | |
add_action('init', 'custom_produtos_rewrite_rule', 10, 0); | |
function custom_post_type_link( $post_link, $post ) { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Simulador de Financiamento de Veículos</title> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"> | |
<style> | |
body { | |
background-color: #343a40; | |
color: #fff; | |
padding: 3% 10% 5% 10%; |
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 | |
function custom_products_rewrite_rule() { | |
add_rewrite_rule( | |
'^produtos/([^/]+)/([^/]+)/?$', | |
'index.php?post_type=produtos&categoria=$matches[1]&name=$matches[2]', | |
'top' | |
); | |
} |
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
/*MOTRA OS ANEXOS DOS TICKETS*/ | |
function mostrar_anexos_de_tickets( $atts ) { | |
global $wpdb; | |
// Atributos padrões | |
$atts = shortcode_atts( | |
array( | |
'id' => 0, | |
'tipo' => 'comentarios', | |
), $atts, 'mostrar_anexos' |
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> | |
/* | |
AUTOR: DANTE TESTA | |
FUNÇÃO: PESQUISA CNPJ Receita WS + CEP na API VIA CEP + CONCATENAÇÃO DE ENDEREÇO | |
*/ | |
jQuery(document).ready(function($) { | |
var cnpj = '#cnpj'; | |
var situacao = '#situacao'; |