function formatPermalinkSlug($id, $text) { global $permalink_format; switch ($permalink_format) { case 'combo': return $id . '-' . removeWeirdChars($text); case 'text': return removeWeirdChars($text); case 'id': default: return $id; } }
function getTags($post) { global $tumblr; if ($post->attributes()->type) { echo " <category scheme=\"{$tumblr}\" term=\"" . $post->attributes()->type . "\"/>\n"; } if ($post->tag) { foreach ($post->tag as $tag) { echo " <category scheme=\"{$tumblr}\" term=\"" . removeWeirdChars($tag) . "\"/>\n"; } } }