summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYury German <blueknight@gentoo.org>2019-04-28 17:39:03 -0400
committerYury German <blueknight@gentoo.org>2019-04-28 17:39:03 -0400
commit2ab16973706e120bc344c83be6295b54fd908c57 (patch)
tree358267a52d9542c77c90e3663cea32d13b8cb639 /plugins/jetpack/modules/shortcodes/gravatar.php
parentUpdate twentysixteen 1.7 (diff)
downloadblogs-gentoo-2ab16973706e120bc344c83be6295b54fd908c57.tar.gz
blogs-gentoo-2ab16973706e120bc344c83be6295b54fd908c57.tar.bz2
blogs-gentoo-2ab16973706e120bc344c83be6295b54fd908c57.zip
Updating packages for 5.1.1
Signed-off-by: Yury German <blueknight@gentoo.org>
Diffstat (limited to 'plugins/jetpack/modules/shortcodes/gravatar.php')
-rw-r--r--plugins/jetpack/modules/shortcodes/gravatar.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/plugins/jetpack/modules/shortcodes/gravatar.php b/plugins/jetpack/modules/shortcodes/gravatar.php
index ea248618..cb709af9 100644
--- a/plugins/jetpack/modules/shortcodes/gravatar.php
+++ b/plugins/jetpack/modules/shortcodes/gravatar.php
@@ -6,6 +6,8 @@
*
* [gravatar email="user@example.org" size="48"]
* [gravatar_profile who="user@example.org"]
+ *
+ * @package Jetpack
*/
add_shortcode( 'gravatar', 'jetpack_gravatar_shortcode' );
@@ -63,10 +65,10 @@ function jetpack_gravatar_shortcode( $atts ) {
* @return string
*/
function jetpack_gravatar_profile_shortcode( $atts ) {
- // Give each use of the shortcode a unique ID
+ // Give each use of the shortcode a unique ID.
static $instance = 0;
- // Process passed attributes
+ // Process passed attributes.
$atts = shortcode_atts(
array(
'who' => null,
@@ -75,7 +77,7 @@ function jetpack_gravatar_profile_shortcode( $atts ) {
'jetpack_gravatar_profile'
);
- // Can specify username, user ID, or email address
+ // Can specify username, user ID, or email address.
if ( is_numeric( $atts['who'] ) ) {
$user = get_user_by( 'id', (int) $atts['who'] );
} elseif ( is_email( $atts['who'] ) ) {
@@ -86,12 +88,12 @@ function jetpack_gravatar_profile_shortcode( $atts ) {
$user = false;
}
- // Bail if we don't have a user
+ // Bail if we don't have a user.
if ( false === $user ) {
return false;
}
- // Render the shortcode
+ // Render the shortcode.
$gravatar_url = set_url_scheme( 'http://gravatar.com/' . $user->user_login );
if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
@@ -154,7 +156,7 @@ function jetpack_gravatar_profile_shortcode( $atts ) {
</div>
<?php
- // Increment and return the rendered profile
+ // Increment and return the rendered profile.
$instance++;
return ob_get_clean();