Changeset 44499 for trunk/src/wp-includes/link-template.php
- Timestamp:
- 01/09/2019 05:59:49 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/link-template.php
r44351 r44499 3938 3938 } 3939 3939 3940 3941 /** 3942 * Check if this comment type allows avatars to be retrieved. 3943 * 3944 * @since 5.1.0 3945 * 3946 * @param string $comment_type Comment type to check. 3947 * @return bool Whether the comment type is allowed for retrieving avatars. 3948 */ 3949 function is_avatar_comment_type( $comment_type ) { 3950 /** 3951 * Filters the list of allowed comment types for retrieving avatars. 3952 * 3953 * @since 3.0.0 3954 * 3955 * @param array $types An array of content types. Default only contains 'comment'. 3956 */ 3957 $allowed_comment_types = apply_filters( 'get_avatar_comment_types', array( 'comment' ) ); 3958 3959 return in_array( $comment_type, (array) $allowed_comment_types, true ); 3960 } 3961 3962 3940 3963 /** 3941 3964 * Retrieves default data about the avatar. … … 4083 4106 $user = get_user_by( 'id', (int) $id_or_email->post_author ); 4084 4107 } elseif ( $id_or_email instanceof WP_Comment ) { 4085 /** 4086 * Filters the list of allowed comment types for retrieving avatars. 4087 * 4088 * @since 3.0.0 4089 * 4090 * @param array $types An array of content types. Default only contains 'comment'. 4091 */ 4092 $allowed_comment_types = apply_filters( 'get_avatar_comment_types', array( 'comment' ) ); 4093 if ( ! empty( $id_or_email->comment_type ) && ! in_array( $id_or_email->comment_type, (array) $allowed_comment_types ) ) { 4108 if ( ! is_avatar_comment_type( get_comment_type( $id_or_email ) ) ) { 4094 4109 $args['url'] = false; 4095 4110 /** This filter is documented in wp-includes/link-template.php */
Note: See TracChangeset
for help on using the changeset viewer.