You appear to be a bot. Output may be restricted
Description
This filter is documented in modules/widgets/facebook-likebox.php
Usage
Jetpack_Gravatar_Profile_Widget::widget( $args, $instance );
Parameters
- $args
- ( mixed ) required –
- $instance
- ( mixed ) required –
Returns
void
Source
File name: jetpack/modules/widgets/gravatar-profile.php
Lines:
1 to 100 of 108
function widget( $args, $instance ) { /** * Fires when an item is displayed on the front end. * * Can be used to track stats about the number of displays for a specific item * * @module widgets, shortcodes * * @since 1.6.0 * * @param string widget_view Item type (e.g. widget, or embed). * @param string grofile Item description (e.g. grofile, goodreads). */ do_action( 'jetpack_stats_extra', 'widget_view', 'grofile' ); $instance = wp_parse_args( $instance, array( 'title' => '', 'email' => '', ) ); /** This filter is documented in core/src/wp-includes/default-widgets.php */ $title = apply_filters( 'widget_title', $instance['title'] ); if ( ! $instance['email'] ) { if ( current_user_can( 'edit_theme_options' ) ) { echo $args['before_widget']; if ( ! empty( $title ) ) { echo $args['before_title'] . $title . $args['after_title']; } echo '<p>' . sprintf( __( 'You need to select what to show in this <a href="%s">Gravatar Profile widget</a>.', 'jetpack' ), admin_url( 'widgets.php' ) ) . '</p>'; echo $args['after_widget']; } return; } echo $args['before_widget']; if ( ! empty( $title ) ) { echo $args['before_title'] . $title . $args['after_title']; } $profile = $this->get_profile( $instance['email'] ); if ( ! empty( $profile ) ) { $profile = wp_parse_args( $profile, array( 'thumbnailUrl' => '', 'profileUrl' => '', 'displayName' => '', 'aboutMe' => '', 'urls' => array(), 'accounts' => array(), ) ); $gravatar_url = add_query_arg( 's', 320, $profile['thumbnailUrl'] ); // the default grav returned by grofiles is super small // Enqueue front end assets. $this->enqueue_scripts(); ?> <img src="<?php echo esc_url( $gravatar_url ); ?>" class="grofile-thumbnail no-grav" alt="<?php echo esc_attr( $profile['displayName'] ); ?>" /> <div class="grofile-meta"> <h4><a href="<?php echo esc_url( $profile['profileUrl'] ); ?>"><?php echo esc_html( $profile['displayName'] ); ?></a></h4> <p><?php echo wp_kses_post( $profile['aboutMe'] ); ?></p> </div> <?php if ( $instance['show_personal_links'] ) { $this->display_personal_links( (array) $profile['urls'] ); } if ( $instance['show_account_links'] ) { $this->display_accounts( (array) $profile['accounts'] ); } ?> <p><a href="<?php echo esc_url( $profile['profileUrl'] ); ?>" class="grofile-full-link"> <?php echo esc_html( /** * Filter the Gravatar Profile widget's profile link title. * * @module widgets * * @since 2.8.0 * * @param string $str Profile link title. */ apply_filters( 'jetpack_gravatar_full_profile_title', __( 'View Full Profile →', 'jetpack' ) ) ); ?> </a></p> <?php