__('Running Text from left to right', 'apt-news'), 'help' => 'http://seedthemes.com/hello-world-widget-docs', 'panels_groups' => array('apt_widgets'), ), //The $control_options array, which is passed through to WP_Widget array( ), //The $form_options array, which describes the form fields used to configure SiteOrigin widgets. We'll explain these in more detail later. array( 'running_text' => array( 'type' => 'text', 'label' => __('Running Text goes here.', 'apt-news'), 'default' => 'some running text' ), 'text_color' => array( 'type' => 'color', 'label' => __('Text color for the running text', 'apt-news'), 'default' => '#ffc0cb' ), 'font_size' => array( 'type' => 'number', 'label' => __('Font size for the running text in \'em\' unit(default is 1.6)', 'apt-news'), 'default' => '1.6' ), 'background_color' => array( 'type' => 'color', 'label' => __('Background color for the running text', 'apt-news'), 'default' => '#000' ), $this->get_media_query_id() => $this->get_media_query_options(), ), //The $base_folder path string. plugin_dir_path(__FILE__) ); } /* Get template file */ function get_template_name($instance) { return 'template'; } /* Get less file */ function get_style_name($instance) { return 'style'; } /* set less variable */ function get_less_variables($instance){ return array( 'background_color' => $instance['background_color'], 'text_color' => $instance['text_color'], 'font_size' => $instance['font_size'] . 'em', ); } } // siteorigin_widget_register($desired_widget_id, $path_to_widget, $class_used_to_create_widget) siteorigin_widget_register('apt_running_text', __FILE__, 'APT_Running_Text');