__( 'The header for your friends page.', 'friends' ), ) ); } /** * Render the widget. * * @param array $args Sidebar arguments. * @param array $instance Widget instance settings. */ public function widget( $args, $instance ) { $instance = wp_parse_args( $instance, $this->defaults() ); $friends = Friends::get_instance(); $title = apply_filters( 'friends_header_widget_title', $instance['title'] ); $title = apply_filters( 'wptexturize', $title ); $title = apply_filters( 'convert_chars', $title ); echo $args['before_widget']; if ( ! empty( $title ) ) { echo $args['before_title'] . ' ' . $title . $args['after_title']; } if ( $friends->frontend->author ) { ?>

your friends page.', 'friends' ), // translators: 1: a friend's display name, 2: a URL. '' . esc_html( sprintf( __( '%1$s\'s external site at %2$s', 'friends' ), $friends->frontend->author->display_name, preg_replace( '#https?://#', '', trim( $friends->frontend->author->user_url, '/' ) ) ) ) . '', '"' . esc_attr( home_url( '/friends/' ) ) . '"' ), array( 'a' => array( 'href' => array(), 'class' => array(), 'data-token' => array(), ), ) ); ?>

defaults(), $instance ); ?>

__( 'Friends', 'friends' ), 'show_post_formats' => true, ); } /** * Register this widget. */ public static function register() { register_widget( __CLASS__ ); } }