Skip to content

Instantly share code, notes, and snippets.

Chris Klosowski cklosowski

Block or report user

Report or block cklosowski

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cklosowski
cklosowski / eddwp-custom-session-start.php
Created May 31, 2019
Selectivly start Sessions with Easy Digital Downloads
View eddwp-custom-session-start.php
<?php
/**
* If the page loaded is the homepage, we don't need to start a session if one doesn't exist
*/
function eddwp_ck_maybe_start_session( $start_session ) {
// Doesn't start sessions on the homepage.
if ( '/' == $_SERVER['REQUEST_URI'] ) {
$start_session = false;
View keybase.md

Keybase proof

I hereby claim:

  • I am cklosowski on github.
  • I am cklosowski (https://keybase.io/cklosowski) on keybase.
  • I have a public key ASCOP7reanfM8vuURtRSisGC-Fn16yydrouHAkSF1psdVwo

To claim this, I am signing this object:

@cklosowski
cklosowski / edd-2.9.4-templatable-changes.txt
Last active Jul 9, 2018
A list of changes for the Easy Digital Downloads 2.9.4 release that add nonce verification to some actions. The format lists the file, a function (if relevant), what changes were made, and then the previous version of code, and the new version of the code.
View edd-2.9.4-templatable-changes.txt
/**
*
* Templates Changed
*
* These files are part of the Easy Digital Downlaods template structure. If you've added custom template files to your theme, for any of the following files, you will need to be sure the changes
* are added to your custom templates in order to avoid any unexpected behavior.
*
*/
@cklosowski
cklosowski / edd-sl-custom-local-domains.php
Created Jan 25, 2018
Add TLDs and Subdomains to Software Licensing is_local_url checks.
View edd-sl-custom-local-domains.php
<?php
// Example of adding a TLD (.org in this example) to the is_local_url check.
function ck_add_url_tlds( $tlds_to_check ) {
$tlds_to_check[] = '.org';
return $tlds_to_check;
}
add_filter( 'edd_sl_url_tlds', 'ck_add_url_tlds', 10, 1 );
View keybase.md

Keybase proof

I hereby claim:

  • I am cklosowski on github.
  • I am cklosowski (https://keybase.io/cklosowski) on keybase.
  • I have a public key ASAOloI2X1e3X9gnhxhRaQKn83WoFGGXbn8FFIrHFJFoqAo

To claim this, I am signing this object:

View earn.gg.php
<?php
/**
* This is a rollbot for earn.gg written in PHP
*
* It will use the parameters below to run bets. If a bet wins it resets to the $starting value.
* If a bet loses, it doubles your bet amount and continues to do so until you win, or hit the $max_bet.
*
* Once you win, it kicks back down to the $starting bet.
*
@cklosowski
cklosowski / edd-rial-to-toman.php
Created Jul 27, 2017
EDD 2.8 - Rial > Toman purchase link fix
View edd-rial-to-toman.php
<?php
if ( ! function_exists( 'edd_toman_currency_symbol' ) ) {
function edd_toman_currency_symbol( $symbol, $currency ) {
if ( ! is_admin() && 'rial' === strtolower( $currency ) ) {
return 'تومان';
}
return 'ریال';
}
}
add_filter( 'edd_currency_symbol', 'edd_toman_currency_symbol', 10, 3 );
@cklosowski
cklosowski / azwp-tempe-07.13.2017.md
Created Jul 14, 2017
Arizona WordPress Meetup (Tempe) - July 13, 2017
View azwp-tempe-07.13.2017.md
@cklosowski
cklosowski / edd-variable-price-advanced-options-example.php
Last active Jun 29, 2017
Integrating with the Easy Digital Downloads variable price advanced options in version 2.8
View edd-variable-price-advanced-options-example.php
<?php
/**
* Custom section for EDD price options
*/
function eddwp_custom_price_option_section( $post_id, $key, $args ) {
$recurring = EDD_Recurring()->is_price_recurring( $post_id, $key );
?>
<div class="edd-custom-price-option-section">
<span class="edd-custom-price-option-section-title">My Sample Extension</span>
View edd-after-payment-actions-example.php
<?php
function eddwp_trigger_after_payment_actions_example( $payment_id = 0, $payment = false, $customer = false ) {
/**
* The $payment variable contains the EDD_Payment object that has been completed.
* The $customer variable contains the EDD_Customer object that the payment belongs to.
*/
}
add_action( 'edd_after_payment_actions', 'eddwp_trigger_after_payment_actions_example', 10, 3 );
You can’t perform that action at this time.