1090 if ( ! $tax || ! current_user_can( 'edit_term', $term_id ) ) { |
1090 if ( ! $tax || ! current_user_can( 'edit_term', $term_id ) ) { |
1091 return; |
1091 return; |
1092 } |
1092 } |
1093 |
1093 |
1094 $args = array( |
1094 $args = array( |
1095 'taxonomy' => $taxonomy, |
1095 'taxonomy' => $tax->name, |
1096 'tag_ID' => $term_id, |
1096 'tag_ID' => $term_id, |
1097 ); |
1097 ); |
1098 |
1098 |
1099 if ( $object_type ) { |
1099 if ( $object_type ) { |
1100 $args['post_type'] = $object_type; |
1100 $args['post_type'] = $object_type; |
1593 |
1593 |
1594 /** |
1594 /** |
1595 * Retrieves the edit comment link. |
1595 * Retrieves the edit comment link. |
1596 * |
1596 * |
1597 * @since 2.3.0 |
1597 * @since 2.3.0 |
|
1598 * @since 6.7.0 The $context parameter was added. |
1598 * |
1599 * |
1599 * @param int|WP_Comment $comment_id Optional. Comment ID or WP_Comment object. |
1600 * @param int|WP_Comment $comment_id Optional. Comment ID or WP_Comment object. |
1600 * @return string|void The edit comment link URL for the given comment. |
1601 * @param string $context Optional. Context in which the URL should be used. Either 'display', |
1601 */ |
1602 * to include HTML entities, or 'url'. Default 'display'. |
1602 function get_edit_comment_link( $comment_id = 0 ) { |
1603 * @return string|void The edit comment link URL for the given comment, or void if the comment id does not exist or |
|
1604 * the current user is not allowed to edit it. |
|
1605 */ |
|
1606 function get_edit_comment_link( $comment_id = 0, $context = 'display' ) { |
1603 $comment = get_comment( $comment_id ); |
1607 $comment = get_comment( $comment_id ); |
1604 |
1608 |
1605 if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) ) { |
1609 if ( ! is_object( $comment ) || ! current_user_can( 'edit_comment', $comment->comment_ID ) ) { |
1606 return; |
1610 return; |
1607 } |
1611 } |
1608 |
1612 |
1609 $location = admin_url( 'comment.php?action=editcomment&c=' ) . $comment->comment_ID; |
1613 if ( 'display' === $context ) { |
|
1614 $action = 'comment.php?action=editcomment&c='; |
|
1615 } else { |
|
1616 $action = 'comment.php?action=editcomment&c='; |
|
1617 } |
|
1618 |
|
1619 $location = admin_url( $action ) . $comment->comment_ID; |
|
1620 |
|
1621 // Ensure the $comment_id variable passed to the filter is always an ID. |
|
1622 $comment_id = (int) $comment->comment_ID; |
1610 |
1623 |
1611 /** |
1624 /** |
1612 * Filters the comment edit link. |
1625 * Filters the comment edit link. |
1613 * |
1626 * |
1614 * @since 2.3.0 |
1627 * @since 2.3.0 |
1615 * |
1628 * @since 6.7.0 The $comment_id and $context parameters are now being passed to the filter. |
1616 * @param string $location The edit link. |
1629 * |
1617 */ |
1630 * @param string $location The edit link. |
1618 return apply_filters( 'get_edit_comment_link', $location ); |
1631 * @param int $comment_id Unique ID of the comment to generate an edit link. |
|
1632 * @param string $context Context to include HTML entities in link. Default 'display'. |
|
1633 */ |
|
1634 return apply_filters( 'get_edit_comment_link', $location, $comment_id, $context ); |
1619 } |
1635 } |
1620 |
1636 |
1621 /** |
1637 /** |
1622 * Displays the edit comment link with formatting. |
1638 * Displays the edit comment link with formatting. |
1623 * |
1639 * |
2913 * |
2929 * |
2914 * @param array $args { |
2930 * @param array $args { |
2915 * Optional. Default pagination arguments, see paginate_links(). |
2931 * Optional. Default pagination arguments, see paginate_links(). |
2916 * |
2932 * |
2917 * @type string $screen_reader_text Screen reader text for navigation element. |
2933 * @type string $screen_reader_text Screen reader text for navigation element. |
2918 * Default 'Posts navigation'. |
2934 * Default 'Posts pagination'. |
2919 * @type string $aria_label ARIA label text for the nav element. Default 'Posts'. |
2935 * @type string $aria_label ARIA label text for the nav element. Default 'Posts pagination'. |
2920 * @type string $class Custom class for the nav element. Default 'pagination'. |
2936 * @type string $class Custom class for the nav element. Default 'pagination'. |
2921 * } |
2937 * } |
2922 * @return string Markup for pagination links. |
2938 * @return string Markup for pagination links. |
2923 */ |
2939 */ |
2924 function get_the_posts_pagination( $args = array() ) { |
2940 function get_the_posts_pagination( $args = array() ) { |
2937 $args, |
2953 $args, |
2938 array( |
2954 array( |
2939 'mid_size' => 1, |
2955 'mid_size' => 1, |
2940 'prev_text' => _x( 'Previous', 'previous set of posts' ), |
2956 'prev_text' => _x( 'Previous', 'previous set of posts' ), |
2941 'next_text' => _x( 'Next', 'next set of posts' ), |
2957 'next_text' => _x( 'Next', 'next set of posts' ), |
2942 'screen_reader_text' => __( 'Posts navigation' ), |
2958 'screen_reader_text' => __( 'Posts pagination' ), |
2943 'aria_label' => __( 'Posts' ), |
2959 'aria_label' => __( 'Posts pagination' ), |
2944 'class' => 'pagination', |
2960 'class' => 'pagination', |
2945 ) |
2961 ) |
2946 ); |
2962 ); |
2947 |
2963 |
2948 /** |
2964 /** |
3033 * |
3049 * |
3034 * @since 4.4.0 |
3050 * @since 4.4.0 |
3035 * |
3051 * |
3036 * @param string $template The default template. |
3052 * @param string $template The default template. |
3037 * @param string $css_class The class passed by the calling function. |
3053 * @param string $css_class The class passed by the calling function. |
3038 * @return string Navigation template. |
|
3039 */ |
3054 */ |
3040 $template = apply_filters( 'navigation_markup_template', $template, $css_class ); |
3055 $template = apply_filters( 'navigation_markup_template', $template, $css_class ); |
3041 |
3056 |
3042 return sprintf( $template, sanitize_html_class( $css_class ), esc_html( $screen_reader_text ), $links, esc_attr( $aria_label ) ); |
3057 return sprintf( $template, sanitize_html_class( $css_class ), esc_html( $screen_reader_text ), $links, esc_attr( $aria_label ) ); |
3043 } |
3058 } |
3091 |
3106 |
3092 /** |
3107 /** |
3093 * Retrieves the link to the next comments page. |
3108 * Retrieves the link to the next comments page. |
3094 * |
3109 * |
3095 * @since 2.7.1 |
3110 * @since 2.7.1 |
|
3111 * @since 6.7.0 Added the `page` parameter. |
3096 * |
3112 * |
3097 * @global WP_Query $wp_query WordPress Query object. |
3113 * @global WP_Query $wp_query WordPress Query object. |
3098 * |
3114 * |
3099 * @param string $label Optional. Label for link text. Default empty. |
3115 * @param string $label Optional. Label for link text. Default empty. |
3100 * @param int $max_page Optional. Max page. Default 0. |
3116 * @param int $max_page Optional. Max page. Default 0. |
|
3117 * @param int|null $page Optional. Page number. Default null. |
3101 * @return string|void HTML-formatted link for the next page of comments. |
3118 * @return string|void HTML-formatted link for the next page of comments. |
3102 */ |
3119 */ |
3103 function get_next_comments_link( $label = '', $max_page = 0 ) { |
3120 function get_next_comments_link( $label = '', $max_page = 0, $page = null ) { |
3104 global $wp_query; |
3121 global $wp_query; |
3105 |
3122 |
3106 if ( ! is_singular() ) { |
3123 if ( ! is_singular() ) { |
3107 return; |
3124 return; |
3108 } |
3125 } |
3109 |
3126 |
3110 $page = get_query_var( 'cpage' ); |
3127 if ( is_null( $page ) ) { |
|
3128 $page = get_query_var( 'cpage' ); |
|
3129 } |
3111 |
3130 |
3112 if ( ! $page ) { |
3131 if ( ! $page ) { |
3113 $page = 1; |
3132 $page = 1; |
3114 } |
3133 } |
3115 |
3134 |
3162 |
3181 |
3163 /** |
3182 /** |
3164 * Retrieves the link to the previous comments page. |
3183 * Retrieves the link to the previous comments page. |
3165 * |
3184 * |
3166 * @since 2.7.1 |
3185 * @since 2.7.1 |
3167 * |
3186 * @since 6.7.0 Added the `page` parameter. |
3168 * @param string $label Optional. Label for comments link text. Default empty. |
3187 * |
|
3188 * @param string $label Optional. Label for comments link text. Default empty. |
|
3189 * @param int|null $page Optional. Page number. Default null. |
3169 * @return string|void HTML-formatted link for the previous page of comments. |
3190 * @return string|void HTML-formatted link for the previous page of comments. |
3170 */ |
3191 */ |
3171 function get_previous_comments_link( $label = '' ) { |
3192 function get_previous_comments_link( $label = '', $page = null ) { |
3172 if ( ! is_singular() ) { |
3193 if ( ! is_singular() ) { |
3173 return; |
3194 return; |
3174 } |
3195 } |
3175 |
3196 |
3176 $page = get_query_var( 'cpage' ); |
3197 if ( is_null( $page ) ) { |
|
3198 $page = get_query_var( 'cpage' ); |
|
3199 } |
3177 |
3200 |
3178 if ( (int) $page <= 1 ) { |
3201 if ( (int) $page <= 1 ) { |
3179 return; |
3202 return; |
3180 } |
3203 } |
3181 |
3204 |
3341 * @see paginate_comments_links() |
3364 * @see paginate_comments_links() |
3342 * |
3365 * |
3343 * @param array $args { |
3366 * @param array $args { |
3344 * Optional. Default pagination arguments. |
3367 * Optional. Default pagination arguments. |
3345 * |
3368 * |
3346 * @type string $screen_reader_text Screen reader text for the nav element. Default 'Comments navigation'. |
3369 * @type string $screen_reader_text Screen reader text for the nav element. Default 'Comments pagination'. |
3347 * @type string $aria_label ARIA label text for the nav element. Default 'Comments'. |
3370 * @type string $aria_label ARIA label text for the nav element. Default 'Comments pagination'. |
3348 * @type string $class Custom class for the nav element. Default 'comments-pagination'. |
3371 * @type string $class Custom class for the nav element. Default 'comments-pagination'. |
3349 * } |
3372 * } |
3350 * @return string Markup for pagination links. |
3373 * @return string Markup for pagination links. |
3351 */ |
3374 */ |
3352 function get_the_comments_pagination( $args = array() ) { |
3375 function get_the_comments_pagination( $args = array() ) { |
3358 } |
3381 } |
3359 |
3382 |
3360 $args = wp_parse_args( |
3383 $args = wp_parse_args( |
3361 $args, |
3384 $args, |
3362 array( |
3385 array( |
3363 'screen_reader_text' => __( 'Comments navigation' ), |
3386 'screen_reader_text' => __( 'Comments pagination' ), |
3364 'aria_label' => __( 'Comments' ), |
3387 'aria_label' => __( 'Comments pagination' ), |
3365 'class' => 'comments-pagination', |
3388 'class' => 'comments-pagination', |
3366 ) |
3389 ) |
3367 ); |
3390 ); |
3368 $args['echo'] = false; |
3391 $args['echo'] = false; |
3369 |
3392 |
4221 * Must be called from inside "The Loop" |
4244 * Must be called from inside "The Loop" |
4222 * |
4245 * |
4223 * Call like the_shortlink( __( 'Shortlinkage FTW' ) ) |
4246 * Call like the_shortlink( __( 'Shortlinkage FTW' ) ) |
4224 * |
4247 * |
4225 * @since 3.0.0 |
4248 * @since 3.0.0 |
4226 * |
4249 * @since 6.8.0 Removed title attribute. |
4227 * @param string $text Optional The link text or HTML to be displayed. Defaults to 'This is the short link.' |
4250 * |
4228 * @param string $title Optional The tooltip for the link. Must be sanitized. Defaults to the sanitized post title. |
4251 * @param string $text Optional. The link text or HTML to be displayed. Defaults to 'This is the short link.' |
4229 * @param string $before Optional HTML to display before the link. Default empty. |
4252 * @param string $title Unused. |
4230 * @param string $after Optional HTML to display after the link. Default empty. |
4253 * @param string $before Optional. HTML to display before the link. Default empty. |
|
4254 * @param string $after Optional. HTML to display after the link. Default empty. |
4231 */ |
4255 */ |
4232 function the_shortlink( $text = '', $title = '', $before = '', $after = '' ) { |
4256 function the_shortlink( $text = '', $title = '', $before = '', $after = '' ) { |
4233 $post = get_post(); |
4257 $post = get_post(); |
4234 |
4258 |
4235 if ( empty( $text ) ) { |
4259 if ( empty( $text ) ) { |
4236 $text = __( 'This is the short link.' ); |
4260 $text = __( 'This is the short link.' ); |
4237 } |
4261 } |
4238 |
4262 |
4239 if ( empty( $title ) ) { |
|
4240 $title = the_title_attribute( array( 'echo' => false ) ); |
|
4241 } |
|
4242 |
|
4243 $shortlink = wp_get_shortlink( $post->ID ); |
4263 $shortlink = wp_get_shortlink( $post->ID ); |
4244 |
4264 |
4245 if ( ! empty( $shortlink ) ) { |
4265 if ( ! empty( $shortlink ) ) { |
4246 $link = '<a rel="shortlink" href="' . esc_url( $shortlink ) . '" title="' . $title . '">' . $text . '</a>'; |
4266 $link = '<a rel="shortlink" href="' . esc_url( $shortlink ) . '">' . $text . '</a>'; |
4247 |
4267 |
4248 /** |
4268 /** |
4249 * Filters the short link anchor tag for a post. |
4269 * Filters the short link anchor tag for a post. |
4250 * |
4270 * |
4251 * @since 3.0.0 |
4271 * @since 3.0.0 |
4252 * |
4272 * |
4253 * @param string $link Shortlink anchor tag. |
4273 * @param string $link Shortlink anchor tag. |
4254 * @param string $shortlink Shortlink URL. |
4274 * @param string $shortlink Shortlink URL. |
4255 * @param string $text Shortlink's text. |
4275 * @param string $text Shortlink's text. |
4256 * @param string $title Shortlink's title attribute. |
4276 * @param string $title Shortlink's title attribute. Unused. |
4257 */ |
4277 */ |
4258 $link = apply_filters( 'the_shortlink', $link, $shortlink, $text, $title ); |
4278 $link = apply_filters( 'the_shortlink', $link, $shortlink, $text, $title ); |
4259 echo $before, $link, $after; |
4279 echo $before, $link, $after; |
4260 } |
4280 } |
4261 } |
4281 } |
4263 /** |
4283 /** |
4264 * Retrieves the avatar URL. |
4284 * Retrieves the avatar URL. |
4265 * |
4285 * |
4266 * @since 4.2.0 |
4286 * @since 4.2.0 |
4267 * |
4287 * |
4268 * @param mixed $id_or_email The avatar to retrieve a URL for. Accepts a user ID, Gravatar MD5 hash, |
4288 * @param mixed $id_or_email The avatar to retrieve a URL for. Accepts a user ID, Gravatar SHA-256 or MD5 hash, |
4269 * user email, WP_User object, WP_Post object, or WP_Comment object. |
4289 * user email, WP_User object, WP_Post object, or WP_Comment object. |
4270 * @param array $args { |
4290 * @param array $args { |
4271 * Optional. Arguments to use instead of the default arguments. |
4291 * Optional. Arguments to use instead of the default arguments. |
4272 * |
4292 * |
4273 * @type int $size Height and width of the avatar in pixels. Default 96. |
4293 * @type int $size Height and width of the avatar in pixels. Default 96. |
4326 |
4346 |
4327 /** |
4347 /** |
4328 * Retrieves default data about the avatar. |
4348 * Retrieves default data about the avatar. |
4329 * |
4349 * |
4330 * @since 4.2.0 |
4350 * @since 4.2.0 |
4331 * |
4351 * @since 6.7.0 Gravatar URLs always use HTTPS. |
4332 * @param mixed $id_or_email The avatar to retrieve. Accepts a user ID, Gravatar MD5 hash, |
4352 * @since 6.8.0 Gravatar URLs use the SHA-256 hashing algorithm. |
|
4353 * |
|
4354 * @param mixed $id_or_email The avatar to retrieve. Accepts a user ID, Gravatar SHA-256 or MD5 hash, |
4333 * user email, WP_User object, WP_Post object, or WP_Comment object. |
4355 * user email, WP_User object, WP_Post object, or WP_Comment object. |
4334 * @param array $args { |
4356 * @param array $args { |
4335 * Optional. Arguments to use instead of the default arguments. |
4357 * Optional. Arguments to use instead of the default arguments. |
4336 * |
4358 * |
4337 * @type int $size Height and width of the avatar in pixels. Default 96. |
4359 * @type int $size Height and width of the avatar in pixels. Default 96. |
4356 * - 'PG' (possibly offensive, usually for audiences 13 and above) |
4378 * - 'PG' (possibly offensive, usually for audiences 13 and above) |
4357 * - 'R' (intended for adult audiences above 17) |
4379 * - 'R' (intended for adult audiences above 17) |
4358 * - 'X' (even more mature than above) |
4380 * - 'X' (even more mature than above) |
4359 * Default is the value of the 'avatar_rating' option. |
4381 * Default is the value of the 'avatar_rating' option. |
4360 * @type string $scheme URL scheme to use. See set_url_scheme() for accepted values. |
4382 * @type string $scheme URL scheme to use. See set_url_scheme() for accepted values. |
|
4383 * For Gravatars this setting is ignored and HTTPS is used to avoid |
|
4384 * unnecessary redirects. The setting is retained for systems using |
|
4385 * the {@see 'pre_get_avatar_data'} filter to customize avatars. |
4361 * Default null. |
4386 * Default null. |
4362 * @type array $processed_args When the function returns, the value will be the processed/sanitized $args |
4387 * @type array $processed_args When the function returns, the value will be the processed/sanitized $args |
4363 * plus a "found_avatar" guess. Pass as a reference. Default null. |
4388 * plus a "found_avatar" guess. Pass as a reference. Default null. |
4364 * @type string $extra_attr HTML attributes to insert in the IMG element. Is not sanitized. |
4389 * @type string $extra_attr HTML attributes to insert in the IMG element. Is not sanitized. |
4365 * Default empty. |
4390 * Default empty. |
4444 * the {@see 'get_avatar_data'} filter and returning early. |
4469 * the {@see 'get_avatar_data'} filter and returning early. |
4445 * |
4470 * |
4446 * @since 4.2.0 |
4471 * @since 4.2.0 |
4447 * |
4472 * |
4448 * @param array $args Arguments passed to get_avatar_data(), after processing. |
4473 * @param array $args Arguments passed to get_avatar_data(), after processing. |
4449 * @param mixed $id_or_email The avatar to retrieve. Accepts a user ID, Gravatar MD5 hash, |
4474 * @param mixed $id_or_email The avatar to retrieve. Accepts a user ID, Gravatar SHA-256 or MD5 hash, |
4450 * user email, WP_User object, WP_Post object, or WP_Comment object. |
4475 * user email, WP_User object, WP_Post object, or WP_Comment object. |
4451 */ |
4476 */ |
4452 $args = apply_filters( 'pre_get_avatar_data', $args, $id_or_email ); |
4477 $args = apply_filters( 'pre_get_avatar_data', $args, $id_or_email ); |
4453 |
4478 |
4454 if ( isset( $args['url'] ) ) { |
4479 if ( isset( $args['url'] ) ) { |
4466 |
4491 |
4467 // Process the user identifier. |
4492 // Process the user identifier. |
4468 if ( is_numeric( $id_or_email ) ) { |
4493 if ( is_numeric( $id_or_email ) ) { |
4469 $user = get_user_by( 'id', absint( $id_or_email ) ); |
4494 $user = get_user_by( 'id', absint( $id_or_email ) ); |
4470 } elseif ( is_string( $id_or_email ) ) { |
4495 } elseif ( is_string( $id_or_email ) ) { |
4471 if ( str_contains( $id_or_email, '@md5.gravatar.com' ) ) { |
4496 if ( str_contains( $id_or_email, '@sha256.gravatar.com' ) ) { |
|
4497 // SHA-256 hash. |
|
4498 list( $email_hash ) = explode( '@', $id_or_email ); |
|
4499 } elseif ( str_contains( $id_or_email, '@md5.gravatar.com' ) ) { |
4472 // MD5 hash. |
4500 // MD5 hash. |
4473 list( $email_hash ) = explode( '@', $id_or_email ); |
4501 list( $email_hash ) = explode( '@', $id_or_email ); |
4474 } else { |
4502 } else { |
4475 // Email address. |
4503 // Email address. |
4476 $email = $id_or_email; |
4504 $email = $id_or_email; |
4500 if ( $user ) { |
4528 if ( $user ) { |
4501 $email = $user->user_email; |
4529 $email = $user->user_email; |
4502 } |
4530 } |
4503 |
4531 |
4504 if ( $email ) { |
4532 if ( $email ) { |
4505 $email_hash = md5( strtolower( trim( $email ) ) ); |
4533 $email_hash = hash( 'sha256', strtolower( trim( $email ) ) ); |
4506 } |
4534 } |
4507 } |
4535 } |
4508 |
4536 |
4509 if ( $email_hash ) { |
4537 if ( $email_hash ) { |
4510 $args['found_avatar'] = true; |
4538 $args['found_avatar'] = true; |
4511 $gravatar_server = hexdec( $email_hash[0] ) % 3; |
|
4512 } else { |
|
4513 $gravatar_server = rand( 0, 2 ); |
|
4514 } |
4539 } |
4515 |
4540 |
4516 $url_args = array( |
4541 $url_args = array( |
4517 's' => $args['size'], |
4542 's' => $args['size'], |
4518 'd' => $args['default'], |
4543 'd' => $args['default'], |
4519 'f' => $args['force_default'] ? 'y' : false, |
4544 'f' => $args['force_default'] ? 'y' : false, |
4520 'r' => $args['rating'], |
4545 'r' => $args['rating'], |
4521 ); |
4546 ); |
4522 |
4547 |
4523 if ( is_ssl() ) { |
4548 /* |
4524 $url = 'https://secure.gravatar.com/avatar/' . $email_hash; |
4549 * Gravatars are always served over HTTPS. |
4525 } else { |
4550 * |
4526 $url = sprintf( 'http://%d.gravatar.com/avatar/%s', $gravatar_server, $email_hash ); |
4551 * The Gravatar website redirects HTTP requests to HTTPS URLs so always |
4527 } |
4552 * use the HTTPS scheme to avoid unnecessary redirects. |
|
4553 */ |
|
4554 $url = 'https://secure.gravatar.com/avatar/' . $email_hash; |
4528 |
4555 |
4529 $url = add_query_arg( |
4556 $url = add_query_arg( |
4530 rawurlencode_deep( array_filter( $url_args ) ), |
4557 rawurlencode_deep( array_filter( $url_args ) ), |
4531 set_url_scheme( $url, $args['scheme'] ) |
4558 $url |
4532 ); |
4559 ); |
4533 |
4560 |
4534 /** |
4561 /** |
4535 * Filters the avatar URL. |
4562 * Filters the avatar URL. |
4536 * |
4563 * |
4537 * @since 4.2.0 |
4564 * @since 4.2.0 |
4538 * |
4565 * |
4539 * @param string $url The URL of the avatar. |
4566 * @param string $url The URL of the avatar. |
4540 * @param mixed $id_or_email The avatar to retrieve. Accepts a user ID, Gravatar MD5 hash, |
4567 * @param mixed $id_or_email The avatar to retrieve. Accepts a user ID, Gravatar SHA-256 or MD5 hash, |
4541 * user email, WP_User object, WP_Post object, or WP_Comment object. |
4568 * user email, WP_User object, WP_Post object, or WP_Comment object. |
4542 * @param array $args Arguments passed to get_avatar_data(), after processing. |
4569 * @param array $args Arguments passed to get_avatar_data(), after processing. |
4543 */ |
4570 */ |
4544 $args['url'] = apply_filters( 'get_avatar_url', $url, $id_or_email, $args ); |
4571 $args['url'] = apply_filters( 'get_avatar_url', $url, $id_or_email, $args ); |
4545 |
4572 |
4547 * Filters the avatar data. |
4574 * Filters the avatar data. |
4548 * |
4575 * |
4549 * @since 4.2.0 |
4576 * @since 4.2.0 |
4550 * |
4577 * |
4551 * @param array $args Arguments passed to get_avatar_data(), after processing. |
4578 * @param array $args Arguments passed to get_avatar_data(), after processing. |
4552 * @param mixed $id_or_email The avatar to retrieve. Accepts a user ID, Gravatar MD5 hash, |
4579 * @param mixed $id_or_email The avatar to retrieve. Accepts a user ID, Gravatar SHA-256 or MD5 hash, |
4553 * user email, WP_User object, WP_Post object, or WP_Comment object. |
4580 * user email, WP_User object, WP_Post object, or WP_Comment object. |
4554 */ |
4581 */ |
4555 return apply_filters( 'get_avatar_data', $args, $id_or_email ); |
4582 return apply_filters( 'get_avatar_data', $args, $id_or_email ); |
4556 } |
4583 } |
4557 |
4584 |