public function __construct() { $classname = __CLASS__; $description = esc_html__('Displays rotating testimonials or statically.', 'testimonials-widget'); $id_base = self::ID; $title = esc_html__('Testimonials Slider', 'testimonials-widget'); parent::__construct($classname, $description, $id_base, $title); }
public function __construct($classname = null, $description = null, $id_base = null, $title = null) { $classname = 'Testimonials_Widget_Widget'; $description = esc_html__('Display testimonials with multiple selection and display options', 'testimonials-widget'); $id_base = self::ID; $title = esc_html__('Testimonials', 'testimonials-widget'); parent::__construct($classname, $description, $id_base, $title); }
public static function form_parts($instance = null, $number = null) { $form_parts = parent::form_parts($instance, $number); $form_parts['title']['std'] = self::$title; $form_parts = apply_filters('wps_widget_options', $form_parts); foreach ($form_parts as $id => $parts) { $form_parts[$id] = wp_parse_args($parts, self::$default); } return $form_parts; }
public static function form_parts($instance = null, $number = null) { $form_parts = parent::form_parts($instance, $number); $form_parts['title']['std'] = self::$title; $form_parts['dropdown'] = array('title' => esc_html__('Display as dropdown', 'testimonials-widget'), 'type' => 'checkbox', 'validate' => 'is_true', 'std' => 0); $form_parts['count'] = array('title' => esc_html__('Show post counts', 'testimonials-widget'), 'type' => 'checkbox', 'validate' => 'is_true', 'std' => 0); foreach ($form_parts as $id => $parts) { $form_parts[$id] = wp_parse_args($parts, self::$default); } $form_parts = apply_filters('tw_archives_widget_options', $form_parts); return $form_parts; }
/** * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public static function form_parts($instance = null, $number = null) { $form_parts = parent::form_parts($instance, $number); $form_parts['title']['std'] = self::$title; $form_parts['number'] = array('title' => esc_html__('Number of testimonials to show', 'testimonials-widget'), 'type' => 'text', 'validate' => 'intval', 'std' => 5); $form_parts['show_date'] = array('title' => esc_html__('Display testimonial date?', 'testimonials-widget'), 'type' => 'checkbox', 'validate' => 'is_true', 'std' => 0); foreach ($form_parts as $id => $parts) { $form_parts[$id] = wp_parse_args($parts, self::$default); } $form_parts = apply_filters('tw_recent_testimonials_widget_options', $form_parts); return $form_parts; }
/** * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public static function form_parts($instance = null, $number = null) { $form_parts = parent::form_parts($instance, $number); $form_parts['title']['std'] = self::$title; $use_cpt_taxonomy = tw_get_option('use_cpt_taxonomy', false); if (!$use_cpt_taxonomy) { $options = array('category' => esc_html__('Category', 'testimonials-widget'), 'post_tag' => esc_html__('Tags', 'testimonials-widget')); $std = 'post_tag'; } else { $options = array(Axl_Testimonials_Widget::$cpt_category => esc_html__('Category', 'testimonials-widget'), Axl_Testimonials_Widget::$cpt_tags => esc_html__('Tags', 'testimonials-widget')); $std = Axl_Testimonials_Widget::$cpt_tags; } $form_parts['taxonomy'] = array('title' => esc_html__('Taxonomy', 'testimonials-widget'), 'type' => 'select', 'choices' => $options, 'std' => $std); foreach ($form_parts as $id => $parts) { $form_parts[$id] = wp_parse_args($parts, self::$default); } $form_parts = apply_filters('tw_tag_cloud_widget_options', $form_parts); return $form_parts; }