Beispiel #1
0
    public function form($instance)
    {
        $instance = wp_parse_args($instance, $this->defaults);
        ?>
<p>
	<?php 
        wpsc_form_label(__('Title:', 'wpsc'), $this->get_field_id('title'));
        ?>
<br />
	<?php 
        wpsc_form_input($this->get_field_name('title'), $instance['title'], array('id' => $this->get_field_id('title'), 'class' => 'widefat'));
        ?>
</p>
<?php 
    }
 protected function column_quantity($item, $key)
 {
     wpsc_form_input("quantity[{$key}]", $item->quantity, array('class' => 'wpsc-cart-quantity-input', 'id' => "wpsc-cart-quantity-input-{$key}"));
 }
Beispiel #3
0
</p>

<p>
	<?php 
wpsc_form_checkbox($this->get_field_name('show_image'), 1, _x('Show Thumbnails', 'product category widget', 'wpsc'), !empty($instance['show_image']));
?>
</p>
<ul style="margin-left:18px;">
	<li>
		<?php 
printf(_x('%1$s %2$s %3$s', 'product category widget width / height option', 'wpsc'), wpsc_form_label(_x('Width:', 'product category widget', 'wpsc'), $this->get_field_id('width'), array(), false), wpsc_form_input($this->get_field_name('width'), $width, array('id' => $this->get_field_id('width'), 'size' => 3), false), __('px', 'wpsc'));
?>
	</li>
	<li>
		<?php 
printf(_x('%1$s %2$s %3$s', 'product category widget width / height option', 'wpsc'), wpsc_form_label(_x('Height:', 'product category widget', 'wpsc'), $this->get_field_id('height'), array(), false), wpsc_form_input($this->get_field_name('height'), $height, array('id' => $this->get_field_id('height'), 'size' => 3), false), __('px', 'wpsc'));
?>
	</li>
</ul>

<p>
	<?php 
echo _x('Select Categories:', 'product category widget', 'wpsc');
?>
<br />
	<small><?php 
esc_html_e('Leave all unchecked if you want to display all', 'wpsc');
?>
</small><br>
</p>
<ul style="margin-left: 18px;">
Beispiel #4
0
 public function filter_output_textfield($output, $field_array)
 {
     extract($field_array);
     $description_html = apply_filters($name . '_setting_description', $description, $field_array);
     if (!isset($class)) {
         $class = 'regular-text wpsc-textfield';
     }
     $output = '';
     if (!empty($prepend)) {
         $output .= $prepend;
     }
     $output .= wpsc_form_input($name, $value, array('id' => $id, 'class' => $class), false);
     if (!empty($append)) {
         $output .= $append;
     }
     if ($description) {
         $output .= '<p class="howto">' . $description_html . '</p>';
     }
     return $output;
 }
Beispiel #5
0
</p>

<p>
	<?php 
wpsc_form_checkbox($this->get_field_name('show_you_save'), 1, _x('Show "You save"', 'on sale widget', 'wp-e-commerce'), $instance['show_you_save']);
?>
</p>

<p>
	<?php 
wpsc_form_checkbox($this->get_field_name('show_description'), 1, _x('Show Description', 'on sale widget', 'wp-e-commerce'), $instance['show_description']);
?>
</p>

<p>
	<?php 
wpsc_form_checkbox($this->get_field_name('show_image'), 1, _x('Show Thumbnails', 'on sale widget', 'wp-e-commerce'), !empty($instance['show_image']));
?>
</p>
<ul style="margin-left:18px;">
	<li>
		<?php 
printf(_x('%1$s %2$s %3$s', 'on sale widget width / height option', 'wp-e-commerce'), wpsc_form_label(_x('Width:', 'on sale widget', 'wp-e-commerce'), $this->get_field_id('width'), array(), false), wpsc_form_input($this->get_field_name('width'), $instance['width'], array('id' => $this->get_field_id('width'), 'size' => 3), false), __('px', 'wp-e-commerce'));
?>
	</li>
	<li>
		<?php 
printf(_x('%1$s %2$s %3$s', 'on sale widget width / height option', 'wp-e-commerce'), wpsc_form_label(_x('Height:', 'on sale widget', 'wp-e-commerce'), $this->get_field_id('height'), array(), false), wpsc_form_input($this->get_field_name('height'), $instance['width'], array('id' => $this->get_field_id('height'), 'size' => 3), false), __('px', 'wp-e-commerce'));
?>
	</li>
</ul>
Beispiel #6
0
function _wpsc_filter_control_textfield($output, $field, $args)
{
    extract($field);
    $output .= wpsc_form_input($name, $value, array('id' => $id . '-control'), false);
    return $output;
}
    public function form($instance)
    {
        $instance = wp_parse_args($instance, $this->defaults);
        $terms = get_terms('wpsc_product_category', array('hide_empty' => false));
        $options = array();
        foreach ($terms as $term) {
            $options[$term->term_id] = $term->name;
        }
        ?>
<p>
	<?php 
        wpsc_form_label(_x('Title', 'widget title', 'wpsc'), $this->get_field_id('title'));
        ?>
<br>
	<?php 
        wpsc_form_input($this->get_field_name('title'), $instance['title'], array('id' => $this->get_field_id('title'), 'class' => 'widefat'));
        ?>
</p>

<p>
	<?php 
        wpsc_form_label(__('Categories to display', 'wpsc'), $this->get_field_id('categories'));
        ?>
<br>
	<span class="wpsc-cat-drill-down-all-actions wpsc-settings-all-none">
		<?php 
        printf(_x('Select: %1$s %2$s', 'select all / none', 'wpsc'), '<a href="#" data-for="' . esc_attr($this->get_field_id('categories')) . '" class="wpsc-multi-select-all">' . _x('All', 'select all', 'wpsc') . '</a>', '<a href="#" data-for="' . esc_attr($this->get_field_id('categories')) . '" class="wpsc-multi-select-none">' . __('None', 'wpsc') . '</a>');
        ?>
	</span><br>
	<?php 
        wpsc_form_select($this->get_field_name('categories') . '[]', $instance['categories'], $options, array('id' => $this->get_field_id('categories'), 'multiple' => 'multiple', 'size' => 5, 'class' => 'wpsc-multi-select widefat', 'data-placeholder' => __('Select categories', 'wpsc')));
        ?>
</p>
<?php 
    }