Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




get_term_to_edit [ WordPress Function ]

get_term_to_edit ( $id, $taxonomy )
Parameters:
  • (int|object) $id Term ID or Object
  • (string) $taxonomy Taxonomy Name
Uses:
Returns:
  • (mixed|null|WP_Error) Will return empty string if $term is not an object.
Defined at:



Sanitizes Term for editing.

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

Source


<?php
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');
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics