Skip to content

Instantly share code, notes, and snippets.

View pippinsplugins's full-sized avatar

Pippin Williamson pippinsplugins

View GitHub Profile
@jeffsebring
jeffsebring / gist:2025998
Created March 13, 2012 01:19 — forked from Viper007Bond/gist:2025993
Graphing car mileage
<?php
/**
* All of this code is in a big class that implements things like meta boxes and
* tons of other stuff but for now here's the relevant functions.
*
* Note the custom post types and custom taxonomies are just in placeholder form.
* I haven't gone through and properly set the labels, etc. for them like I will
* when I release the plugin.
*/
@pippinsplugins
pippinsplugins / gist:55a3d6cbf9e9f2d51789
Created December 8, 2014 15:08
My answer to why I don't actively fight piracy.

While I'm often a member of a rather small group of people that think this way, I actually believe very strongly that spending time and effort figuring out how to make it harder for dishonest people to take things from you is generally a waste of time.

security is all about steadily making it harder for dishonest people to try stuff.

Piracy happens in just about every industry, but the impact that piracy has on your business largely has to do with how you choose to fight it. If you take an active approach and invest multitudes of time, effort, and money into combatting those that have no appreciation for the value of your product, you will actually undermine the intrinsic value of the product. How? Simply by investing time, money and effort in the wrong place. I prefer to take the time, effort and money that I could use to fight piracy and invest it directly into real customers and the people that have an appreciation for what has been built. Is some money lost due to piracy? Maybe. Is a whole lot more g

@michael-cannon
michael-cannon / cbqe-restrict-content-pro.php
Last active August 29, 2015 14:14
Restrict Content Pro for Custom Bulk/Quick Edit plugin
<?php
/**
* Restrict Content Pro for Custom Bulk/Quick Edit plugin
*
* In WordPress Admin > Settings > Custom Bulk/Quick, configure your fields as needed, per below. If configuration updates are needed, either manually edit them or remove the current field configuration and click Save Changes for automatic updates.
*
* Paid Only? - As checkbox
* Show Excerpt? - As checkbox
* Hide from Feed? - As checkbox
* Access Level - As RCP Access Level
@thefrosty
thefrosty / edd-sl-upgrades.php
Created November 8, 2014 01:40
Upgrade a license to a higher sites count on Extendd.com for Easy Digital Downloads
<?php
if ( !defined( 'ABSPATH' ) )
exit;
function extendd_add_key_column() {
echo '<th class="edd_license_key_upgrade">' . __( 'Upgrade License', 'extendd' ) . '</th>';
}
add_action( 'edd_purchase_history_header_after', 'extendd_add_key_column' );
@scottopolis
scottopolis / gist:bdde1926b1d08b0bb88f
Last active August 29, 2015 14:02
EDD Custom Bundle License Activation Limits
<?php
function sb_edd_filter_license_limit( $limit, $download_id, $license_id, $price_id ) {
$payment_id = get_post_meta( $license_id, '_edd_sl_payment_id', true );
$is_bundle = false;
$bundle_items = array();
$downloads = edd_get_payment_meta_downloads( $payment_id );
if( $downloads ) {
foreach( $downloads as $download ) {