- bootstrap with typeahead
- jquery
This will use bootstrap with typeahead to create an autocomplete search.
<?php | |
// UPDATE: Stefan from Stack Overflow has explained a better way to handle cart item data. | |
// See http://stackoverflow.com/a/32327810/470480 | |
// ---------------------- | |
/* | |
Instructions: |
/** | |
* Each of these samples can be used - note that you should pick one rather than add them all. | |
* | |
* How to use WC notices: https://github.com/woothemes/woocommerce/blob/master/includes/wc-notice-functions.php#L96 | |
* Tutorial: http://www.skyverge.com/blog/edit-woocommerce-templates/ | |
**/ | |
/** | |
* Add a content block after all notices, such as the login and coupon notices. | |
* |
<?php | |
/* | |
Plugin Name: Homepage Settings for BigBang | |
Plugin URI: http://www.inboundnow.com/ | |
Description: Adds additional functionality to the big bang theme. | |
Author: David Wells | |
Author URI: http://www.inboundnow.com | |
*/ | |
// Specify Hooks/Filters |
// First Register the Tab by hooking into the 'woocommerce_product_data_tabs' filter | |
add_filter( 'woocommerce_product_data_tabs', 'add_my_custom_product_data_tab' ); | |
function add_my_custom_product_data_tab( $product_data_tabs ) { | |
$product_data_tabs['my-custom-tab'] = array( | |
'label' => __( 'My Custom Tab', 'my_text_domain' ), | |
'target' => 'my_custom_product_data', | |
); | |
return $product_data_tabs; | |
} |
<?php | |
add_filter( 'woocommerce_email_attachments', 'attach_terms_conditions_pdf_to_email', 10, 3); | |
function attach_terms_conditions_pdf_to_email ( $attachments , $id, $object ) { | |
$your_pdf_path = get_template_directory() . '/terms.pdf'; | |
$attachments[] = $your_pdf_path; | |
return $attachments; | |
} |
// Send Email | |
require_once 'Mandrill.php'; | |
$mandrill = new Mandrill($apikey); | |
$message = new stdClass(); | |
$message->html = "html message"; | |
$message->text = "text body"; | |
$message->subject = "email subject"; | |
$message->from_email = "[email protected]"; |
<?php | |
/* | |
Plugin Name: Dashboard Widget Example Plugin | |
Plugin URI: http://example.com/wordpress-plugins/my-plugin | |
Description: A plugin to create dashboard widgets in WordPress | |
Version: 1.0 | |
Author: Brad Williams | |
Author URI: http://wrox.com | |
License: GPLv2 | |
*/ |
<?php | |
/* | |
Plugin Name: Widget Example Plugin | |
Plugin URI: http://example.com/wordpress-plugins/my-plugin | |
Description: A plugin to create widgets in WordPress | |
Version: 1.0 | |
Author: Brad Williams | |
Author URI: http://wrox.com | |
License: GPLv2 | |
*/ |
/** | |
* This function allows you to retrieve the wp_get_attachment_image_src() | |
* data for any post's featured image on your network. If you are running | |
* a multisite network, you can supply another blog's ID to retrieve a post's | |
* featured image data from another site on your WordPress multisite network. | |
* | |
* Does not take care of icon business (at this time). | |
* | |
* If successful, this function returns an array of the following: | |
* [0] => url |