esc_html__( 'Displays author short info.', 'blogbyte' ) ) ); $this->social_networks = apply_filters( 'blogbyte_author_widget_social_networks', array( 'facebook', 'twitter', 'linkedin', 'instagram', 'pinterest', 'youtube', 'tiktok', 'twitch', 'vk', 'whatsapp', 'amazon', 'codepen', 'dropbox', 'flickr', 'vimeo', 'spotify', 'github', 'reddit', 'skype', 'soundcloud', ) ); add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_assets' ) ); } /** * Outputs the content for the current widget instance. * * @since 1.0.0 * * @param array $args Display arguments. * @param array $instance Saved values from database. */ public function widget( $args, $instance ) { echo $args['before_widget']; if ( $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base ) ) { echo $args['before_title'] . $title . $args['after_title']; } $style = isset( $instance['style'] ) ? $instance['style'] : 'style_1'; $image_border_radius = isset( $instance['image_border_radius'] ) ? (bool) $instance['image_border_radius'] : false; $image_size = 'blogbyte-medium-img'; if ( $image_border_radius ) { $image_size = 'blogbyte-square-img'; $style .= ' rd-visible'; } $social_link_class = ' reset-list-style blogbyte-social-icons '; $social_link_style = isset( $instance['social_links_style'] ) ? $instance['social_links_style'] : 'style_1'; $social_link_style .= blogbyte_get_social_icons_class( $social_link_style ); $social_link_color = isset( $instance['social_links_color'] ) ? $instance['social_links_color'] : 'theme_color'; $social_link_class .= $social_link_style . ' ' . $social_link_color; $wrapper_class = $style; $inverted_block_color = isset( $instance['inverted_block_color'] ) ? (bool) $instance['inverted_block_color'] : false; // Inverted Color. if ( $inverted_block_color ) { $wrapper_class .= ' saga-block-inverted-color'; } do_action( 'blogbyte_before_author_info' ); ?>
'img-responsive' ) ); ?>

social_networks; if ( ! empty( $social_networks ) && is_array( $social_networks ) ) { ob_start(); foreach ( $social_networks as $network ) { if ( ! empty( $instance[ $network ] ) ) { $svg = Blogbyte_SVG_Icons::get_social_link_svg( $instance[ $network ] ); if ( $svg ) { ?>
  • >

    >

    social_networks; if ( ! empty( $social_networks ) && is_array( $social_networks ) ) { foreach ( $social_networks as $network ) { $social_link = ! empty( $instance[ $network ] ) ? $instance[ $network ] : ''; ?> social_networks; if ( ! empty( $social_networks ) && is_array( $social_networks ) ) { foreach ( $social_networks as $network ) { $instance[ $network ] = ( ! empty( $new_instance[ $network ] ) ) ? esc_url_raw( $new_instance[ $network ] ) : ''; } } return $instance; } public function enqueue_assets() { if ( is_active_widget( false, false, $this->id_base ) ) { $file_prefix = is_rtl() ? '-rtl' : ''; $css_file = get_template_directory() . '/inc/widgets/css/author-info' . $file_prefix . '.css'; if ( file_exists( $css_file ) ) { $styles = wp_strip_all_tags( file_get_contents( $css_file ) ); wp_add_inline_style( 'blogbyte-style', $styles ); } } } }