Opened 5 years ago
Closed 5 years ago
#49808 closed defect (bug) (fixed)
WordPress 5.4: Deprecated: tag_row_actions is deprecated since version 3.0.0
Reported by: | delowardev | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.4.2 | Priority: | normal |
Severity: | normal | Version: | 5.4 |
Component: | Taxonomy | Keywords: | has-patch fixed-major |
Focuses: | Cc: |
Description
I'm getting a warning on the Category page after installing WordPress 5.4
Deprecated: tag_row_actions is deprecated since version 3.0.0! Use {$taxonomy}_row_actions instead. in /PATH/wp-includes/functions.php on line 5088
Attachments (2)
Change History (13)
#1
@
5 years ago
- Keywords close added
Hi there, welcome to WordPress Trac! Thanks for the report.
The deprecated hook message is only displayed if you have any functions in your plugins or theme specifically hooked to the deprecated tag_row_actions
filter. As noted in the message, those instances should be updated to use {$taxonomy}_row_actions
instead (e.g. post_tag_row_actions
or category_row_actions
), where $taxonomy
refers to the taxonomy slug.
#2
@
5 years ago
Buenas tardes tengo el mismo problema y quisiera saber paso a paso como resolverlo. La contestación al compañero no me quedo clara. Cuales son los .php que habría que modificar y como se ecribiría la linea para no afectar el php.
El problema lo tengo con entradas de plugins y del theme. Mismo mensaje.
Deprecated: tag_row_actions ha quedado obsoleto desde la versión 3.0.0. Utiliza {$taxonomy}_row_actions en su lugar. in C:\xampp\htdocs\p_uno\wp-includes\functions.php on line 5088
Gracias.
#4
follow-up:
↓ 5
@
5 years ago
- Keywords 2nd-opinion added; close removed
Officially deprecating this filter shows that there isn't a simple way for plugin authors to add actions generically for all taxonomy list tables without looping through each taxonomy individually. I think we should either reinstate this action or add a new generic action, like taxonomy_row_actions
that can be used instead.
For comparison, there are generic actions for post list tables that can be used for hierarchical (and non-hierarchical posts. See: https://core.trac.wordpress.org/browser/tags/5.4/src/wp-admin/includes/class-wp-posts-list-table.php#L1417.
#5
in reply to:
↑ 4
@
5 years ago
- Keywords needs-patch added; 2nd-opinion removed
- Milestone changed from Awaiting Review to 5.4.2
Replying to joemcgill:
Officially deprecating this filter shows that there isn't a simple way for plugin authors to add actions generically for all taxonomy list tables without looping through each taxonomy individually. I think we should either reinstate this action or add a new generic action, like
taxonomy_row_actions
that can be used instead.
Thanks for bringing this up!
For some context, category_link
and tag_link
filters were accidentally deprecated in [27827] / #27505 and reinstated for WordPress 5.4.1 in #49759.
This looks like another instance of accidental deprecation in [27089] / #26209.
Let's reinstate the tag_row_actions
filter.
#6
@
5 years ago
- Keywords has-patch added; needs-patch removed
Thanks @SergeyBiryukov. I've uploaded 49808.diff that should reinstate the former behavior and remove the deprecation comment. Does that look right to you?
#7
@
5 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from assigned to closed
In 47734:
#8
follow-up:
↓ 9
@
5 years ago
- Keywords fixed-major added
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening for 5.4.2 consideration.
#9
in reply to:
↑ 8
;
follow-up:
↓ 10
@
5 years ago
Replying to SergeyBiryukov:
Reopening for 5.4.2 consideration.
Entonces en que situación quedan estos mensajes de error, ya que se siguen visualizando, que debemos hacer exactamente. Gracias por cualquier ayuda. Saludos!
#10
in reply to:
↑ 9
@
5 years ago
Replying to kikito123:
Entonces en que situación quedan estos mensajes de error, ya que se siguen visualizando, que debemos hacer exactamente. Gracias por cualquier ayuda. Saludos!
Hola @kikito123
Perdón por mi traducción. Para solucionar este error por ahora, debe encontrar el código que se ve así:
add_filter( 'tag_row_actions', 'some_function_name' );
Y reemplácelo con un código que se vea así:
foreach ( get_taxonomies() as $taxonomy ) {
add_filter( "${taxonomy}_row_actions", 'some_function_name' );
}
Screenshot: