Skip to content

Instantly share code, notes, and snippets.

View gmmcal's full-sized avatar
💻
https://www.gustavocunha.dev

Gustavo Cunha gmmcal

💻
https://www.gustavocunha.dev
View GitHub Profile
@gmmcal
gmmcal / .p10k.zsh
Last active September 30, 2026 07:55
dotfiles
# Generated by Powerlevel10k configuration wizard on 2024-09-22 at 09:55 CEST.
# Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 4242.
# Wizard options: nerdfont-v3 + powerline, small icons, unicode, lean, 2 lines, dotted,
# full frame, lightest-ornaments, sparse, many icons, fluent, instant_prompt=verbose.
# Type `p10k configure` to generate another config.
#
# Config for Powerlevel10k with lean prompt style. Type `p10k configure` to generate
# your own config based on it.
#
# Tip: Looking for a nice color? Here's a one-liner to print colormap.
@gmmcal
gmmcal / Register Taxonomy
Created September 17, 2014 12:11
Criando um plugin para Wordpress usando Custom Post Types - Tutorial 5
register_taxonomy(
"categorias",
array("demonstracao"),
array(
"public" => true,
"show_in_nav_menus" => true,
"show_ui" => true,
"show_tagcloud" => false,
"hierarchical" => true,
"label" => "Categorias",
@gmmcal
gmmcal / Register Post Type
Created September 17, 2014 12:10
Criando um plugin para Wordpress usando Custom Post Types - Tutorial 4
$labels = array(
'name' => 'Demonstração',
'singular_name' => 'Demonstração',
'add_new' => 'Adicionar novo',
'add_new_item' => 'Adicionar nova demonstração',
'edit_item' => 'Editar Demonstração',
'new_item' => 'Nova Demonstração',
'all_items' => 'Todas as Demonstrações',
'view_item' => 'Ver Demonstração',
'search_items' => 'Pesquisar Demonstração',
@gmmcal
gmmcal / Plugin definition
Created September 17, 2014 12:10
Criando um plugin para Wordpress usando Custom Post Types - Tutorial
/*
Plugin Name: Demonstração
Plugin URI: http://www.gmmcal.com.br
Description: Plugin de Demonstração
Author: Gustavo Cunha
Version: 1.0
Author URI: http://www.gmmcal.com.br
*/
@gmmcal
gmmcal / Class Init
Created September 17, 2014 12:09
Criando um plugin para Wordpress usando Custom Post Types - Tutorial 2
add_action("init", "demonstracaoInit");
function demonstracaoInit() {
$d = new Demonstracao();
$d->init();
}
@gmmcal
gmmcal / Base Class
Created September 17, 2014 12:08
Criando um plugin para Wordpress usando Custom Post Types - Tutorial 1
class Demonstracao {
function Demonstracao(){
}
function init(){
// algum código aqui
}
}