Skip to content

Instantly share code, notes, and snippets.

View hmaesta's full-sized avatar

Hugo Maestá hmaesta

View GitHub Profile
<?php
function Carro_Consumo_Shortcode($params = array()) {
// default parameters
extract(
shortcode_atts(
array(
'marca' => '',
'modelo' => '',
@hmaesta
hmaesta / appmax-upsell.php
Created September 27, 2019 17:40
Como configurar uma página de upsell usando Appmax
<?php
/**
* Antes de começar, adicione as possibilidades de
* upsell pela página: https://admin.appmax.com.br/my-upsell
*
* No campo "URL página de Upsell" preencha sua
* URL no formato: site.com.br/este-arquivo.php?order_bundle_id={order_bundle_id}
*
* Obviamente você pode colocar outros parâmetros,
* mas seguindo este modelo é obrigatório configurar
@hmaesta
hmaesta / pikaday-ptBR.js
Last active August 28, 2023 19:30
Pikaday Brazilian Portuguese translation (Português Brasileiro)
var i18n = {
previousMonth: 'Mês anterior',
nextMonth: 'Próximo mês',
months: ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'],
weekdays: ['Domingo', 'Segunda-feira', 'Terça-feira', 'Quarta-feira', 'Quinta-feira', 'Sexta-feira', 'Sábado'],
weekdaysShort: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sáb']
};
$("#date").pikaday({
format: "YYYY-MM-DD", //adjust to your liking
changeMonth: true,
@hmaesta
hmaesta / yarpp-minimum-posts.php
Last active November 21, 2020 02:07
A YARPP custom template that always shows the same quantity of related posts. If there are no available posts, show random ones.
<?php
/*
YARPP Template: Minimum related posts
Description: Always show a specific number of posts, even if some of them are not related by YARPP
Author: @hmaesta, @pedropapa
*/
/*
* Use as YARPP CUSTOM TEMPLATE
* Same in your theme folder