Skip to content

Instantly share code, notes, and snippets.

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

Elias Faiçal eliasfaical

🏠
Working from home
View GitHub Profile
@chrisguitarguy
chrisguitarguy / comments-example.php
Created September 21, 2011 21:44
How to add custom fields to WordPress comments
<?php
/*
Plugin Name: Add Extra Comment Fields
Plugin URI: http://pmg.co/category/wordpress
Description: An example of how to add, save and edit extra comment fields in WordPress
Version: n/a
Author: Christopher Davis
Author URI: http://pmg.co/people/chris
License: MIT
*/
@luetkemj
luetkemj / wp-query-ref.php
Last active May 25, 2024 10:56
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/
@nolim1t
nolim1t / home.jade
Created May 11, 2012 05:19
Sample Templating with express and jade
h2 Hello World
h3 Hello World
:markdown
This is some **test** markdown text
we can even link to [stuff](http://google.com)
ul.list
- each i in data
li=i.name
@jcemer
jcemer / gist:3130835
Created July 17, 2012 17:55
Less gradient mixins
#gradient {
.vertical(@startColor: #555, @endColor: #333, @colorStop: 100%) {
background-color: mix(@startColor, @endColor, 60%);
background-image: -moz-linear-gradient(top, @startColor, @endColor @colorStop); // FF 3.6+
background-image: -ms-linear-gradient(top, @startColor, @endColor @colorStop); // IE10
background-image: -webkit-gradient(linear, 0 0, 0 @colorStop, from(@startColor), to(@endColor)); // Android 2.3, Safari 4+, Chrome 2+
background-image: -webkit-linear-gradient(top, @startColor, @endColor @colorStop); // Safari 5.1+, Chrome 10+
background-image: -o-linear-gradient(top, @startColor, @endColor @colorStop); // Opera 11.10
background-image: linear-gradient(top, @startColor, @endColor @colorStop); // The standard
}
@gyrus
gyrus / gist:3155982
Created July 21, 2012 14:40
Rename WordPress "Posts" to "News"
<?php
/**
* Rename "Posts" to "News"
*
* @link http://new2wp.com/snippet/change-wordpress-posts-post-type-news/
*/
add_action( 'admin_menu', 'pilau_change_post_menu_label' );
add_action( 'init', 'pilau_change_post_object_label' );
function pilau_change_post_menu_label() {
@apathetic
apathetic / gist:3648737
Created September 6, 2012 00:31
Wordpress: add radio button to admin Users table
/*
* Add a column to the Users table, with a radio button
* The radio button updates a usermeta field via ajax
*/
add_filter( 'manage_users_columns', 'add_display_column');
function add_display_column( $columns){
$columns['display_as'] = 'Display as';
return $columns;
}
@claudiosanches
claudiosanches / recebe.php
Created September 30, 2012 18:49
Exemplo de como adicionar ou atualizar dados com WPDB
<?php
// Update table
function cs_add_data($competition, $date, $numbers) {
global $wpdb;
$table_name = $wpdb->prefix . 'nome da sua tabela';
$numbers = str_replace('/', '-', $numbers);
// Test variables
if (!is_numeric($competition))
wp_die('O número do concurso é inválido');
@claudiosanches
claudiosanches / functions.php
Created November 23, 2012 15:01
WooCommerce - Customizar o summary do content-single-product.php
<?php
// Colar no functions.php
// Para remover os hooks
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title' );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price' );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt' );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart' );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta' );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_sharing' );
@diegoprates
diegoprates / gist:5047663
Last active June 19, 2023 21:26
Tradução do jQuery validation plugin para pt-BR.
/*
* Translated default messages for the jQuery validation plugin.
* Locale: PT_BR
*/
jQuery.extend(jQuery.validator.messages, {
required: "Este campo &eacute; requerido.",
remote: "Por favor, corrija este campo.",
email: "Por favor, forne&ccedil;a um endere&ccedil;o eletr&ocirc;nico v&aacute;lido.",
url: "Por favor, forne&ccedil;a uma URL v&aacute;lida.",
date: "Por favor, forne&ccedil;a uma data v&aacute;lida.",
@vitorbritto
vitorbritto / devlist-bookmarks.md
Last active October 10, 2023 13:49
A BADASS list for faster Web Development! Recently, I decided to organize my bookmarks. So, like a good fellow, I am sharing with you. I hope you enjoy!

Dev List Bookmarks

Attention: the list was moved to https://github.com/vitorbritto/dev-list

This page is not maintained anymore, please update your bookmarks.


Recently, I decided to organize my bookmarks. So, like a good fellow, I am sharing with you. I hope you enjoy!