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
/** | |
* Woo: Custom Download View | |
* | |
* Enable custom download box from plugin, if plugin is de-activated | |
* fallback to woocommerce default. | |
*/ | |
function rapid_mydownloads( $template, $slug, $name ) { | |
if ( $template == 'myaccount/my-downloads.php' && function_exists( 'rapid_show_custom_download_box' ) ) { | |
global $woocommerce; | |
rapid_show_custom_download_box(); |
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 | |
if ( !defined( 'WP_CLI' ) ) return; | |
/** | |
* Comment Generate | |
*/ | |
class Comment_Generate extends WP_CLI_Command { | |
/** |
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 | |
function pw_edd_maybe_disable_stripe( $gateways ) { | |
$disable = false; | |
$cart_items = edd_get_cart_contents(); | |
if( $cart_items ) { | |
foreach( $cart_items as $item ) { |
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 | |
// Build an array that we can use for filtering our submitted data. | |
$args = array( | |
// fields is a key in our associative array that means we're looking for field values. | |
'fields' => array( | |
// 1 represents our field id and 'Kevin' represents the value we're looking to match. | |
1 => 'Kevin', | |
// If you want to filter by multiple fields, you'd add them here. | |
// 2 => 'checked' | |
), |
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 | |
function remove_filter_by_classname( $filter, $classname, $priority ) { | |
global $wp_filter; | |
$match = false; | |
if( !empty( $wp_filter[$filter] ) && !empty( $wp_filter[$filter][$priority] ) ) { | |
foreach( $wp_filter[$filter][$priority] as $added_filter ) { | |
if( is_array( $added_filter['function'] ) && get_class( $added_filter['function'][0] ) === $classname ) { | |
$match = $added_filter; | |
break; |
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: Log wp_mail() | |
Version: 0.1 | |
Plugin URI: http://wsu.edu | |
Description: Log emails sent through WordPress to a text file. | |
Author: jeremyfelt, wsu.edu | |
*/ | |
add_filter( 'wp_mail', 'wsu_log_wp_mail', 1 ); |
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
'use strict'; | |
// # Globbing | |
// for performance reasons we're only matching one level down: | |
// 'test/spec/{,*/}*.js' | |
// use this if you want to recursively match all subfolders: | |
// 'test/spec/**/*.js' | |
module.exports = function (grunt) { | |
// show elapsed time at the end |
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 | |
echo '<tr class="addon-file-field">'; | |
echo '<th>'; | |
echo '<label for="addon-file">'.__( 'ZIP file', '' ).'</label>'; | |
echo '</th>'; | |
echo '<td>'; | |
echo '<input type="text" name="addon-meta[file]" id="addon-file" class="widefat" value="'.esc_url( $file ).'">'; | |
echo '</td>'; | |
echo '</tr>'; |
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
/** | |
* Note that the following media queries are intended to be used for the specified device or screen size | |
* in both portrait and landscape mode. | |
* | |
* Desktop queries are not provided since the default styles for most sites and applications typically focus | |
* on that for the default sites. | |
* | |
* Contributes, comments, and all that fun stuff always welcome :). | |
*/ | |
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
#! /bin/bash | |
# A modification of Dean Clatworthy's deploy script as found here: https://github.com/deanc/wordpress-plugin-git-svn | |
# The difference is that this script lives in the plugin's git repo & doesn't require an existing SVN repo. | |
# main config | |
PLUGINSLUG="camptix-payfast-gateway" | |
CURRENTDIR=`pwd` | |
MAINFILE="camptix-payfast.php" # this should be the name of your main php file in the wordpress plugin | |
# git config |
OlderNewer