Switch language

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




wp_set_link_cats [ WordPress Function ]

wp_set_link_cats ( $link_id = 0, $link_categories = array() )
Parameters:
  • (int) $link_id ID of link to update
  • (array) $link_categories Array of categories to
Defined at:



Update link with the specified link categories.

Source


<?php
function wp_set_link_cats$link_id 0$link_categories = array() ) {
    
// If $link_categories isn't already an array, make it one:
    
if ( !is_array$link_categories ) || == count$link_categories ) )
        
$link_categories = array( get_option'default_link_category' ) );

    
$link_categories array_map'intval'$link_categories );
    
$link_categories array_unique$link_categories );

    
wp_set_object_terms$link_id$link_categories'link_category' );

    
clean_bookmark_cache$link_id );
}
?>

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