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
/** | |
* Custom WooCommerce registration process | |
*/ | |
function iweb_woocommerce_process_registration() { | |
// Duplicate of woocommerce_process_registration() with our modifications | |
} | |
/** | |
* Replace the WooCommerce registration function | |
* |
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
/** | |
* Register additional oEmbed providers | |
* | |
* @author Syed Balkhi | |
* @link http://goo.gl/tccJh | |
*/ | |
function iweb_register_additional_oembed_providers() { | |
wp_oembed_add_provider( 'http://www.mixcloud.com/*', 'http://www.mixcloud.com/oembed' ); | |
} | |
add_action( 'init', 'iweb_register_additional_oembed_providers' ); |
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
/** | |
* Return logout URL and redirect to homepage | |
* | |
* Allows you to place a logout link within the WordPress editor. In visual | |
* view set the link to [logout-url], in text view, use | |
* <a href="[logout-url]">logout</a>. | |
* | |
* @author Phil Wylie | |
* @link http://goo.gl/025f5 | |
*/ |
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 additional image sizes to the WordPress media upload/insert interface | |
* | |
* @author Daniel Roizer | |
* @link http://goo.gl/0tKD0 | |
*/ | |
function iweb_additional_image_sizes( $sizes ) { | |
$additional_image_sizes = array( | |
'banner' => 'Banner' |
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 | |
/** | |
* Get the excerpt of a specific post ID or object | |
* | |
* @author Pippin Williamson | |
* @link http://goo.gl/lhtZD | |
* @param object/int $post The ID or object of the post to get the excerpt of | |
* @param int $length The length of the excerpt in words | |
* @param string $tags The allowed HTML tags. These will not be stripped out | |
* @param string $extra Text to append to the end of the excerpt |
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 | |
/** | |
* Get a list of downloads | |
* | |
* Return an array of downloads suitable for CMB's select field. | |
* | |
* Example CMB select field usage: | |
* | |
* array( | |
* 'name' => 'Download', |
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 $attachment_id = get_post_meta( get_the_ID(), '_cmb_image_id', true ); ?> | |
<?php if ( ! empty( $attachment_id ) ) : ?> | |
<?php echo wp_get_attachment_image( $attachment_id, 'thumbnail' ); ?> | |
<?php endif; ?> |
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 | |
/** | |
* Initialise CMB | |
* | |
* @author Phil Wylie | |
* @link http://goo.gl/MhJPe | |
*/ | |
function pw_initialise_cmb() { | |
if ( ! class_exists( 'cmb_Meta_Box' ) ) { | |
require 'lib/init.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
$('a#show-map').click(function(e) { | |
e.preventDefault(); | |
$('#map-container').show(); | |
google.maps.event.trigger(map, 'resize'); | |
map.setCenter(latLng); | |
}); |