[wp-hackers] Idea for comments.php
Roland Haeder
webmaster at mxchange.org
Mon Oct 2 23:26:45 GMT 2006
On Tuesday, 3. October 2006 01:15, Owen Winkler wrote:
> Dumping javascript into the page to run as it's downloaded might not be
> the best idea, especially since I've provided an example of how to do it
> well, but here you go:
>
>
> add_action('comment_form', 'my_php_function', 1);
>
> function my_php_function($postid) {
> echo "Post ID: {$postid}";
> }
>
>
> This hook is already in the default theme's template code. See
> comments.php.
I mean a hook inside the <form> tag itself like:
<form <?php do_action('comment_form_tag', $post->ID); ?> action=".......>
So everyone can choose to add onSubmit and/or onReset to it or not. :-)
Roland
--
(GNU) PGP ID: 0x8C8859B9
Weblog:
http://blog.mxchange.org
More information about the wp-hackers
mailing list