Make WordPress Core

Changeset 30649


Ignore:
Timestamp:
11/30/2014 11:42:00 AM (10 years ago)
Author:
DrewAPicture
Message:

Docs Formatting: Backtick-escape inline code for all dynamic hook docs in wp-admin/*.

Also includes some changes to move hook docs to directly precede hook lines. This is necessary to prevent DocBlock-matching confusion when core is parsed.

Affects DocBlocks for the following hooks:

  • wp_ajax_ . $_REQUEST['action']
  • wp_ajax_nopriv_ . $_REQUEST['action']
  • admin_footer- . $GLOBALS['hook_suffix']
  • admin_head-$hook_suffix
  • admin_post_nopriv_{$action}
  • admin_post_{$action}
  • load- . $page_hook
  • load- . $plugin_page
  • load-importer- . $importer
  • load- . $pagenow
  • admin_action_ . $_REQUEST['action']
  • async_upload_{$type}
  • add_meta_boxes_ . $post_type
  • {$taxonomy}_pre_edit_form
  • {$taxonomy}_term_edit_form_tag
  • {$taxonomy}_edit_form_fields
  • {$taxonomy}_edit_form
  • after-{$taxonomy}-table
  • {$taxonomy}_pre_add_form
  • {$taxonomy}_term_new_form_tag
  • {$taxonomy}_add_form_fields
  • {$taxonomy}_add_form
  • media_upload_$type
  • media_upload_$tab
  • install_plugins_pre_$tab
  • install_plugins_$tab
  • install_themes_pre_{$tab}
  • install_themes_{$tab}
  • update-core-custom_{$action}
  • update-custom_{$action}
  • user_{$name}_label

See #30552.

Location:
trunk/src/wp-admin
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/admin-ajax.php

    r30333 r30649  
    7878     * Fires authenticated AJAX actions for logged-in users.
    7979     *
    80      * The dynamic portion of the hook name, $_REQUEST['action'],
     80     * The dynamic portion of the hook name, `$_REQUEST['action']`,
    8181     * refers to the name of the AJAX action callback being fired.
    8282     *
     
    8888     * Fires non-authenticated AJAX actions for logged-out users.
    8989     *
    90      * The dynamic portion of the hook name, $_REQUEST['action'],
     90     * The dynamic portion of the hook name, `$_REQUEST['action']`,
    9191     * refers to the name of the AJAX action callback being fired.
    9292     *
  • trunk/src/wp-admin/admin-footer.php

    r27469 r30649  
    7777 * Print scripts or data after the default footer scripts.
    7878 *
    79  * The dynamic portion of the hook name, $GLOBALS['hook_suffix'],
     79 * The dynamic portion of the hook name, `$GLOBALS['hook_suffix']`,
    8080 * refers to the global hook suffix of the current page.
    8181 *
  • trunk/src/wp-admin/admin-post.php

    r28478 r30649  
    4343         * Fires on a non-authenticated admin post request for the given action.
    4444         *
    45          * The dynamic portion of the hook name, $action, refers to the given
     45         * The dynamic portion of the hook name, `$action`, refers to the given
    4646         * request action.
    4747         *
     
    6262         * Fires on an authenticated admin post request for the given action.
    6363         *
    64          * The dynamic portion of the hook name, $action, refers to the given
     64         * The dynamic portion of the hook name, `$action`, refers to the given
    6565         * request action.
    6666         *
  • trunk/src/wp-admin/admin.php

    r29206 r30649  
    186186         * where a callback is provided when the screen is registered.
    187187         *
    188          * The dynamic portion of the hook name, $page_hook, refers to a mixture of plugin
     188         * The dynamic portion of the hook name, `$page_hook`, refers to a mixture of plugin
    189189         * page information including:
    190190         * 1. The page type. If the plugin page is registered as a submenu page, such as for
     
    193193         * 3. The plugin basename minus the file extension.
    194194         *
    195          * Together, the three parts form the $page_hook. Citing the example above,
     195         * Together, the three parts form the `$page_hook`. Citing the example above,
    196196         * the hook name used would be 'load-settings_page_pluginbasename'.
    197197         *
     
    224224         * where the file to load is directly included, rather than the use of a function.
    225225         *
    226          * The dynamic portion of the hook name, $plugin_page, refers to the plugin basename.
     226         * The dynamic portion of the hook name, `$plugin_page`, refers to the plugin basename.
    227227         *
    228228         * @see plugin_basename()
     
    264264     * Fires before an importer screen is loaded.
    265265     *
    266      * The dynamic portion of the hook name, $importer, refers to the importer slug.
     266     * The dynamic portion of the hook name, `$importer`, refers to the importer slug.
    267267     *
    268268     * @since 3.5.0
     
    309309     * The load-* hook fires in a number of contexts. This hook is for core screens.
    310310     *
    311      * The dynamic portion of the hook name, $pagenow, is a global variable
     311     * The dynamic portion of the hook name, `$pagenow`, is a global variable
    312312     * referring to the filename of the current page, such as 'admin.php',
    313313     * 'post-new.php' etc. A complete hook for the latter would be
     
    339339     * Fires when an 'action' request variable is sent.
    340340     *
    341      * The dynamic portion of the hook name, $_REQUEST['action'],
    342      * refers to the action derived from the GET or POST request.
     341     * The dynamic portion of the hook name, `$_REQUEST['action']`,
     342     * refers to the action derived from the `GET` or `POST` request.
    343343     *
    344344     * @since 2.6.0
  • trunk/src/wp-admin/async-upload.php

    r30354 r30649  
    105105     * Filter the returned ID of an uploaded attachment.
    106106     *
    107      * The dynamic portion of the hook name, $type, refers to the attachment type,
     107     * The dynamic portion of the hook name, `$type`, refers to the attachment type,
    108108     * such as 'image', 'audio', 'video', 'file', etc.
    109109     *
  • trunk/src/wp-admin/edit-form-advanced.php

    r30643 r30649  
    245245 * Fires after all built-in meta boxes have been added, contextually for the given post type.
    246246 *
    247  * The dynamic portion of the hook, $post_type, refers to the post type of the post.
     247 * The dynamic portion of the hook, `$post_type`, refers to the post type of the post.
    248248 *
    249249 * @since 3.0.0
  • trunk/src/wp-admin/edit-tag-form.php

    r29821 r30649  
    5252 * Fires before the Edit Term form for all taxonomies.
    5353 *
    54  * The dynamic portion of the hook name, $taxonomy, refers to
     54 * The dynamic portion of the hook name, `$taxonomy`, refers to
    5555 * the taxonomy slug.
    5656 *
     
    6565<h2><?php echo $tax->labels->edit_item; ?></h2>
    6666<div id="ajax-response"></div>
     67<form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate"
    6768<?php
    6869/**
    6970 * Fires inside the Edit Term form tag.
    7071 *
    71  * The dynamic portion of the hook name, $taxonomy, refers to
     72 * The dynamic portion of the hook name, `$taxonomy`, refers to
    7273 * the taxonomy slug.
    7374 *
    7475 * @since 3.7.0
    7576 */
    76 ?>
    77 <form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate"<?php do_action( "{$taxonomy}_term_edit_form_tag" ); ?>>
     77do_action( "{$taxonomy}_term_edit_form_tag" );
     78?>>
    7879<input type="hidden" name="action" value="editedtag" />
    7980<input type="hidden" name="tag_ID" value="<?php echo esc_attr($tag->term_id) ?>" />
     
    154155         * Fires after the Edit Term form fields are displayed.
    155156         *
    156          * The dynamic portion of the hook name, $taxonomy, refers to
     157         * The dynamic portion of the hook name, `$taxonomy`, refers to
    157158         * the taxonomy slug.
    158159         *
     
    187188 * Fires at the end of the Edit Term form for all taxonomies.
    188189 *
    189  * The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug.
     190 * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
    190191 *
    191192 * @since 3.0.0
  • trunk/src/wp-admin/edit-tags.php

    r30356 r30649  
    352352 * Fires after the taxonomy list table.
    353353 *
    354  * The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug.
     354 * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
    355355 *
    356356 * @since 3.0.0
     
    421421     * Fires before the Add Term form for all taxonomies.
    422422     *
    423      * The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug.
     423     * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
    424424     *
    425425     * @since 3.0.0
     
    432432<div class="form-wrap">
    433433<h3><?php echo $tax->labels->add_new_item; ?></h3>
     434<form id="addtag" method="post" action="edit-tags.php" class="validate"
    434435<?php
    435436/**
    436437 * Fires at the beginning of the Add Tag form.
    437438 *
    438  * The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug.
     439 * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
    439440 *
    440441 * @since 3.7.0
    441442 */
    442 ?>
    443 <form id="addtag" method="post" action="edit-tags.php" class="validate"<?php do_action( "{$taxonomy}_term_new_form_tag" ); ?>>
     443do_action( "{$taxonomy}_term_new_form_tag" );
     444?>>
    444445<input type="hidden" name="action" value="add-tag" />
    445446<input type="hidden" name="screen" value="<?php echo esc_attr($current_screen->id); ?>" />
     
    522523 * Fires after the Add Term form fields for hierarchical taxonomies.
    523524 *
    524  * The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug.
     525 * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
    525526 *
    526527 * @since 3.0.0
     
    567568 * Fires at the end of the Add Term form for all taxonomies.
    568569 *
    569  * The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug.
     570 * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
    570571 *
    571572 * @since 3.0.0
  • trunk/src/wp-admin/media-upload.php

    r30356 r30649  
    7575         * media popup based on the current tab.
    7676         *
    77          * The dynamic portion of the hook name, $type, refers to the specific
     77         * The dynamic portion of the hook name, `$type`, refers to the specific
    7878         * media upload type. Possible values include 'image', 'audio', 'video',
    7979         * 'file', etc.
    8080         *
    81          * The hook only fires if the current $tab is 'type' (From Computer),
     81         * The hook only fires if the current `$tab` is 'type' (From Computer),
    8282         * 'type_url' (From URL), or, if the tab does not exist (i.e., has not
    83          * been registered via the 'media_upload_tabs' filter.
     83         * been registered via the {@see 'media_upload_tabs'} filter.
    8484         *
    8585         * @since 2.5.0
     
    9191         * (pre-3.5.0) media popup.
    9292         *
    93          * The dynamic portion of the hook name, $tab, refers to the specific
     93         * The dynamic portion of the hook name, `$tab`, refers to the specific
    9494         * media upload tab. Possible values include 'library' (Media Library),
    95          * or any custom tab registered via the 'media_upload_tabs' filter.
     95         * or any custom tab registered via the {@see 'media_upload_tabs'} filter.
    9696         *
    9797         * @since 2.5.0
  • trunk/src/wp-admin/plugin-install.php

    r29829 r30649  
    5858 * Fires before each tab on the Install Plugins screen is loaded.
    5959 *
    60  * The dynamic portion of the action hook, $tab, allows for targeting
     60 * The dynamic portion of the action hook, `$tab`, allows for targeting
    6161 * individual tabs, for instance 'install_plugins_pre_plugin-information'.
    6262 *
     
    118118 * Fires after the plugins list table in each tab of the Install Plugins screen.
    119119 *
    120  * The dynamic portion of the action hook, $tab, allows for targeting
     120 * The dynamic portion of the action hook, `$tab`, allows for targeting
    121121 * individual tabs, for instance 'install_plugins_plugin-information'.
    122122 *
     
    125125 * @param int $paged The current page number of the plugins list table.
    126126 */
    127 ?>
    128 <?php do_action( "install_plugins_$tab", $paged ); ?>
     127do_action( "install_plugins_$tab", $paged ); ?>
    129128</div>
    130129<?php
  • trunk/src/wp-admin/theme-install.php

    r29959 r30649  
    5656wp_enqueue_script( 'theme' );
    5757
    58 /**
    59  * Fires before each of the tabs are rendered on the Install Themes page.
    60  *
    61  * The dynamic portion of the hook name, $tab, refers to the current
    62  * theme install tab. Possible values are 'dashboard', 'search', 'upload',
    63  * 'featured', 'new', or 'updated'.
    64  *
    65  * @since 2.8.0
    66  */
    6758if ( $tab ) {
     59    /**
     60     * Fires before each of the tabs are rendered on the Install Themes page.
     61     *
     62     * The dynamic portion of the hook name, `$tab`, refers to the current
     63     * theme install tab. Possible values are 'dashboard', 'search', 'upload',
     64     * 'featured', 'new', or 'updated'.
     65     *
     66     * @since 2.8.0
     67     */
    6868    do_action( "install_themes_pre_{$tab}" );
    6969}
     
    178178    <br class="clear" />
    179179<?php
    180 /**
    181  * Fires at the top of each of the tabs on the Install Themes page.
    182  *
    183  * The dynamic portion of the hook name, $tab, refers to the current
    184  * theme install tab. Possible values are 'dashboard', 'search', 'upload',
    185  * 'featured', 'new', or 'updated'.
    186  *
    187  * @since 2.8.0
    188  *
    189  * @param int $paged Number of the current page of results being viewed.
    190  */
    191180if ( $tab ) {
     181    /**
     182     * Fires at the top of each of the tabs on the Install Themes page.
     183     *
     184     * The dynamic portion of the hook name, `$tab`, refers to the current
     185     * theme install tab. Possible values are 'dashboard', 'search', 'upload',
     186     * 'featured', 'new', or 'updated'.
     187     *
     188     * @since 2.8.0
     189     *
     190     * @param int $paged Number of the current page of results being viewed.
     191     */
    192192    do_action( "install_themes_{$tab}", $paged );
    193193}
  • trunk/src/wp-admin/update-core.php

    r30384 r30649  
    650650     * Fires for each custom update action on the WordPress Updates screen.
    651651     *
    652      * The dynamic portion of the hook name, $action, refers to the
     652     * The dynamic portion of the hook name, `$action`, refers to the
    653653     * passed update action. The hook fires in lieu of all available
    654654     * default update actions.
  • trunk/src/wp-admin/update.php

    r29634 r30649  
    262262         * Fires when a custom plugin or theme update request is received.
    263263         *
    264          * The dynamic portion of the hook name, $action, refers to the action
     264         * The dynamic portion of the hook name, `$action`, refers to the action
    265265         * provided in the request for wp-admin/update.php. Can be used to
    266266         * provide custom update functionality for themes and plugins.
  • trunk/src/wp-admin/user-edit.php

    r30632 r30649  
    437437?>
    438438<tr class="user-<?php echo $name; ?>-wrap">
    439     <?php
    440     /**
    441      * Filter a user contactmethod label.
    442      *
    443      * The dynamic portion of the filter hook, $name, refers to
    444      * each of the keys in the contactmethods array.
    445      *
    446      * @since 2.9.0
    447      *
    448      * @param string $desc The translatable label for the contactmethod.
    449      */
    450     ?>
    451     <th><label for="<?php echo $name; ?>"><?php echo apply_filters( "user_{$name}_label", $desc ); ?></label></th>
     439    <th><label for="<?php echo $name; ?>">
     440        <?php
     441        /**
     442         * Filter a user contactmethod label.
     443         *
     444         * The dynamic portion of the filter hook, `$name`, refers to
     445         * each of the keys in the contactmethods array.
     446         *
     447         * @since 2.9.0
     448         *
     449         * @param string $desc The translatable label for the contactmethod.
     450         */
     451        echo apply_filters( "user_{$name}_label", $desc );
     452        ?>
     453    </label></th>
    452454    <td><input type="text" name="<?php echo $name; ?>" id="<?php echo $name; ?>" value="<?php echo esc_attr($profileuser->$name) ?>" class="regular-text" /></td>
    453455</tr>
Note: See TracChangeset for help on using the changeset viewer.