From noreply at wordpress.org Tue Mar 10 12:04:50 2026 From: noreply at wordpress.org (buddypress-trac) Date: Tue, 10 Mar 2026 12:04:50 -0000 Subject: [buddypress-trac] [BuddyPress Trac] #9317: the_title filter in bp-blogs-template.php is missing an argument In-Reply-To: <044.07a3e706ca039e9fada28a65c514484d@wordpress.org> References: <044.07a3e706ca039e9fada28a65c514484d@wordpress.org> Message-ID: <059.74ee1e9b922a5b0523522d3d9c0f1502@wordpress.org> #9317: the_title filter in bp-blogs-template.php is missing an argument --------------------------+------------------------------ Reporter: shawfactor | Owner: (none) Type: defect (bug) | Status: new Priority: normal | Milestone: Awaiting Review Component: Core | Version: Severity: normal | Resolution: Keywords: has-patch | --------------------------+------------------------------ Changes (by prbot): * keywords: => has-patch Comment: ''This ticket was mentioned in [https://github.com/buddypress/buddypress/pull/439 PR #439] on [https://github.com/buddypress/buddypress/ buddypress/buddypress] by [https://profiles.wordpress.org/ravikhadka/ @ravikhadka].'' Adds the latest post ID as the second parameter when applying the_title. This ensures better compatibility with plugins and themes that rely on the post ID for context-aware title filtering. Trac ticket: -- Ticket URL: BuddyPress Trac BuddyPress Trac From noreply at wordpress.org Tue Mar 10 14:41:44 2026 From: noreply at wordpress.org (buddypress-trac) Date: Tue, 10 Mar 2026 14:41:44 -0000 Subject: [buddypress-trac] [BuddyPress Trac] #9331: Blogs: bp_get_blog_avatar() ignores custom alt text when a site icon is used Message-ID: <044.9eba7971a5eef6ed599aba073ed35211@wordpress.org> #9331: Blogs: bp_get_blog_avatar() ignores custom alt text when a site icon is used --------------------------+------------------------------------- Reporter: ravikhadka | Owner: (none) Type: defect (bug) | Status: new Priority: normal | Milestone: Awaiting Review Component: Blogs | Version: Severity: normal | Keywords: has-patch needs-testing --------------------------+------------------------------------- In {{{ bp_get_blog_avatar() }}} , when a blog has a site icon, the generated `` uses `$alt_attribute` instead of the parsed `$r['alt']`. This makes custom `alt` text passed by callers ineffective in the site- icon code path, while the fallback avatar code path respects custom alt values. File: `src/bp-blogs/bp-blogs-template.php` (site-icon markup branch in `bp_get_blog_avatar()`). Steps to reproduce: 1. Ensure a blog has a site icon. 2. Call: {{{ bp_get_blog_avatar( array( 'blog_id' => , 'alt' => 'Custom alt text', 'type' => 'full', ) ); }}} 3. Inspect the returned `` markup. Actual result: - The `` uses the default generated text (for example, “Site icon for ...”), not the provided `alt` value. Expected result: - The `` should use the caller-provided `alt` value (`$r['alt']`) when present. Proposed fix: - In the site-icon `` markup, replace {{{ esc_attr( $alt_attribute ) }}} with {{{ esc_attr( $r['alt'] ) }}} Why this is safe: - `$r['alt']` already defaults to `$alt_attribute`, so default behavior remains unchanged. - This only restores expected behavior for explicit custom `alt` arguments. Tests: - Extend the existing blogs template avatar test to assert custom `alt` is present when the site-icon branch is used. -- Ticket URL: BuddyPress Trac BuddyPress Trac From noreply at wordpress.org Tue Mar 10 14:52:51 2026 From: noreply at wordpress.org (buddypress-trac) Date: Tue, 10 Mar 2026 14:52:51 -0000 Subject: [buddypress-trac] [BuddyPress Trac] #9331: Blogs: bp_get_blog_avatar() ignores custom alt text when a site icon is used In-Reply-To: <044.9eba7971a5eef6ed599aba073ed35211@wordpress.org> References: <044.9eba7971a5eef6ed599aba073ed35211@wordpress.org> Message-ID: <059.69a10c31f721adb7347c47f3b9a3e06c@wordpress.org> #9331: Blogs: bp_get_blog_avatar() ignores custom alt text when a site icon is used -------------------------------------------------+------------------------- Reporter: ravikhadka | Owner: (none) Type: defect (bug) | Status: new Priority: normal | Milestone: Awaiting | Review Component: Blogs | Version: Severity: normal | Resolution: Keywords: has-patch needs-testing has-unit- | tests | -------------------------------------------------+------------------------- Changes (by prbot): * keywords: has-patch needs-testing => has-patch needs-testing has-unit- tests Comment: ''This ticket was mentioned in [https://github.com/buddypress/buddypress/pull/440 PR #440] on [https://github.com/buddypress/buddypress/ buddypress/buddypress] by [https://profiles.wordpress.org/ravikhadka/ @ravikhadka].'' Fixes [](https://buddypress.trac.wordpress.org/ticket/9331) When a blog has a site icon, `bp_get_blog_avatar()` generated the `` alt attribute from `$alt_attribute` instead of parsed args (`$r['alt']`), so custom alt text passed by callers was ignored in the site-icon path. This change switches the site-icon markup to use `$r['alt']`. Default behavior is unchanged because `$r['alt']` already defaults to `$alt_attribute`. Tests: - Extend `BP_Tests_Blogs_Template::test_bp_get_blog_avatar_has_site_icon()` to assert `alt="test"` is present. -- Ticket URL: BuddyPress Trac BuddyPress Trac