JoeHana
9/30/2013 - 3:49 PM

Custom Buttons for wpCasa

Custom Buttons for wpCasa

<?php

/**
 * Set button classes
 *
 * @since 1.1
 */
 
add_filter( 'wpsight_button_class_search', 'custom_button_class' );
add_filter( 'wpsight_button_class_agent', 'custom_button_class' );
add_filter( 'wpsight_button_class_contact', 'custom_button_class' );
add_filter( 'wpsight_button_class_calltoaction', 'custom_button_class' );
add_filter( 'wpsight_button_class_comment', 'custom_button_class' );

function penthouse_button_class( $class ) {

	$class = str_replace( 'btn-primary', '', $class );
	
	return $class . ' btn-custom';

}

/**
 * Add Gravityforms button class
 */
 
remove_filter( 'gform_submit_button', 'wpsight_gform_submit_button', 10, 2 );
add_filter( 'gform_submit_button', 'penthouse_gform_submit_button', 10, 2 );

function penthouse_gform_submit_button( $button ) {

	return str_replace( 'class="', 'class="btn btn-custom ', $button );

}

/**
 * Create more button
 *
 * @since 1.0
 */

add_filter( 'wpsight_excerpt_more', 'penthouse_excerpt_more' );

function penthouse_excerpt_more() {
	return '<div class="moretag-wrap"><a class="moretag btn btn-custom" href="'. get_permalink( get_the_ID() ) . '">' . apply_filters( 'wpsight_more_text', __( 'Read more', 'wpsight' ) ) . '</a></div>';
}