wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.
get_linkcatname is deprecated since version 2.1.0!
Alternative: get_category()
Alternative: get_category()
get_linkcatname › WordPress Function
Od0.71
Przestarzały2.1.0
› get_linkcatname ( $id = 0 )
| Parametry: |
|
| Zobacz: | |
| Powrót: |
|
| Zdefiniowane na: |
|
| Codex: |
Gets the name of category by ID.
Powiązane Funkcje: get_catname, get_cat_name, get_linksbyname, get_linkobjectsbyname, get_linkrating
Źródło
function get_linkcatname($id = 0) {
_deprecated_function( __FUNCTION__, '2.1.0', 'get_category()' );
$id = (int) $id;
if ( empty($id) )
return '';
$cats = wp_get_link_cats($id);
if ( empty($cats) || ! is_array($cats) )
return '';
$cat_id = (int) $cats[0]; // Take the first cat.
$cat = get_category($cat_id);
return $cat->name;
}