Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#30839 closed defect (bug) (maybelater)

'edit-tags.php' and some others

Reported by: suifengtec's profile suifengtec Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.1
Component: Taxonomy Keywords:
Focuses: administration Cc:

Description

'edit-tags.php' or 'edit-terms.php'

that may be a question.
the current admin screen edit-tags.php is also used to edit the categories,so I think the file for terms edit screen should be named edit-terms.php.

The parameters of 'quick_edit_custom_box'

The action hook quick_edit_custom_box should can be used to extend quick editing for terms(such as category/tag logo or sothing else),but it does not support it now( without a term row parameter ).so I think we should add an parameter( $tag->term_id ) to it.

X'mas!

Change History (4)

#1 @suifengtec
9 years ago

  • Keywords dev-feedback needs-unit-tests added

#2 @joedolson
9 years ago

  • Focuses accessibility removed

#3 follow-up: @boonebgorges
9 years ago

  • Keywords dev-feedback needs-unit-tests removed
  • Milestone Awaiting Review deleted
  • Resolution set to maybelater
  • Status changed from new to closed

Hi suifengtec - Welcome to Trac, and thanks for the suggestions.

the current admin screen edit-tags.php is also used to edit the categories,so I think the file for terms edit screen should be named edit-terms.php.

If we were building WordPress from scratch today, we'd probably go with something like edit-terms.php. But it's not something we can easily change at this point. For one thing, many plugins etc link directly to URLs built using the filename 'edit-tags.php', links that would break if we simply changed the name of the file.

The action hook quick_edit_custom_box should can be used to extend quick editing for terms(such as category/tag logo or sothing else),but it does not support it now( without a term row parameter ).so I think we should add an parameter( $tag->term_id ) to it.

'quick_edit_custom_box' appears in the WP_Terms_List_Table::inline_edit() method. This method builds a single <form> element for the entire list table, which is then moved around the screen and populated with term-specific values using JS. In other words, when the markup is built and the hook fires, there's no way of knowing which specific term it'll be used for - and in fact, it could be used for *any* term on the page. So, if you want to add term-specific fields to Quick Edit, you'll have to use JavaScript to populate the fields. See wp-admin/js/inline-edit-tax.js (especially the edit() function) to see how WP does it.

I'll mark this ticket as 'maybelater' in case we decide at some point in the future to change the filenames of some wp-admin files.

#4 in reply to: ↑ 3 @suifengtec
9 years ago

Replying to boonebgorges:

Hi suifengtec - Welcome to Trac, and thanks for the suggestions.

the current admin screen edit-tags.php is also used to edit the categories,so I think the file for terms edit screen should be named edit-terms.php.

If we were building WordPress from scratch today, we'd probably go with something like edit-terms.php. But it's not something we can easily change at this point. For one thing, many plugins etc link directly to URLs built using the filename 'edit-tags.php', links that would break if we simply changed the name of the file.

The action hook quick_edit_custom_box should can be used to extend quick editing for terms(such as category/tag logo or sothing else),but it does not support it now( without a term row parameter ).so I think we should add an parameter( $tag->term_id ) to it.

'quick_edit_custom_box' appears in the WP_Terms_List_Table::inline_edit() method. This method builds a single <form> element for the entire list table, which is then moved around the screen and populated with term-specific values using JS. In other words, when the markup is built and the hook fires, there's no way of knowing which specific term it'll be used for - and in fact, it could be used for *any* term on the page. So, if you want to add term-specific fields to Quick Edit, you'll have to use JavaScript to populate the fields. See wp-admin/js/inline-edit-tax.js (especially the edit() function) to see how WP does it.

I'll mark this ticket as 'maybelater' in case we decide at some point in the future to change the filenames of some wp-admin files.


thanks!

Note: See TracTickets for help on using tickets.