Skip to content

Instantly share code, notes, and snippets.

View diogenesjup's full-sized avatar
🏠
Working from home

Diogenes Oliveira Junior diogenesjup

🏠
Working from home
View GitHub Profile
<service android:name="com.example.app.backgroundService"
android:exported="false">
<intent-filter>
<action android:name="com.example.app.START_BACKGROUND" />
</intent-filter>
</service>
${result['color 5'] ?
`<div class="color" style=background-color:#${result['color 5']}><h6>${result['color 5']}</h6></div>`
: ''}
@diogenesjup
diogenesjup / custom-my-account-endpoint.php
Created November 26, 2021 19:12 — forked from claudiosanches/custom-my-account-endpoint.php
Example of custom My Account endpoint.
<?php
class My_Custom_My_Account_Endpoint {
/**
* Custom endpoint name.
*
* @var string
*/
public static $endpoint = 'my-custom-endpoint';
@diogenesjup
diogenesjup / definir-nome.php
Created November 26, 2021 14:40
Mudar o nome default do disparador de e-mails
<?php
// Function to change sender name
function wpb_sender_name( $original_email_from ) {
return 'Nome da empresa, marca ou site';
}
add_filter( 'wp_mail_from_name', 'wpb_sender_name' );
@diogenesjup
diogenesjup / functions.php
Created November 14, 2021 04:58 — forked from paaljoachim/functions.php
Tutorial: WooCommerce Checkout: Add multiple custom fields to billing area. This code adds priority placement of field. Shows the custom fields in the backend Order Details screen and in e-mails to the admin and customer. I have also adjusted the checkbox field to give a text result instead of a value of 1. Checkbox is also pre-selected.
/* --------- Adds custom fields using filters. ------
The below custom fields shows various types one can use.
It is then displayed in the backend Order Details page and in admin and customer e-mails.
Checkboxes by default result only show the number 1 when clicked. I have added code so that when the a checkbox is clicked it will
show text such as On and Yes. Checkbox is also pre-selected.
Tutorial: https://easywebdesigntutorials.com/woocommerce-modifying-the-checkout-page/
*/
// Initial inspiration: https://businessbloomer.com/woocommerce-add-shipping-phone-checkout/
// My Custom Fields
@diogenesjup
diogenesjup / exemplo-cron-job.php
Last active November 9, 2021 14:43
exemplo-cronjob-wordpress.php
<?php
/* TESTAR CRON JOBS */
error_log("Ainda estou aqui 2");
// CRIAR OS INTERVALOS
function diogenes_cron_schedules($schedules){
if(!isset($schedules["5min"])){
$schedules["5min"] = array(
'interval' => 5*60,
[formulario_avaliacao formulario="IDFORMULARIO"]
[listar_imoveis categoria="duplex"]
ou
[listar_imoveis categoria="NOME DA CATEGORIA"]
// LISTAR IMOVEIS LANÇAMENTOS
[listar_imoveis_lancamentos]
// LISTAR GALERIA DE IMAGENS DO DETALHE DO IMÓVEL COM LIGHTBOX
[infos_imovel_vista_galeria_lightbox cod="CODIMOVEL"]
"imovel_Id": 5119129,
"imovelSan_Id": 166648,
"valorImovelFormat": "R$ 0,00",
"valorIPTU": 0,
"parcelaIPTU": 0,
"isentoIptu": true,
"valorIptuFormat": "R$ 0,00",
"valorCondominioFormat": "R$ 600,00",
"descricao": null,
"descricaoAl": null,