This file contains hidden or 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 | |
// Redirect to the post/page itself after publishing or updating a post in | |
// WordPress. This code is from the WordPress forum [1], modified so it doesn't | |
// redirect when saving a draft. | |
// [1]: http://wordpress.org/support/topic/redirect-to-new-post-after-publish | |
add_filter('redirect_post_location', function($location) |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 customer first and last name to admin new order email subject | |
function skyverge_add_customer_to_email_subject( $subject, $order ) { | |
$subject = 'New Customer Order - (# ' . $order->get_order_number() . ') from ' . $order->get_billing_first_name() . ' ' . $order->get_billing_last_name(); | |
return $subject; | |
}; | |
add_filter( 'woocommerce_email_subject_new_order', 'skyverge_add_customer_to_email_subject', 10, 2 ); |
This file contains hidden or 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 icons for any custom order statuses | |
* Tutorial: http://www.skyverge.com/blog/changing-woocommerce-custom-order-status-icons/ | |
**/ | |
add_action( 'wp_print_scripts', 'skyverge_add_custom_order_status_icon' ); | |
function skyverge_add_custom_order_status_icon() { | |
if( ! is_admin() ) { | |
return; | |
} |
This file contains hidden or 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 hidden or 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/ | |
* | |
*/ | |
NewerOlder