WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#10585 closed defect (bug) (invalid)

manage_users_custom_column filter not working

Reported by: martinv5 Owned by:
Milestone: Priority: high
Severity: normal Version:
Component: Administration Keywords: reporter-feedback
Focuses: Cc:

Description

Problem is in

wp-admin/includes/template.php on line 1971

There's a blank string as an argument instead of $column_name

apply_filters('manage_users_custom_column', '', $column_name, $user_object->ID);

If you just remove the empty parameter passed to the function and put $column_name there, it will start working and you will be able to add new columns to the Users management page with plugins.

Let's get this fixed. I'm attaching a fixed template.php from 2.8.3 from the main WP site.

Attachments (1)

template.php (123.9 KB) - added by martinv5 5 years ago.
template.php with this bug fixed

Download all attachments as: .zip

Change History (5)

martinv55 years ago

template.php with this bug fixed

comment:1 dd325 years ago

  • Keywords reporter-feedback added; user mamagement manage_users_custom_column removed

Those lines look identical.

And that core function works as expected AFAIK, The same setup is used on all the pages.

You're filtering a empty string, simple as that.. The column is empty, you return a non-empty value to append it to the row..

comment:2 westi5 years ago

  • Milestone 2.8.4 deleted
  • Resolution set to invalid
  • Status changed from new to closed

That filter is written correctly in trunk and branches/2.8

The filter passes an empty string which is the default value which will be output for the row unless a plugin returns something different.

The $column_name argument is passed so that plugins know whether or not it is there column being requested - which they have added using the manage_users_columns filter (in get_column_headers() ).

comment:3 martinv55 years ago

Sorry, I got lost in this ticket system, so I wasn't able to see your answers. I don't understand why I don't see this ticket under "My Tickets".

Thanks,
M.

comment:4 dd325 years ago

I don't understand why I don't see this ticket under "My Tickets".

It only displays open tickets, not closed tickets. See #9808 for details.

Note: See TracTickets for help on using tickets.