From 6a4da3f0cf3e08bcc3f0a814a0a5c1636bffb438 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Thu, 19 Dec 2024 16:18:41 +1000 Subject: [PATCH] Speaker post type: Link WordPress.org username to profiles. (#1448) * Speaker post type: WordPress.org username should link to profile. --- .../wp-content/plugins/wc-post-types/wc-post-types.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/public_html/wp-content/plugins/wc-post-types/wc-post-types.php b/public_html/wp-content/plugins/wc-post-types/wc-post-types.php index c8660b5329..800d4dc3d5 100644 --- a/public_html/wp-content/plugins/wc-post-types/wc-post-types.php +++ b/public_html/wp-content/plugins/wc-post-types/wc-post-types.php @@ -633,7 +633,7 @@ public function get_speaker_wporg_permalink( $speaker_id ) { return null; } - $permalink = sprintf( 'http://profiles.wordpress.org/%s', strtolower( $user->user_nicename ) ); + $permalink = sprintf( 'http://profiles.wordpress.org/%s/', strtolower( $user->user_nicename ) ); return esc_url_raw( $permalink ); } @@ -1916,7 +1916,11 @@ public function manage_post_types_columns_output( $column, $post_id ) { $wporg_user = get_user_by( 'id', $user_id ); if ( $wporg_user ) { - echo esc_html( $wporg_user->user_login ); + printf( + '%s', + esc_url( 'https://profiles.wordpress.org/' . $wporg_user->user_nicename . '/' ), + esc_html( $wporg_user->user_login ) + ); } break;