예제 #1
0
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;
    }
}
예제 #2
0
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";
        }
    }
}