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
//COMO IMPLEMENTAR UM SISTEMA QUE CONVERTE HTML (ESTILIZADO) EM PDF? | |
//1 - Importe as seguintes libs no seu HTML | |
//JQUERY (VERSÃO RECOMENDADA: 2.1.0) | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script> | |
//JSPDF | |
<script src="https://cdn.rawgit.com/MrRio/jsPDF/master/dist/jspdf.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
//COMO IMPLEMENTAR UM SISTEMA QUE CONVERTE HTML PURO EM PDF? | |
//1 - Defina onde o script irá começar a ler o HTML que será convertido e onde ele terminará | |
<div id="HTMLtoPDF"> //COMEÇO | |
<header> | |
<h1>AQUI MESMO!</h1> | |
<p>Adicione aqui o conteúdo que pretende converter para pdf.</p> | |
</header> | |
</div> //FIM |
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
//COMO RESOLVER O PROBLEMA PERMISSION DENIED(PUBLICKEY) DO GIT | |
// 1 - Digite o seguinte comando no GIT BASH, informando | |
// no lugar de "[email protected]", o e-mail da sua conta | |
no github, se não criou uma ainda, crie e prossiga neste passo. | |
$ ssh-keygen -t rsa -C "[email protected]" | |
// 2 - Dê enter quando aparecer a seguinte mensagem, |
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 | |
// AUTOMATIZAÇÃO DE CUSTOMIZER DO TEMA - Petrus Nogueira | |
function customizer ($customize) { | |
//ARRAY QUE EDITA AS CUSTOMIZAÇÕES DE FORMA MAIS SIMPLES | |
$ctmz_tree = array( | |
//Início do site | |
array( |
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
$obj = get_queried_object(); | |
$loop = new WP_Query([ | |
'post_type' => "produtos", | |
'meta_query' => array( | |
array( | |
'key' => '_thumbnail_id', | |
'compare' => 'NOT EXISTS' | |
)), | |
'tax_query' => [[ | |
'taxonomy' => 'tipos-produtos', |
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
// ============ | |
// Excerpt Limiter - Desenvolvido por SamuraiPetrus (https://github.com/SamuraiPetrus) | |
// (Limitador de string que corta o texto no último espaço em branco) | |
//============= | |
// Parâmetros | |
//============= | |
//$text -> (str) Texto a ser limitado. | |
//$chars -> (int) (default: 100) Número de caracteres do texto final. | |
function excerpt_limiter($str, $chars=100){ |
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 | |
public function init() { | |
$labels_flores = array( | |
"name" => __( "Flores", "" ), | |
"singular_name" => __( "Flor", "" ), | |
"menu_name" => __( "Flores", "" ), | |
"all_items" => __( "Todas as flores", "" ), | |
"add_new" => __( "Adicionar nova flor", "" ), | |
"add_new_item" => __( "Adicionar nova flor", "" ), |
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 | |
// ========================= | |
// I9ME FUNCTIONS | |
// ========================= | |
//Console PHP - Desenvolvido por Paulo Arthur e SamuraiPetrus | |
// (Imprime arrays PHP no Console do Browser) | |
//============= | |
// Parâmetros |
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
// ============ | |
// SISTEMA DE LIGHTBOX - SamuraiPetrus | |
// Requer JQuery | |
//============= | |
//ABRIR LIGHTBOX | |
// DESKTOP - height: 515px; width: 815px; | |
// TABLET - height: 485px; width: 615px; | |
// MOBILE - height: 315px; width: 305px; | |
function OpenImageLightBox (content) { |
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
//DROPDOWNS WEART | |
//Adicione aqui os droptitles | |
//Dropdowns: Todos os dropdowns | |
//Close on scroll:Dropdowns que serão fechados mediante scroll | |
$dropdowns = ["banners", "categories", "painel", "filterby"]; | |
$close_on_scroll = [$dropdowns[2]]; |
OlderNewer