wp_show_attachments attach which alignWhat it does:
Searches through $attach, a list of id/file_size/file_name/display lists, for items where display = $which, and displays them aligned right or center or linked.Defined in: /web/philip/tcl/wp-defs.tcl
Source code:
set out ""
foreach item $attach {
if { [lindex $item 3] == $which } {
if { $align == "link" } {
if { $out != "" } {
append out " / "
}
append out "<a href=\"[wp_attach_url]/[lindex $item 0]/[philg_quote_double_quotes [lindex $item 2]]\">[philg_quote_double_quotes [lindex $item 2]]
([expr { [lindex $item 1] / 1024 }]K)</a>"
} else {
if { $align == "center" } {
append out "<center>"
}
append out "<img src=\"[wp_attach_url]/[lindex $item 0]/[philg_quote_double_quotes [lindex $item 2]]\""
if { $align == "right" } {
append out " align=right>\n"
} else {
append out "></center>\n"
}
}
}
}
if { $align == "link" && $out != "" } {
append out "<p>\n"
}
return $out