Pippin Williamson pippinsplugins

View gist:9842051
1 2 3 4 5 6 7 8 9
<?php
/*
* Plugin Name: PD101 Extending Classes Example
* Description: An example of how to extend a class
* Author: Pippin Williamson
*/
 
 
class PD101_Base {
View gist:9771238
1 2 3 4 5 6 7 8 9 10
<?php
/**
* Plugin Name: Update Previous Order Numbers for EDD
* Description: For users of the sequential order number beta, use this before you get new orders to have your previous orders sequentially numbered
* Version: 0.1
* Author: Chris Christoff
* Author URI: http://www.chriscct7.com
*/
 
function update_script_edd_seq_numbers(){
View gist:9641841
1 2 3 4 5 6 7 8 9 10
<?php
function get_the_user_ip() {
if ( ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ) {
//check ip from share internet
$ip = $_SERVER['HTTP_CLIENT_IP'];
} elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
//to check ip is pass from proxy
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$ip = $_SERVER['REMOTE_ADDR'];
View gist:9627938
1 2 3 4
[Tue Mar 18 19:19:44 2014] [error] [client 54.241.31.99] Stripe Notice: Undefined property of Stripe_Customer instance: customer
[Tue Mar 18 19:35:21 2014] [error] [client 72.209.182.221] PHP Warning: stripos() expects parameter 1 to be string, array given in /nas/wp/www/cluster-1117/pippinsplugins/wp-content/plugins/jetpack/modules/shortcodes/dailymotion.php on line 22, referer: http://pippinsplugins.com/wp-admin/post-new.php
[Tue Mar 18 19:35:21 2014] [error] [client 72.209.182.221] PHP Warning: preg_match_all() expects parameter 2 to be string, array given in /nas/wp/www/cluster-1117/pippinsplugins/wp-content/plugins/jetpack/modules/shortcodes/dailymotion.php on line 29, referer: http://pippinsplugins.com/wp-admin/post-new.php
[Tue Mar 18 19:35:21 2014] [error] [client 72.209.182.221] PHP Warning: stripos() expects parameter 1 to be string, array given in /nas/wp/www/cluster-1117/pippinsplugins/wp-content/plugins/jetpack/modules/shortcodes/blip.php on line 10, referer: http://pippinsplugins.com/wp-admin
View gist:9557012
1 2 3 4 5 6 7 8 9 10
<?php
function pw_edd_recurring_payment_received_notice( $payment, $parent_id, $amount, $txn_id, $unique_key ) {
 
$user_id = edd_get_payment_user_id( $parent_id );
$email = edd_get_payment_user_email( $parent_id );
 
$user_data = get_userdata( $user_id );
 
$subject = 'Payment Received';
$message = "Hello $usera_data->display_name, your payment for $amount has been received. Thanks!";
View gist:9330494
1 2 3 4 5 6 7 8 9 10
<?php
function pw_rcp_custom_email_notice( $message, $user_id ) {
$user_data = get_userdata( $user_id );
$user_email = $user_data->user_email;
 
$message = "Hello admin, this is a custom alert message!\n\n";
$message .= "$user_email just signed up for an account.";
 
return $message;
View gist:9201867
1 2 3 4 5
<?php
// Use minified libraries if SCRIPT_DEBUG is turned off
$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
 
wp_enqueue_script( 'my-script-handle', plugin_dir_url( __FILE__ ) . 'assets/my-file' . $suffix . '.js', array( 'jquery' ) );
View gist:9197316
1 2 3 4 5 6
// make downloads hierarchical
function thesrpr_edd_make_hierarchical($download_args ) {
$download_args['hierarchical'] = true;
return $download_args;
}
add_filter( 'edd_download_post_type_args', 'thesrpr_edd_make_hierarchical' );
View gist:8907778
1 2 3 4 5 6 7 8 9 10
<?php
// create the HTML for the custom template
function pw_edd_custom_email_template() {
echo '<div style="width: 550px; border: 1px solid #1e79c0; background: #ddd; padding: 8px 10px; margin: 0 auto;">';
echo '<div id="edd-email-content" style="background: #f0f0f0; border: 1px solid #9ac7e1; padding: 10px;">';
echo '{email}'; // this tag is required in order for the contents of the email to be shown
echo '</div>';
echo '</div>';
View gist:8834900
1 2 3 4 5 6 7 8 9 10
<?php
 
/*
* Plugin Name: EDD Double Pagination
*/
 
function pw_edd_duplicate_pagination() {
?>
<script type="text/javascript">
jQuery(document).ready(function($) {
Something went wrong with that request. Please try again.