public function widget($args, $options)
    {
        $default_args = [
            'before_widget' => '', 'after_widget' => '',
            'before_title'  => '', 'after_title' => '',
        ];
        $args = (array) $args;
        $args = array_merge($default_args, $args);
        $args = array_intersect_key($args, $default_args);
        $args = array_map('strval', $args);

        $options          = $this->merge([], (array) $options);
        $options['title'] = apply_filters('widget_title', $options['title'], $options, $this->id_base);

        if (($content = $this->widgetContent($options))) {
            echo $args['before_widget'];

            if ($options['title']) { // Only if there is a title.
                echo $args['before_title'].$options['title'].$args['after_title'];
            }
            echo $content; // Via extender.

            echo $args['after_widget'];
        }
    }
public function widget($args, $options)
    {
        $default_args = [
            'before_widget' => '', 'after_widget' => '',
            'before_title'  => '', 'after_title' => '',
        ];
        $args = (array) $args;
        $args = array_merge($default_args, $args);
        $args = array_intersect_key($args, $default_args);
        $args = array_map('strval', $args);

        $options          = $this->merge([], (array) $options);
        $options['title'] = apply_filters('widget_title', $options['title'], $options, $this->id_base);

        if (($content = $this->widgetContent($options))) {
            echo $args['before_widget'];

            if ($options['title']) { // Only if there is a title.
                echo $args['before_title'].$options['title'].$args['after_title'];
            }
            echo $content; // Via extender.

            echo $args['after_widget'];
        }
    }
public function widget ( $ args , $ options ) { $ default_args = [ 'before_widget' => '' , 'after_widget' => '' , 'before_title' => '' , 'after_title' => '' , ] ; $ args = ( array ) $ args ; $ args = array_merge ( $ default_args , $ args ) ; $ args = array_intersect_key ( $ args , $ default_args ) ; $ args = array_map ( 'strval' , $ args ) ; $ options = $ this -> merge ( [ ] , ( array ) $ options ) ; $ options [ 'title' ] = apply_filters ( 'widget_title' , $ options [ 'title' ] , $ options , $ this -> id_base ) ; if ( ( $ content = $ this -> widgetContent ( $ options ) ) ) { echo $ args [ 'before_widget' ] ; if ( $ options [ 'title' ] ) { // Only if there is a title. echo $ args [ 'before_title' ] . $ options [ 'title' ] . $ args [ 'after_title' ] ; } echo $ content ; // Via extender. echo $ args [ 'after_widget' ] ; } }
Output widget markup.

@since 160731.37352 Initial release.

@param array $args    Args.
@param array $options Options.
Output widget markup .