[wp-trac] [WordPress Trac] #25229: Add Inline Docs for Hooks

WordPress Trac noreply at wordpress.org
Thu Sep 12 00:49:56 UTC 2013


#25229: Add Inline Docs for Hooks
----------------------------+------------------
 Reporter:  rzen            |       Owner:
     Type:  task (blessed)  |      Status:  new
 Priority:  normal          |   Milestone:  3.7
Component:  Inline Docs     |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |
----------------------------+------------------

Comment (by bftrick):

 Question. If a hook is in the middle of a block of HTML do you comment
 above the html or inside of it? I assume above it as it would be cleaner.

 Ex. wp-admin/user-new.php
 {{{
 <form action="" method="post" name="adduser" id="adduser"
 class="validate"<?php do_action('user_new_form_tag');?>>
 }}}

 Another question. What if the hook is embedded in a long conditional?

 {{{
 if ( is_multisite() && current_user_can( 'promote_users' ) && !
 wp_is_large_network( 'users' )
         && ( is_super_admin() || apply_filters(
 'autocomplete_users_for_site_admins', false ) )
 ) {
         wp_enqueue_script( 'user-suggest' );
 }
 }}}

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25229#comment:34>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list