Skip to content

Commit

Permalink
Remove filter upon unregistering taxonomy
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Nov 21, 2024
1 parent d156b98 commit b525718
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/compat/wordpress-6.8/rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,9 @@ function ( $taxonomy ) {
add_filter( "rest_{$taxonomy}_query", 'gutenberg_respect_taxonomy_default_args_in_rest_api' );
}
);
add_action(
'unregistered_taxonomy',
function ( $taxonomy ) {
remove_filter( "rest_{$taxonomy}_query", 'gutenberg_respect_taxonomy_default_args_in_rest_api' );
}
);

0 comments on commit b525718

Please sign in to comment.