Skip to:
Content

bbPress.org

Changeset 7951


Ignore:
Timestamp:
10/11/2026 02:07:56 AM (5 weeks ago)
Author:
johnjamesjacoby
Message:

Administration: Distinguish Credits menu label.

Keep the shared "Welcome to bbPress" page title for the About and Credits screens, while labeling the Credits dashboard menu entry separately. This preserves the tabbed presentation and avoids duplicate labels when the registered pages are exposed.

In trunk, for 2.7.

Props zaerl.
Fixes #3480.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/classes/class-bbp-admin.php

    r7851 r7951  
    559559                        add_dashboard_page(
    560560                                esc_html__( 'Welcome to bbPress',  'bbpress' ),
    561                                 esc_html__( 'Welcome to bbPress',  'bbpress' ),
     561                                esc_html__( 'Credits',             'bbpress' ),
    562562                                'bbp_about_page',
    563563                                'bbp-credits',
  • trunk/tests/phpunit/testcases/admin/admin.php

    r7912 r7951  
    282282         * @covers BBP_Admin::admin_menus
    283283         * @covers BBP_Admin::admin_head
     284         * @ticket 3480
    284285         * @ticket 3706
    285286         */
    … …  
    306307                        $this->assertContains( 'bbp-about', wp_list_pluck( $GLOBALS['submenu']['index.php'], 2 ) );
    307308                        $this->assertContains( 'bbp-credits', wp_list_pluck( $GLOBALS['submenu']['index.php'], 2 ) );
     309                        $about = wp_list_filter( $GLOBALS['submenu']['index.php'], array( 2 => 'bbp-about' ) );
     310                        $about = reset( $about );
     311                        $this->assertSame( 'Welcome to bbPress', $about[0] );
     312                        $this->assertSame( 'Welcome to bbPress', $about[3] );
     313                        $credits = wp_list_filter( $GLOBALS['submenu']['index.php'], array( 2 => 'bbp-credits' ) );
     314                        $credits = reset( $credits );
     315                        $this->assertSame( 'Credits', $credits[0] );
     316                        $this->assertSame( 'Welcome to bbPress', $credits[3] );
    308317                        $upgrade_hook = get_plugin_page_hookname( 'bbp-upgrade', 'tools.php' );
    309318                        $this->assertSame( 10, has_action( 'admin_head-' . $upgrade_hook, 'bbp_tools_modify_menu_highlight' ) );
Note: See TracChangeset for help on using the changeset viewer.