View gist:796249
function new_latest_deal_redirect( $redirect = null ) {
$latest_deal_qv = get_query_var( 'todays-deal' );
$latest_deal = ( $latest_deal_qv != '' ) ? $latest_deal_qv : $_GET['todays-deal'] ;
// redirect from homepage if cookie is set or we are using the todays-deal link
if( 1 == $latest_deal || ( is_home() && isset( $_COOKIE[ 'your-selected-location' ] ) ) ) {
$redirect = get_gbs_latest_deal_link();
} elseif ( is_home() && is_user_logged_in() ) { // redirect for logged in users
$redirect = get_gbs_deals_link();
if ( $redirect != null ) { // if we have something to redirect to let's do it.
View Example filter for GBS Messages
add_filter('additional_messages', 'translate_mail_errors', 1);
function translate_mail_errors($message)
$message = str_ireplace( 'Purchase Successful. Now we wait for the deal to end.', 'CHANGE TO WHATEVER', $message );
return $message;
View shaneandpeter spent time url
<td class="spent-time"><%= @issue.spent_hours > 0 ? (link_to l_hours(@issue.spent_hours), {:controller => 'timelog', :action => 'details', :project_id => @project, :issue_id => @issue}) : "-" %></td>
View Content
<img class="size-medium wp-image-2927 alignleft" title="Bloomington-City-Hall" src="" alt="Bloomington City Hall" width="307" height="218" />
<div><strong>A new tavern will be coming to downtown Bloomington. But council leaders say this comes with much needed action, instead of just conversation. <!--more-->The city council approved a liquor license for an establishment called Eleven with a close 5-to-4 vote including the mayor. Alderwoman Karen Schmidt says the way licenses are distributed is inconsistent.</strong></div>
<strong>"I'm very concerned we have this conversation over and over again. We just need to get on the same page," said Schmidt.</strong>
<strong>Tyler Holloway of the Downtown Bar Owners Association says he supports the business plan, but questioned the safety of adding another bar to the area.</strong>
<strong>"I know of 12 bars right now running dollar specials. When you have cheap drinks like that, you have a lot of intoxic
View Image Inserted First
<div class="mceTemp"><dl id="attachment_798" class="wp-caption alignleft" style="width: 310px;"> <dt class="wp-caption-dt"><img class="size-medium wp-image-798" title="elizabeth edwards" src="" alt="elizabeth edwards" width="300" height="200" /></dt> <dd class="wp-caption-dd">Getty Images</dd> </dl>Her private life was out for the whole world to see, hear, and read about. Through Elizabeth Edwards ordeal, she held on to the ideals that faith, family, and marriage are based upon.
<div class="mceTemp">"Today we have lost the comfort of Elizabeth's presence but, she remains the heart of this family, the family said in a statement. "We love her and will never know anyone more inspiring or full of life. On behalf of Elizabeth we want to express our gratitude to the thousands of kindred spirits who moved and inspired her along the way. Your support and prayers touched our entire family."</div>
<div cla
View Color Registrations
/*********** General ***********/
$this->registerColorChooser( array(
'id' => 'body_color',
'selector' => 'body, .body_color',
'name' => __('Body Text Color'),
'foreground' => true,
'default' => '000000',
'group' => __('General'),
View GBS Messages filter
// Remove the old filters
global $gbac;
remove_filter('gbs_message_share_max', array( $gbac, 'gbs_message_share_max_new' ) );
remove_filter('gbs_message_share', array( $gbac, 'gbs_message_share_new' ) );
// Create new filters
add_filter('gbs_message_share_max', 'gbs_message_share_max_custom' );
add_filter('gbs_message_share', 'gbs_message_share_custom' );
// Message when a max is used
View Override GBS subscription
function group_buying_subscription_new()
if( isset( $_POST['set-group-buying-subscription'] ) && !isset( $_POST['email_address'] ) ) {
setcookie( 'your-selected-location', $_POST['deal_location'], time( ) + 24 * 60 * 60 * 30, '/' );
wp_redirect( site_url() );
elseif( isset( $_POST['set-group-buying-subscription'] ) ) {
View main api for theme styles.
/*********** General ***********/
$this->registerColorChooser( array(
'id' => 'body_color',
'selector' => 'body, .body_color',
'name' => __('Body Text Color'),
'foreground' => true,
'default' => '000000',
View triton array
'inner_bg' => array(
'content_bg' => array(