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
// | |
// Alerts | |
// -------------------------------------------------- | |
// Base styles | |
// ------------------------- | |
.alert, | |
.validation_error, |
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
# ~/.osx — http://mths.be/osx | |
# root check | |
if [[ $EUID -ne 0 ]]; then | |
echo "################################"; | |
echo "## YOU ARE NOT RUNNING AS ROOT #"; | |
echo "################################"; | |
echo "#"; | |
echo "# USAGE: sudo $0"; | |
exit; |
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
/* | |
This widget shows Recent Posts on your Tumblr blog. | |
Its dependency is jQuery. | |
Usage: | |
1) Add html: | |
<div id="recent-posts"></div> | |
2) Add code into the <head>: |
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 | |
/** | |
* Custom Loop Add to Cart. | |
* | |
* Template with quantity. | |
* | |
* @author WooThemes | |
* @package WooCommerce/Templates | |
* @version 1.6.4 | |
*/ |
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 | |
/** | |
* Plugin Name: WooCommerce XNum to cart | |
* Plugin URI: http://claudiosmweb.com/snippets/woocommerce-loop-de-produtos-com-quantidade/ | |
* Source: http://docs.woothemes.com/document/override-loop-template-and-show-quantities-next-to-add-to-cart-buttons/ | |
* Description: Add x-number of items feild to the 'add to cart' button in WooCommerce | |
* Version: .10 | |
* Author: orionrush | |
* Note: You will have to style the button css according to your theme's needes. | |
*/ |
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 | |
register_uninstall_hook( __FILE__, 'do_delete_terms_wpdb' ); | |
/** | |
* Delete database entries of terms and taxonomies using wordpress SQL api $wpdb | |
* | |
* @global $wpdb | |
* @wp-hook register_uninstall_hook | |
* @author Travis Smith | |
* http://wpsmith.net/2014/wp/plugin-uninstall-delete-terms-taxonomies-wordpress-database/ |
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#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/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
/** | |
* Leverages the RICG WP plugin to deliver responsive images with srcset attr | |
* | |
* @param $post_ID | |
* @param $thumb_id | |
* @param $size | |
* @return mixed / wp_get_attached_image markup | |
* | |
* @uses PHP 5.2+ due to PATHINFO_FILENAME | |
* @uses wp_get_attachment_image |