/**
  * Outputs the widget based on the arguments input through the widget controls.
  *
  * @since 1.0
  */
 function widget($sidebar, $instance)
 {
     extract($sidebar);
     /* Set the $args for wp_get_archives() to the $instance array. */
     $args = $instance;
     /* Overwrite the $echo argument and set it to false. */
     $args['echo'] = false;
     /* Output the theme's $before_widget wrapper. */
     echo $before_widget;
     /* If a title was input by the user, display it. */
     if (!empty($instance['title'])) {
         echo $before_title . apply_filters('widget_title', $instance['title'], $instance, $this->id_base) . $after_title;
     }
     $o = apply_filters('bon_toolkit_contact_form_widget_filter', '', $args['email_address'], $args['color']);
     if ($o != '') {
         echo $o;
     } else {
         $o = bon_toolkit_get_contact_form($args['email_address'], $args['color']);
         echo $o;
     }
     /* Close the theme's widget wrapper. */
     echo $after_widget;
 }
Пример #2
0
 /**
  * Rendering Contact Form Element.
  *
  * @since  1.0.0
  * @param string $value
  * @access public
  * @return string
  */
 public function render_contact_form($value)
 {
     $o = apply_filters('bon_toolkit_builder_render_contact_form_output', '', $value);
     if ($o != '') {
         return $o;
     }
     extract($value);
     if (!isset($color)) {
         $color = '';
     }
     $o = bon_toolkit_get_contact_form($email, $color);
     return $o;
 }