Function: get_term_to_edit

get_term_to_edit( integer | object $id, string $taxonomy )

Sanitizes Term for editing.

Shortcut: gtte

You can use above key combination to trigger the associated snippet for this function in the WordPress Snippets for Visual Studio Code extension. You can also use this shortcut to search for this function on this website.

Return value is sanitize_term() and usage is for sanitizing the term for editing. Function is for contextual and simplicity.

Parameters

Name Type(s) Default Value Description
$id integer | object

Term ID or object.

$taxonomy string

Taxonomy name.

Returns

string | integer | null | WP_Error

Will return empty string if $term is not an object.

WordPress Developer Newsletter

Stay informed of new chapter releases, important WordPress API updates and more.