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 | |
/* | |
* Dependent Plugin Activation/Deactivation | |
* | |
* Sources: | |
* 1. https://pippinsplugins.com/checking-dependent-plugin-active/ | |
* 2. http://10up.com/blog/2012/wordpress-plug-in-self-deactivation/ | |
* | |
*/ | |
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
/** | |
* Adds new payment statuses to array of available statuses | |
*/ | |
function sww_add_edd_payment_statuses( $payment_statuses ) { | |
$payment_statuses['invoice_paid'] = 'Invoice Paid'; | |
$payment_statuses['in_progress'] = 'Project in progress'; | |
return $payment_statuses; | |
} |
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_action('wp_footer','open_link_new_window'); | |
function open_link_new_window(){ | |
?> | |
<script> | |
jQuery(function() { | |
function handle_cta( ev ) { | |
var href = jQuery( this ).attr( 'href' ); | |
window.open( href, '_blank' ); | |
return false; | |
} |
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: EDD Create Coupon from Slack | |
Plugin URL: http://gravityview.co | |
Description: Allow creating a coupon `/coupon [%]` in Slack | |
Version: 1.0 | |
Author: Katz Web Services, Inc. | |
Author URI: http://katz.co | |
Contributors: katzwebservices | |
*/ |
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
/** | |
* My Account | |
*/ | |
.woocommerce-MyAccount-navigation { | |
display: inline-block; | |
float: left; | |
width: 30% !important; | |
} |
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
<?php | |
/* | |
* Plugin Name: Restrict Content Pro - Collect Billing Address | |
* Description: Collect customers billing address during registration through Restrict Content Pro | |
* Author: Pippin Williamson | |
* Version: 1.0 | |
*/ | |
class RCP_Billing_Address { | |
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
function logedout_singular_redirect() { | |
if (!is_user_logged_in() && ( is_singular( 'job_listing' ) ) | |
) { | |
// feel free to customize the following line to suit your needs | |
wp_redirect(site_url('my-page-slug/')); | |
exit; | |
} | |
} | |
add_action('template_redirect', 'logedout_singular_redirect'); |
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
function custom_wp_is_mobile() { | |
static $is_mobile; | |
if ( isset($is_mobile) ) | |
return $is_mobile; | |
if ( empty($_SERVER['HTTP_USER_AGENT']) ) { | |
$is_mobile = false; | |
} elseif ( | |
strpos($_SERVER['HTTP_USER_AGENT'], 'Android') !== false |
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
function add_is_mobile_bodyclass($classes) { | |
//adds a class of "wp_is_mobile" to the body class of the page | |
if (wp_is_mobile()) { | |
$classes[] = 'wp_is_mobile'; | |
} | |
return $classes; | |
} | |
add_filter('body_class','add_is_mobile_bodyclass'); |
OlderNewer