do_action( ‘manage_users_extra_tablenav’, string $which )

Fires immediately following the closing “actions” div in the tablenav for the users list table.

Parameters

$whichstring
The location of the extra table nav markup: 'top' or 'bottom'.

Source

do_action( 'manage_users_extra_tablenav', $which );

Changelog

VersionDescription
4.9.0Introduced.

User Contributed Notes

  1. Skip to note 2 content

    You can add for example a button for creating new user or anything else in the topnav area (before the users table) in users.php page

    add_action( 'manage_users_extra_tablenav', function ( string $which ) {
    	// Add at top only
    	if ( 'top' !== $which ) {
    		return;
    	}
    
    	echo '<a href="' . esc_url( admin_url( 'user-new.php' ) ) . '" rel="nofollow ugc">' . esc_html__( 'Add New User', 'text-domain' ) . '</a>';
    } );

You must log in before being able to contribute a note or feedback.