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/sh | |
# | |
# A pre-commit hook to minify js & css files | |
# if committing to branch 'master' | |
BRANCH=`git rev-parse --abbrev-ref HEAD` | |
if [ "$BRANCH" == 'master' ] | |
then | |
csspath='css/*.css' | |
jspath='js/*.js' |
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 | |
/** | |
* Filters 'authenticate' | |
* to keep user with id 1 | |
* logged in without needing | |
* to enter l/p | |
*/ | |
add_filter( 'authenticate', 'wwm_authenticate_filter', 10, 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
<?php | |
/* | |
Plugin Name: Custom Redirect for Awesome Surveys | |
Plugin URI: http://www.willthewebmechanic.com/awesome-surveys | |
Description: Redirects to a specified link after survey submission | |
Version: 1.0 | |
Author: Will Brubaker | |
Author URI: http://www.willthewebmechanic.com | |
License: GPLv3.0 | |
*/ |
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 | |
/* Do not copy the opening <?php tag above */ | |
//Add the shortcode tag with its callback function: | |
add_shortcode( 'display_tickets_sold', 'wwm_display_tickets_sold' ); | |
/** | |
* Given a valid product id, Outputs a number of 'units sold' | |
* Usage [display_tickets_sold product_id="####"] where #### is a valid product id. |
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
/* | |
* Translated default messages for the jQuery validation plugin. | |
* Locale: NL (Dutch; Nederlands, Vlaams) | |
*/ | |
jQuery.extend(jQuery.validator.messages, { | |
required: "Dit is een verplicht veld.", | |
remote: "Controleer dit veld.", | |
email: "Vul hier een geldig e-mailadres in.", | |
url: "Vul hier een geldige URL in.", | |
date: "Vul hier een geldige datum in.", |
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: Code With WP Custom Snippets | |
Plugin URI: http://codewithwp.com/ | |
Description: This plugin holds custom code snippets that interact with both themes and plugins related to this website. | |
Author: Thomas Griffin | |
Author URI: http://thomasgriffinmedia.com/ | |
Version: 1.0.0 | |
License: GNU General Public License v2.0 or later | |
License URI: http://www.opensource.org/licenses/gpl-license.php |
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 | |
/* | |
Don't copy the opening PHP tag | |
*/ | |
add_filter( 'woocommerce_cart_item_subtotal', 'wooninja_display_subtotal', 20, 1 ); | |
add_filter( 'woocommerce_cart_subtotal', 'wooninja_display_subtotal', 20, 1 ); | |
add_filter( 'woocommerce_cart_total', 'wooninja_display_subtotal', 20, 1 ); | |
function wooninja_display_subtotal( $subtotal ) { |
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 | |
//* Do NOT include the opening php tag | |
add_filter( 'woocommerce_subscription_lengths', 'wooninja_custom_subscription_duration' ); | |
/** | |
* Filters the subscription lengths available | |
* @param array $ranges the array of ranges (lengths) | |
* @return array $ranges the filtered array of ranges (lengths) | |
*/ |
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 | |
/* | |
Don't copy the opening php tag | |
*/ | |
/* | |
The filter 'wwm_as_admin_script_vars' was added in version 1.6 of Awesome Surveys. | |
This is a sample of it's implementation. If you're comfortable with editing PHP files, use the snippet below. | |
It's usually recommended that these types of snippets be placed in your theme's functions.php file, | |
but I personally don't think that's a good idea since depending on how the theme update works you may |
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 | |
/* | |
Change the 'Persons' label to 'Qty. of Chairs' | |
*/ | |
add_filter( 'booking_form_fields', 'wooninja_booking_form_fields' ); | |
function wooninja_booking_form_fields( $fields ) { | |
$fields['wc_bookings_field_persons']['label'] = 'Qty. of Chairs'; | |
return $fields; | |
} |
OlderNewer