[wp-hackers] Proposed change in function the_ID()
Robert Deaton
false.hopes at gmail.com
Thu May 19 23:12:35 GMT 2005
get_the_ID()
On 5/19/05, Achton N. Netherclift <achton at netherclift.net> wrote:
>
>
> 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/
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
--
--Robert Deaton
http://somethingunpredictable.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://comox.textdrive.com/pipermail/wp-hackers/attachments/20050519/5c85c495/attachment-0001.html
More information about the wp-hackers
mailing list