This file contains 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
SELECT | |
p.ID as order_id, | |
p.post_date, | |
max( CASE WHEN pm.meta_key = '_billing_email' and p.ID = pm.post_id THEN pm.meta_value END ) as billing_email, | |
max( CASE WHEN pm.meta_key = '_billing_first_name' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_first_name, | |
max( CASE WHEN pm.meta_key = '_billing_last_name' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_last_name, | |
max( CASE WHEN pm.meta_key = '_billing_address_1' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_address_1, | |
max( CASE WHEN pm.meta_key = '_billing_address_2' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_address_2, | |
max( CASE WHEN pm.meta_key = '_billing_number' and p.ID = pm.post_id THEN pm.meta_value END ) as numero, | |
max( CASE WHEN pm.meta_key = '_billing_city' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_city, |
This file contains 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
SELECT | |
wp_users.user_login as login, | |
wp_users.user_email as email, | |
firstmeta.meta_value as Nome, | |
lastmeta.meta_value as sobrenome, | |
shipping_citymeta.meta_value as cidade, | |
shipping_postcodemeta.meta_value as CEP, | |
shipping_statemeta.meta_value as UF, | |
shipping_phonemeta.meta_value as Telefone, | |
shipping_address_1meta.meta_value as Endereco, |
This file contains 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 remove_allow_comments_default($data) | |
{ | |
$data['comment_status'] = 0; | |
return $data; | |
} | |
add_action( 'wp_insert_post_data', 'remove_allow_comments_default', 10, 3 ); |
This file contains 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 | |
//Arquivo functions.php | |
function muda_cor_botao(){?> | |
<style type="text/css"> | |
/*PARA MUDAR O FUNDO DA PÁGINA*/ | |
body{ | |
background:#black !important; | |
} | |
This file contains 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 | |
/** | |
* deploy.php by Hayden Schiff (oxguy3) | |
* Available at https://gist.github.com/oxguy3/70ea582d951d4b0f78edec282a2bebf9 | |
* | |
* No rights reserved. Dedicated to public domain via CC0 1.0 Universal. | |
* See https://creativecommons.org/publicdomain/zero/1.0/ for terms. | |
*/ | |
// random string of characters; must match the "Secret" defined in your GitHub webhook |
This file contains 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
$(window).on('keydown', function (e) { | |
if (e.which != 40) return false; | |
var posicao = $('#destino').position().top; | |
$('html, body').stop().animate({ | |
scrollTop: posicao | |
}, 1500); | |
}); |
This file contains 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(){ | |
let el = $("#elementoPai").find('input, select'); | |
let cnt = el.filter(function(){ | |
return !$(this).val(); | |
}).length; | |
if (cnt == el.length){ | |
alert('erro'); | |
}else { | |
alert('tudoOK'); | |
}); |
This file contains 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> | |
<meta charset="UTF-8"> | |
<meta name="viewport" | |
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
<script scr="https://code.jquery.com/jquery-3.2.1.min.js"></script> |
This file contains 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
--Simple Where | |
Model::where('field', '*operator', 'value'). | |
//*operator = "< , >, =, =>, =< etc" | |
-- Between where | |
Model::whereBetween('field',['value1', 'value2']); | |
-- Raw Where for exclusive treatments | |
Model::whereRaw('LEFT(field, 4) = tesssttteeee') | |
NewerOlder