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 | |
/** | |
* Add an 'Other' type to xprofile fields | |
* | |
* @link https://buddypress.trac.wordpress.org/ticket/3775 | |
* @link http://redmine.gc.cuny.edu/issues/1199 | |
*/ | |
class CAC_Xprofile_Other { | |
function __construct() { | |
add_action( 'xprofile_field_additional_options', array( &$this, 'render_admin' ) ); |
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 | |
// Single Product | |
add_filter( 'single_add_to_cart_text', 'custom_single_add_to_cart_text' ); | |
function custom_single_add_to_cart_text() { | |
return 'Add to cart'; // Change this to change the text on the Single Product Add to cart button. | |
} | |
// Variable Product | |
add_filter( 'variable_add_to_cart_text', 'custom_variable_add_to_cart_text' ); |
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
.widget .latest-blog-posts-list { | |
margin: 0; | |
list-style: none; | |
} | |
.widget .latest-blog-posts-list li { | |
margin: 0 0 10px 0; | |
padding: 0 0 10px 0; | |
border-bottom: dotted 1px #CCC; | |
background: none; | |
word-wrap: break-word; |
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
# .bashrc | |
# Prevent "stdin: is not a tty" errors | |
if [ $(expr index "$-" i) -eq 0 ]; then | |
return | |
fi | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc |
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 | |
/** | |
* Modify/change the default allowed tags for bbPress. | |
* | |
* The default list (below) is in bbpress/includes/common/formatting.php, L24-66. | |
* Adjust below as needed. This should go in your theme's functions.php file (or equivilant). | |
*/ | |
function ja_filter_bbpress_allowed_tags() { | |
return 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
/** | |
* Rename these to the form input names you are going to use. | |
* When you create a new attribute in Properties->Settings->Developer | |
* the form input name will appear greyed out under the attribute name | |
*/ | |
define('SPRP_SEARCH_FROM_KEY', 'price_from_per_month'); | |
define('SPRP_SEARCH_TO_KEY', 'price_to_per_month'); | |
function parse_search(){ |
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 | |
/* Pull apart OEmbed video link to get thumbnails out*/ | |
function get_video_thumbnail_uri( $video_uri ) { | |
$thumbnail_uri = ''; | |
// determine the type of video and the video id | |
$video = parse_video_uri( $video_uri ); | |
// get youtube thumbnail |
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 | |
// Add Downloadable Products to Woocommerce Completed Order & Invoice Emails as Attachments | |
function woocommerce_emails_attach_downloadables($attachments, $status, $order) { | |
if ( ! is_object( $order ) || ! isset( $status ) ) { | |
return $attachments; | |
} | |
if ( empty( $order ) ) { | |
return $attachments; |
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: PayPal Sandbox IPN Tester | |
* Description: Pings the IPN endpoint to see if your server can connect. Just head to <a href="/?ipn-test=1">yoursite.com/?ipn-test=1</a> whilst logged in as admin. | |
* Version: 1.0.0 | |
* Author: WooThemes | |
* Requires at least: 4.1 | |
* Tested up to: 4.3 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { |
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 | |
/** | |
* Skeletal sample shortcode | |
*/ | |
add_shortcode( 'pilau-sample', 'pilau_sample_shortcode' ); | |
function pilau_sample_shortcode( $atts ) { | |
extract( shortcode_atts( array( | |
'text' => '' | |
), $atts ) ); |
OlderNewer