Ejemplo n.º 1
0
function _wpsc_filter_control_button($output, $field, $args)
{
    $class = $args['id'] . '-button wpsc-button';
    if ($field['primary']) {
        $class .= ' wpsc-button-primary';
    }
    if (isset($field['button_class'])) {
        $class .= ' ' . $field['button_class'];
    }
    if (!isset($field['icon'])) {
        $field['icon'] = '';
    }
    $output .= wpsc_form_button($field['name'], $field['title'], array('class' => $class, 'icon' => $field['icon']), false);
    return $output;
}
Ejemplo n.º 2
0
/**
 * Return the HTML for "Begin Checkout" button
 *
 * @since  0.1
 *
 * @uses   apply_filters() Applies 'wpsc_begin_checkout_button_title'
 * @uses   apply_filters() Applies 'wpsc_begin_checkout_button_icon'
 * @uses   apply_filters() Applies 'wpsc_begin_checkout_button_args'
 * @uses   apply_filters() Applies 'wpsc_begin_checkout_button'
 *
 * @return string HTML Output
 */
function wpsc_get_begin_checkout_button()
{
    $title = apply_filters('wpsc_begin_checkout_button_title', __('Begin Checkout', 'wpsc'));
    $icon = apply_filters('wpsc_begin_checkout_button_icon', array('white', 'ok-sign'));
    $args = apply_filters('wpsc_begin_checkout_button_args', array('class' => 'wpsc-button wpsc-button-primary', 'icon' => $icon));
    $button = apply_filters('wpsc_begin_checkout_button', wpsc_form_button('', $title, $args, false));
    return $button;
}