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: Order Form for WooCommerce SKU | |
Plugin URI: https://gist.github.com/webaware/7a8974a88caf4bcb3eed | |
Description: add product SKU to Order Form for WooCommerce product | |
Author: WebAware | |
Author URI: http://webaware.com.au/ | |
*/ | |
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 | |
/* | |
Plugin Name: Order Form for WooCommerce SKU | |
Plugin URI: https://gist.github.com/webaware/a75e83ede1607536642b | |
Description: add product SKU column to Order Form for WooCommerce product | |
Author: WebAware | |
Author URI: http://webaware.com.au/ | |
*/ | |
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 | |
/* | |
Plugin Name: Flxmap Igore Bad Address | |
Plugin URI: https://gist.github.com/webaware/3ffe9c2bb9aeb0517714 | |
Description: ignore maps with invalid addresses | |
Version: 1 | |
Author: WebAware | |
Author URI: http://webaware.com.au/ | |
*/ |
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 | |
/** | |
* Simple "Download All" button for gallery | |
* @link https://gist.github.com/webaware/af746e82aaadc24cab7d | |
* @link https://wordpress.org/plugins/nextgen-download-gallery/ | |
*/ | |
if (!defined ('ABSPATH')) { | |
die ('No direct access allowed'); | |
} |
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
jQuery(function($) { | |
// Quantity buttons | |
$( 'div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)' ).addClass( 'buttons_added' ).append( '<input type="button" value="+" class="plus" />' ).prepend( '<input type="button" value="-" class="minus" />' ); | |
$( document ).on( 'click', '.plus, .minus', function() { | |
// Get values | |
var $qty = $( this ).closest( '.quantity' ).find( '.qty' ), |
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: Order Form for WooCommerce extend form | |
Plugin URI: https://gist.github.com/webaware/1fe598e60f9ad9a912ee | |
Description: example form extras using hooks | |
Author: WebAware | |
Author URI: http://webaware.com.au/ | |
*/ | |
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
// example of JavaScript for somewhere on the page | |
<script> | |
function myReloadCart() { | |
form_values = "ajax=true&my_plugin_no_force_load=1" | |
jQuery.post( 'index.php?wpsc_ajax_action=get_cart', form_values, function(returned_data) { | |
eval(returned_data); | |
}); | |
} | |
</script> |
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 | |
/* | |
In reply to this request: | |
http://wordpress.org/support/topic/plugin-wp-flexible-map-updating-the-map-from-custom-field-data | |
add a simple [map] shortcode to WordPress that allows maps to be | |
created from custom fields: | |
"map zoom" = the zoom level (will default to 12 if not set) |
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 filterSitemapOptions($opts) { | |
global $wpdb; | |
// tell it to exclude any pages that are just page-links-to links to PDF files | |
$exclude = $wpdb->get_col("select post_id from $wpdb->postmeta where meta_key = '_links_to' and meta_value like '%.pdf'"); | |
if (!empty($exclude)) { | |
$opts['sm_b_exclude'] = array_merge($opts['sm_b_exclude'], $exclude); | |
} |
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 | |
/** | |
* filter the eWAY invoice description for a Gravity Form post | |
* @param string $desc the description before filtering | |
* @param array $form the Gravity Form object | |
* @return string | |
*/ | |
function my_gfeway_invoice_desc($desc, $form) { | |
// set by form ID | |
switch ($form['id']) { |