WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#16046 closed defect (bug) (invalid)

do_action(quick_edit_custom_box) results in duplicates

Reported by: nerrad Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Quick/Bulk Edit Keywords:
Focuses: Cc:

Description

I noticed that there were some changes in this hook for WP3.1 - what's happening, is when I hook into the action I'm getting a double output. Trying to narrow down the cause now but thought I'd throw this up here in case there's something obvious I'm missing.

Attached is an example screenshot of my plugin in action using this hook on WP3.1

Attachments (1)

quick_edit_custom_box_screen.png (86.3 KB) - added by nerrad 3 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 nerrad3 years ago

  • Resolution set to invalid
  • Status changed from new to closed

never mind. disregard. pre 3.1 $column_name didn't have to be accounted for (must have been a bug?). The multiple output is for each $column.

comment:2 nacin3 years ago

3.0:

./wp-admin/includes/template.php:59:
do_action( 'quick_edit_custom_box', $column_name, $type, $taxonomy );

./wp-admin/includes/template.php:1147:
do_action( $bulk ? 'bulk_edit_custom_box' : 'quick_edit_custom_box', $column_name, $screen->post_type );

3.1:

./wp-admin/includes/class-wp-terms-list-table.php:356:
do_action( 'quick_edit_custom_box', $column_name, $tax->name );

./wp-admin/includes/class-wp-posts-list-table.php:990:
do_action( $bulk ? 'bulk_edit_custom_box' : 'quick_edit_custom_box', $column_name, $screen->post_type );

comment:3 nacin3 years ago

  • Milestone changed from Awaiting Review to 3.1
  • Resolution invalid deleted
  • Status changed from closed to reopened

I see a regression. I'm not sure why this change was made.

In 3.0, inline_edit_term_row() took $type ('edit-tags', 'categories', or 'edit-link-categories') and $taxonomy.

In 3.0 we didn't account for the merger of 'edit-tags' and 'categories'. It appears people didn't rely on this argument as we hadn't seen a report. That's fine with me.

But, the taxonomy argument has now moved. That's a problem for people adding custom column data here.

We should just pass 'edit-tags' consistently and bump the argument down one. This is also helpful to distinguish between post type and taxonomy usage of the filter.

comment:4 nacin3 years ago

  • Milestone 3.1 deleted
  • Resolution set to invalid
  • Status changed from reopened to closed

Blamed it to #15285. Reopening that one instead.

Note: See TracTickets for help on using tickets.