You appear to be a bot. Output may be restricted
Description
Sanitizes Term for editing.
Return value is sanitize_term() and usage is for sanitizing the term for editing. Function is for contextual and simplicity.
Usage
$string|int|null|WP_Error = get_term_to_edit( $id, $taxonomy );
Parameters
- $id
- ( int|object ) required – Term ID or object.
- $taxonomy
- ( string ) required – Taxonomy name.
Returns
string|int|null|WP_Error Will return empty string if $term is not an object.
Source
File name: wordpress/wp-includes/taxonomy.php
Lines:
1 to 13 of 13
function get_term_to_edit( $id, $taxonomy ) { $term = get_term( $id, $taxonomy ); if ( is_wp_error( $term ) ) { return $term; } if ( ! is_object( $term ) ) { return ''; } return sanitize_term( $term, $taxonomy, 'edit' ); }