* @license http://www.gnu.org/licenses/gpl-2.0.html
* @link https://github.com/maddisondesigns
*/
class StoreCommerce_Sortable_Field_Custom_Control extends WP_Customize_Control
{
/**
* The type of control being rendered
*/
public $type = 'sortable_field';
/**
* Constructor
*/
public function __construct($manager, $id, $args = array(), $options = array())
{
parent::__construct($manager, $id, $args);
}
/**
* Enqueue our scripts and styles
*/
public function enqueue()
{
wp_enqueue_script('storecommerce-custom-controls-js', trailingslashit(get_template_directory_uri()) . 'inc/customizer/js/customizer.js', array('jquery', 'jquery-ui-core'), '1.0', true);
wp_enqueue_style('storecommerce-custom-controls-css', trailingslashit(get_template_directory_uri()) . 'inc/customizer/css/customizer.css', array(), '1.0', 'all');
}
/**
* Render the control in the customizer
*/
public function render_content()
{
if (empty($this->choices)) {
return;
}
?>
* @license http://www.gnu.org/licenses/gpl-2.0.html
* @link https://github.com/maddisondesigns
*/
class StoreCommerce_Text_Radio_Button_Custom_Control extends WP_Customize_Control
{
/**
* The type of control being rendered
*/
public $type = 'text_radio_button';
/**
* Enqueue our scripts and styles
*/
public function enqueue()
{
wp_enqueue_style('storecommerce-custom-controls-css', trailingslashit(get_template_directory_uri()) . 'inc/customizer/css/customizer.css', array(), '1.0', 'all');
}
/**
* Render the control in the customizer
*/
public function render_content()
{
?>
* @license http://www.gnu.org/licenses/gpl-2.0.html
* @link https://github.com/maddisondesigns
*/
class StoreCommerce_Image_Radio_Button_Custom_Control extends WP_Customize_Control
{
/**
* The type of control being rendered
*/
public $type = 'image_radio_button';
/**
* Enqueue our scripts and styles
*/
public function enqueue()
{
wp_enqueue_style('storecommerce-custom-controls-css', trailingslashit(get_template_directory_uri()) . 'inc/customizer/css/customizer.css', array(), '1.0', 'all');
}
/**
* Render the control in the customizer
*/
public function render_content()
{
?>
* @license http://www.gnu.org/licenses/gpl-2.0.html
* @link https://github.com/maddisondesigns
*/
class StoreCommerce_Slider_Custom_Control extends WP_Customize_Control
{
/**
* The type of control being rendered
*/
public $type = 'slider_control';
/**
* Enqueue our scripts and styles
*/
public function enqueue()
{
wp_enqueue_script('storecommerce-custom-controls-js', trailingslashit(get_template_directory_uri()) . 'inc/customizer/js/customizer.js', array('jquery', 'jquery-ui-core'), '1.0', true);
wp_enqueue_style('storecommerce-custom-controls-css', trailingslashit(get_template_directory_uri()) . 'inc/customizer/css/customizer.css', array(), '1.0', 'all');
}
/**
* Render the control in the customizer
*/
public function render_content()
{
?>
label); ?>link(); ?> />
* @license http://www.gnu.org/licenses/gpl-2.0.html
* @link https://github.com/maddisondesigns
*/
class StoreCommerce_Toggle_Switch_Custom_control extends WP_Customize_Control
{
/**
* The type of control being rendered
*/
public $type = 'toogle_switch';
/**
* Enqueue our scripts and styles
*/
public function enqueue()
{
wp_enqueue_style('storecommerce-custom-controls-css', trailingslashit(get_template_directory_uri()) . 'inc/customizer/css/customizer.css', array(), '1.0', 'all');
}
/**
* Render the control in the customizer
*/
public function render_content()
{
?>
link();
checked($this->value()); ?>>
label); ?>
description)) { ?>
description); ?>
* @license http://www.gnu.org/licenses/gpl-2.0.html
* @link https://github.com/maddisondesigns
*/
class StoreCommerce_Sortable_Repeater_Custom_Control extends WP_Customize_Control
{
/**
* The type of control being rendered
*/
public $type = 'sortable_repeater';
/**
* Button labels
*/
public $button_labels = array();
/**
* Constructor
*/
public function __construct($manager, $id, $args = array(), $options = array())
{
parent::__construct($manager, $id, $args);
// Merge the passed button labels with our default labels
$this->button_labels = wp_parse_args($this->button_labels,
array(
'add' => __('Add', 'storecommerce'),
)
);
}
/**
* Enqueue our scripts and styles
*/
public function enqueue()
{
wp_enqueue_script('storecommerce-custom-controls-js', trailingslashit(get_template_directory_uri()) . 'inc/customizer/js/customizer.js', array('jquery', 'jquery-ui-core'), '1.0', true);
wp_enqueue_style('storecommerce-custom-controls-css', trailingslashit(get_template_directory_uri()) . 'inc/customizer/css/customizer.css', array(), '1.0', 'all');
}
/**
* Render the control in the customizer
*/
public function render_content()
{
?>