diff options
Diffstat (limited to 'plugins/jetpack/modules/shortcodes/gravatar.php')
-rw-r--r-- | plugins/jetpack/modules/shortcodes/gravatar.php | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/plugins/jetpack/modules/shortcodes/gravatar.php b/plugins/jetpack/modules/shortcodes/gravatar.php index 8d1c4ee1..ea248618 100644 --- a/plugins/jetpack/modules/shortcodes/gravatar.php +++ b/plugins/jetpack/modules/shortcodes/gravatar.php @@ -21,10 +21,13 @@ add_shortcode( 'gravatar_profile', 'jetpack_gravatar_profile_shortcode' ); * @return bool|string */ function jetpack_gravatar_shortcode( $atts ) { - $atts = shortcode_atts( array( - 'email' => '', - 'size' => 96, - ), $atts ); + $atts = shortcode_atts( + array( + 'email' => '', + 'size' => 96, + ), + $atts + ); if ( empty( $atts['email'] ) || ! is_email( $atts['email'] ) ) { return false; @@ -64,9 +67,13 @@ function jetpack_gravatar_profile_shortcode( $atts ) { static $instance = 0; // Process passed attributes - $atts = shortcode_atts( array( - 'who' => null, - ), $atts, 'jetpack_gravatar_profile' ); + $atts = shortcode_atts( + array( + 'who' => null, + ), + $atts, + 'jetpack_gravatar_profile' + ); // Can specify username, user ID, or email address if ( is_numeric( $atts['who'] ) ) { @@ -85,7 +92,7 @@ function jetpack_gravatar_profile_shortcode( $atts ) { } // Render the shortcode - $gravatar_url = set_url_scheme( 'http://gravatar.com/' . $user->user_login ); + $gravatar_url = set_url_scheme( 'http://gravatar.com/' . $user->user_login ); if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { $avatar_url = wpcom_get_avatar_url( $user->ID, 96 ); @@ -132,7 +139,10 @@ function jetpack_gravatar_profile_shortcode( $atts ) { <div class="grofile-right"> <p class="grofile-name fn"> <strong><?php echo esc_html( $user->display_name ); ?></strong> - <?php if ( ! empty( $user_location ) ) : ?><br><span class="grofile-location adr"><?php echo esc_html( $user_location ); ?></span><?php endif; ?> + <?php + if ( ! empty( $user_location ) ) : + ?> + <br><span class="grofile-location adr"><?php echo esc_html( $user_location ); ?></span><?php endif; ?> </p> <p class="grofile-bio"><strong><?php esc_html_e( 'Bio:', 'jetpack' ); ?></strong> <?php echo wp_kses_post( $user->description ); ?></p> <p class="grofile-view"> @@ -141,7 +151,8 @@ function jetpack_gravatar_profile_shortcode( $atts ) { </div> <span class="grofile-clear"> </span> </div> - </div><?php + </div> + <?php // Increment and return the rendered profile $instance++; |