Skip to content

Instantly share code, notes, and snippets.

View mauriciogofas's full-sized avatar

Mauricio Gofas mauriciogofas

View GitHub Profile
@mauriciogofas
mauriciogofas / config.json
Last active November 25, 2015 12:32 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@mauriciogofas
mauriciogofas / 0_reuse_code.js
Created October 2, 2015 15:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mauriciogofas
mauriciogofas / wpfcwc.conf
Last active October 1, 2015 00:54 — forked from pelmered/wpfcwc.conf
EasyEngine WooCommerce config with FastCGI Cache
#
set $skip_cache 0;
# POST requests and URL with a query string should always go to php
if ($request_method = POST) {
set $skip_cache 1;
}
if ($query_string != "") {
@mauriciogofas
mauriciogofas / gist:884566ed02f89af821d6
Created September 29, 2015 17:40 — forked from mikejolley/gist:9b82e46548301c192aa0
ShareDaddy integration code for WooCommerce
function sharedaddy_for_woocommerce() {
?>
<div class="social"><?php echo sharing_display(); ?></div>
<?php
}
add_action( 'woocommerce_share', 'sharedaddy_for_woocommerce' );
@mauriciogofas
mauriciogofas / download.sh
Created September 23, 2015 01:06 — forked from yratof/download.sh
Download a website for Static use
wget -r -P / --user-agent="" -e robots=off --wait 1 -E http://website.com
@mauriciogofas
mauriciogofas / gettext-filter-multiple.php
Last active September 4, 2015 01:41 — forked from BFTrick/gettext-filter-multiple.php
Use the gettext WordPress filter to change any translatable string.
<?php
/**
* Change text strings
*
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
*/
function my_text_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Sale!' :
$translated_text = __( 'Clearance!', 'woocommerce' );
@mauriciogofas
mauriciogofas / gettext-filter.php
Last active September 4, 2015 01:39 — forked from BFTrick/gettext-filter.php
Use the gettext WordPress filter to change any translatable string.
<?php
/**
* Change text strings
*
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
*/
function my_text_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Related Products' :
$translated_text = __( 'Check out these related products', 'woocommerce' );
@mauriciogofas
mauriciogofas / gist:044472308947b7e18c0d
Last active August 29, 2015 14:27 — forked from jamiemarsland/gist:5e618baeda2dd5199d4a
Remove WooThemes credit in Storefront footer
add_action( 'init', 'custom_remove_footer_credit', 10 );
function custom_remove_footer_credit () {
remove_action( 'storefront_footer', 'storefront_credit', 20 );
add_action( 'storefront_footer', 'custom_storefront_credit', 20 );
}
function custom_storefront_credit() {
?>
<div class="site-info">
@mauriciogofas
mauriciogofas / test.php
Last active August 29, 2015 14:23 — forked from raewrites/test.php
Add post ID to posts, pages admin columns
add_filter( 'manage_posts_columns', 'revealid_add_id_column', 5 );
add_action( 'manage_posts_custom_column', 'revealid_id_column_content', 5, 2 );
function revealid_add_id_column( $columns ) {
$columns['revealid_id'] = 'ID';
return $columns;
}
function revealid_id_column_content( $column, $id ) {
<?php
/**
* Gravity Wiz // Gravity Forms // Map Submitted Field Values to Another Field
*
* Preview your Gravity forms on the frontend of your website. Adds a "Live Preview" link to the Gravity Forms toolbar.
*
* Usage
*
* 1 - Enable "Allow field to be populated dynamically" option on field which should be populated.
* 2 - In the "Parameter Name" input, enter the merge tag (or merge tags) of the field whose value whould be populated into this field.