Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Standard Tab Code from woocommerce-hooks.php
*/
/* Product page tabs */
add_action( 'woocommerce_product_tabs', 'woocommerce_product_description_tab', 10 );
add_action( 'woocommerce_product_tabs', 'woocommerce_product_attributes_tab', 20 );
add_action( 'woocommerce_product_tabs', 'woocommerce_product_reviews_tab', 30 );
add_action( 'woocommerce_product_tab_panels', 'woocommerce_product_description_panel', 10 );
<?php
/**
* Usage:
* Send the url you want to access url encoded in the url paramater, for example (This is with JS):
* /twitter-proxy.php?url='+encodeURIComponent('statuses/user_timeline.json?screen_name=MikeRogers0&count=2')
*/
// The tokens, keys and secrets from the app you created at https://dev.twitter.com/apps
$config = array(
@joffff
joffff / Event code
Last active December 21, 2015 14:29
To be contained within a list element (li)
<img src="http://placehold.it/140x95">
<h3>Title</h3>
<p class="date">Sunday 14th April 2013</p>
<p>Description paragraph</p>
<a href="#" class="btn">View details</a>
@joffff
joffff / Event info
Created August 23, 2013 15:39
Event info for related sidebar
<div class="grid_6 event-info">
<h2>Information and downloads</h2>
<h4>Date:</h4>
<p>01 Jan 2014</p>
<h4>Email:</h4>
<p><a href="#">a@a.com/a></p>
<h4>Tel:</h4>
<a href="#">
<img height="160" src="http://placehold.it/244x160" width="244" />
</a>
<h3>
<a href="#">Block title</a>
</h3>
<p>intro paragraph</p>
<a class="btn" href="#">Read more</a>
<img alt="" height="350" src="http://placehold.it/704x350" width="704" />
<div class="featurebox purple">
<div class="content">
<a href="#">
<h2>Title</h2>
</a>
<p>Intro paragraph</p>
<a class="btn" href="#">Read more</a>
</div>
</div>
@joffff
joffff / Landing page Feature box
Last active December 22, 2015 14:19
Landing page feature box
<h3>Title</h3>
<a href="#">
<img height="185" src="http://placehold.it/350x185" width="350" />
</a>
<a class="btn" href="#">Read more</a>
@joffff
joffff / Button block
Last active December 22, 2015 19:09
Button block.
<div class="grid_6 btn-block orange">
<h4>
<a href="#" title="" class="">Title</a>
</h4>
<p>
<a href="#" title="" class="">
<img src="http://placehold.it/224x110" alt="">
</a>
</p>
</div>
An Anonymous Pen
----------------
This combination of javascript and CSS will redirect tablet users from the mobile version of your Blackbaud NetCommunity website to the desktop version of the site. See notes inline for more information.
Updated: This update allows developers to test the site in a desktop browser by appending "&DeliveryChannelID=3F6B7EA0-73E8-462B-A075-DE89431816A4" (for PID= URLs) and "?DeliveryChannelID=3F6B7EA0-73E8-462B-A075-DE89431816A4" (for friendly URLs) to the current page's URL. Before, doing so triggered the redirect. Happy mobile BBNCing!
I'd be remiss without mentioning that the kind folks in Blackbaud NetCommunity Support do not officially support this approach, and may not be able to help you resolve potential or future issues related to this script.
Special thanks to Daniel Buzzell, J. Schultz and Matthew Cira for pair-programming this solution.
@joffff
joffff / wordpress_disable_plugin.php
Created June 28, 2016 08:31
Disable WordPress plugin on specific page
<?php
add_filter( 'option_active_plugins', 'disable_plugins' );
function disable_plugins($plugins){
$key = array_search( 'wordpress-seo/wp-seo.php' , $plugins ); //Plugin path within /wp-content/plugins/
if ( false !== $key ) unset( $plugins[$key] );
return $plugins;