Replace get_the_category() with get_the_categories(). Props filosofo. Fixes #15407

git-svn-id: http://svn.automattic.com/wordpress/trunk@16332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
scribu
2010-11-12 20:05:37 +00:00
parent 18116f12c6
commit 98cda5bd65
7 changed files with 31 additions and 31 deletions

View File

@@ -119,7 +119,7 @@ function get_permalink($id = 0, $leavename = false) {
$category = '';
if ( strpos($permalink, '%category%') !== false ) {
$cats = get_the_category($post->ID);
$cats = get_the_categories($post->ID);
if ( $cats ) {
usort($cats, '_usort_terms_by_ID'); // order by ID
$category = $cats[0]->slug;