PluginProbe
Parse.ly / 3.24.3
Parse.ly v3.24.3
3.24.3 3.24.2 3.24.1 3.24.0 3.23.7 3.23.6 3.23.5 3.23.4 3.23.3 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.17.0 3.18.0 3.18.1 3.19.0 3.19.1 3.19.2 3.19.3 3.2.0 3.2.1 3.20.0 3.20.1 All 107 releases
← All changes | src/Models/class-inbound-smart-link.php +2 -7 3.23.5 → 3.24.3 View file →
@@ -211,8 +211,9 @@
211 211 /**
212 212 * Gets the post data for the smart link.
213 213 *
214 214 * @since 3.16.0
215 + * @since 3.24.3 Uses the display name of the source post's author.
215 216 *
216 217 * @return SmartLinkPostData The post data.
217 218 */
218 219 private function get_post_data(): array {
@@ -267,14 +268,8 @@
267 268 );
268 269 $paragraph = $error_paragraph;
269 270 }
270 271
271 - $author_name = get_the_author();
272 - if ( '' === $author_name ) {
273 - // If the author name is empty, use the author login name.
274 - $author_name = get_the_author_meta( 'user_login', intval( $post->post_author ) );
275 - }
276 -
277 272 $post_type = get_post_type_object( $post->post_type );
278 273 if ( null === $post_type ) {
279 274 return $empty_post_data;
280 275 }
@@ -298,9 +293,9 @@
298 293 'parsely_canonical_url' => Parsely::get_canonical_url_from_post( $post ),
299 294 'edit_link' => get_edit_post_link( $post, 'html' ) !== null ? get_edit_post_link( $post, 'html' ) : '',
300 295 'is_first_paragraph' => $paragraph['is_first_paragraph'],
301 296 'is_last_paragraph' => $paragraph['is_last_paragraph'],
302 - 'author' => $author_name,
297 + 'author' => get_the_author_meta( 'display_name', (int) $post->post_author ),
303 298 'date' => (string) ( get_the_date( '', $post ) !== false ? get_the_date( '', $post ) : '' ),
304 299 'image' => get_the_post_thumbnail_url( $post, 'medium' ) !== false ? get_the_post_thumbnail_url( $post, 'medium' ) : '',
305 300 );
306 301