get_the_author_meta( 'user_url' ), 'facebook' => get_the_author_meta( 'facebook' ), 'twitter' => get_the_author_meta( 'twitter' ), 'googleplus' => get_the_author_meta( 'googleplus' ), 'linkedin' => get_the_author_meta( 'linkedin' ), 'flickr' => get_the_author_meta( 'flickr' ), 'tumblr' => get_the_author_meta( 'tumblr' ), 'vimeo' => get_the_author_meta( 'vimeo' ), 'youtube' => get_the_author_meta( 'youtube' ), 'instagram' => get_the_author_meta( 'instagram' ), 'pinterest' => get_the_author_meta( 'pinterest' ) ) ); // Set the styes. $styles = sprintf( 'background: %1$s; border-top: %2$spx %3$s %4$s; border-bottom: %2$spx %3$s %4$s; color: %5$s', $settings['background_color'], $settings['border_size'], $settings['border_style'], $settings['border_color'], $settings['text_color'] ); $html = '
'; $html .= '

'; $html .= '
' . get_avatar( get_the_author_meta('ID'), $gravatar ) . '
'; foreach ( $social as $key => $value ) { if ( ! empty( $value ) ) { $html .= ''; } } $html .= '

' . apply_filters( 'authorbiobox_author_description', get_the_author_meta( 'description' ) ) . '

'; $html .= '
'; return $html; } /** * Insert the box in the content. * * @param string $content WP the content. * * @return string WP the content with Author Bio Box. */ public function display( $content ) { // Get the settings. $settings = get_option( 'authorbiobox_settings' ); if ( $this->is_display( $settings ) ) { return $content . self::view( $settings ); } return $content; } } new Author_Bio_Box_Frontend();