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
<pre><?php | |
// WordPress Multisite - Delete all revisions from all posts in a netword. | |
// Quick hack by @mrazzari, 2014. | |
// For context see this thread started by Kitchin at the forums: | |
// http://wordpress.org/support/topic/deleting-post-revisions-do-not-use-the-abc-join-code-you-see-everywhere | |
// HOWTO | |
// This snippet is meant to be called as a standalone script. | |
// Like http://example.com/tmp/multisite_delete_revisions.php |
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
/** | |
* Helvetica Neue Normal (No Stretch) | |
*/ | |
/* Helvetica Neue Black Font Stack */ | |
.{font-family: "HelveticaNeueBlack", "HelveticaNeue-Black", "Helvetica Neue Black", "HelveticaNeue", "Helvetica Neue", 'TeXGyreHerosBold', "Arial Black", sans-serif; font-weight:800; font-stretch:normal;} | |
/* Helvetica Neue Heavy Font Stack */ | |
.{font-family: "HelveticaNeueHeavy", "HelveticaNeue-Heavy", "Helvetica Neue Heavy", "HelveticaNeue", "Helvetica Neue", 'TeXGyreHerosBold', "Arial Black", sans-serif; font-weight:700; font-stretch:normal;} |
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 | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php | |
*/ | |
$args = 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
<?php | |
/** | |
* Function: convert_number | |
* | |
* Description: | |
* Converts a given integer (in range [0..1T-1], inclusive) into | |
* alphabetical format ("one", "two", etc.) | |
* | |
* @int | |
* |
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 | |
/** | |
* Simple excel writer class with no external dependencies, drop it in and have fun | |
* @author Matt Nowack | |
* @license Unlicensed | |
* @version 1.0 | |
*/ | |
class Excel { | |
private $col; |
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
/** Register custom product type */ | |
add_action( 'init', 'register_gwp_bundle_product_type' ); | |
function register_gwp_bundle_product_type () { | |
class WC_Product_gwp_bundle extends WC_Product { | |
public function __construct( $product ) { | |
$this->product_type = 'gwp_bundle'; | |
parent::__construct( $product ); | |
} | |
} |
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
$arrayOne = Array | |
( | |
"_wvs_pro_swatch_option" => Array | |
( | |
"default_to_button" => "yes", | |
"default_to_image" => "yes", | |
"default_image_type_attribute" => "", | |
"pa_color" => Array | |
( | |
"default_type" => "select", |
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
/** | |
* Add WooCommerce Checkbox checkout | |
*/ | |
function tkd_add_checkout_checkbox() { | |
woocommerce_form_field( 'checkout-checkbox', array( // CSS ID | |
'type' => 'checkbox', | |
'class' => array('form-row mycheckbox'), // CSS Class | |
'label_class' => array('woocommerce-form__label woocommerce-form__label-for-checkbox checkbox'), | |
'input_class' => array('woocommerce-form__input woocommerce-form__input-checkbox input-checkbox'), |
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
/* | |
* Set up your Git configuration | |
*/ | |
git config --global user.email "you@yourdomain.com" | |
git config --global user.name "Your Name" | |
git config --global core.editor "nano" |
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
// from current folder and all its sub folder | |
find . -type d -exec chmod 0755 {} \; | |
find . -type f -exec chmod 0644 {} \; |
OlderNewer