[wp-hackers] Proposed change in function the_ID()

Achton N. Netherclift achton at netherclift.net
Thu May 19 21:14:43 GMT 2005


This is a proposed change to the function the_ID() in the file 
wp-includes/template-functions-post.php, which I needed for a couple of 
templates I created.
It simply allows the ID to be returned instead of printed. I adopted the 
coding style from wp_title(), which already has this option.

The change is simply this:

function the_ID($display = true) {
    global $id;
    if ($display) {
        echo $id;
    } elseif (!$display) {
        return $id;
    }
}


Best regards,
Achton.

-- 
http://achton.netherclift.net/



More information about the wp-hackers mailing list