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.

Built from https://develop.svn.wordpress.org/trunk@30649


git-svn-id: http://core.svn.wordpress.org/trunk@30639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes 2014-11-30 11:42:24 +00:00
parent 78bb3e5ff5
commit 2faf449f51
15 changed files with 75 additions and 72 deletions

View File

@ -77,7 +77,7 @@ if ( is_user_logged_in() ) {
/**
* Fires authenticated AJAX actions for logged-in users.
*
* The dynamic portion of the hook name, $_REQUEST['action'],
* The dynamic portion of the hook name, `$_REQUEST['action']`,
* refers to the name of the AJAX action callback being fired.
*
* @since 2.1.0
@ -87,7 +87,7 @@ if ( is_user_logged_in() ) {
/**
* Fires non-authenticated AJAX actions for logged-out users.
*
* The dynamic portion of the hook name, $_REQUEST['action'],
* The dynamic portion of the hook name, `$_REQUEST['action']`,
* refers to the name of the AJAX action callback being fired.
*
* @since 2.8.0

View File

@ -76,7 +76,7 @@ do_action( 'admin_print_footer_scripts' );
/**
* Print scripts or data after the default footer scripts.
*
* The dynamic portion of the hook name, $GLOBALS['hook_suffix'],
* The dynamic portion of the hook name, `$GLOBALS['hook_suffix']`,
* refers to the global hook suffix of the current page.
*
* @since 2.8.0

View File

@ -42,7 +42,7 @@ if ( ! wp_validate_auth_cookie() ) {
/**
* Fires on a non-authenticated admin post request for the given action.
*
* The dynamic portion of the hook name, $action, refers to the given
* The dynamic portion of the hook name, `$action`, refers to the given
* request action.
*
* @since 2.6.0
@ -61,7 +61,7 @@ if ( ! wp_validate_auth_cookie() ) {
/**
* Fires on an authenticated admin post request for the given action.
*
* The dynamic portion of the hook name, $action, refers to the given
* The dynamic portion of the hook name, `$action`, refers to the given
* request action.
*
* @since 2.6.0

View File

@ -185,14 +185,14 @@ if ( isset($plugin_page) ) {
* The load-* hook fires in a number of contexts. This hook is for plugin screens
* where a callback is provided when the screen is registered.
*
* The dynamic portion of the hook name, $page_hook, refers to a mixture of plugin
* The dynamic portion of the hook name, `$page_hook`, refers to a mixture of plugin
* page information including:
* 1. The page type. If the plugin page is registered as a submenu page, such as for
* Settings, the page type would be 'settings'. Otherwise the type is 'toplevel'.
* 2. A separator of '_page_'.
* 3. The plugin basename minus the file extension.
*
* Together, the three parts form the $page_hook. Citing the example above,
* Together, the three parts form the `$page_hook`. Citing the example above,
* the hook name used would be 'load-settings_page_pluginbasename'.
*
* @see get_plugin_page_hook()
@ -223,7 +223,7 @@ if ( isset($plugin_page) ) {
* The load-* hook fires in a number of contexts. This hook is for plugin screens
* where the file to load is directly included, rather than the use of a function.
*
* The dynamic portion of the hook name, $plugin_page, refers to the plugin basename.
* The dynamic portion of the hook name, `$plugin_page`, refers to the plugin basename.
*
* @see plugin_basename()
*
@ -263,7 +263,7 @@ if ( isset($plugin_page) ) {
/**
* Fires before an importer screen is loaded.
*
* The dynamic portion of the hook name, $importer, refers to the importer slug.
* The dynamic portion of the hook name, `$importer`, refers to the importer slug.
*
* @since 3.5.0
*/
@ -308,7 +308,7 @@ if ( isset($plugin_page) ) {
*
* The load-* hook fires in a number of contexts. This hook is for core screens.
*
* The dynamic portion of the hook name, $pagenow, is a global variable
* The dynamic portion of the hook name, `$pagenow`, is a global variable
* referring to the filename of the current page, such as 'admin.php',
* 'post-new.php' etc. A complete hook for the latter would be
* 'load-post-new.php'.
@ -338,8 +338,8 @@ if ( ! empty( $_REQUEST['action'] ) ) {
/**
* Fires when an 'action' request variable is sent.
*
* The dynamic portion of the hook name, $_REQUEST['action'],
* refers to the action derived from the GET or POST request.
* The dynamic portion of the hook name, `$_REQUEST['action']`,
* refers to the action derived from the `GET` or `POST` request.
*
* @since 2.6.0
*/

View File

@ -104,7 +104,7 @@ if ( $_REQUEST['short'] ) {
/**
* Filter the returned ID of an uploaded attachment.
*
* The dynamic portion of the hook name, $type, refers to the attachment type,
* The dynamic portion of the hook name, `$type`, refers to the attachment type,
* such as 'image', 'audio', 'video', 'file', etc.
*
* @since 2.5.0

View File

@ -244,7 +244,7 @@ do_action( 'add_meta_boxes', $post_type, $post );
/**
* Fires after all built-in meta boxes have been added, contextually for the given post type.
*
* The dynamic portion of the hook, $post_type, refers to the post type of the post.
* The dynamic portion of the hook, `$post_type`, refers to the post type of the post.
*
* @since 3.0.0
*

View File

@ -51,7 +51,7 @@ if ( 'category' == $taxonomy ) {
/**
* Fires before the Edit Term form for all taxonomies.
*
* The dynamic portion of the hook name, $taxonomy, refers to
* The dynamic portion of the hook name, `$taxonomy`, refers to
* the taxonomy slug.
*
* @since 3.0.0
@ -64,17 +64,18 @@ do_action( "{$taxonomy}_pre_edit_form", $tag, $taxonomy ); ?>
<div class="wrap">
<h2><?php echo $tax->labels->edit_item; ?></h2>
<div id="ajax-response"></div>
<form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate"
<?php
/**
* Fires inside the Edit Term form tag.
*
* The dynamic portion of the hook name, $taxonomy, refers to
* The dynamic portion of the hook name, `$taxonomy`, refers to
* the taxonomy slug.
*
* @since 3.7.0
*/
?>
<form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate"<?php do_action( "{$taxonomy}_term_edit_form_tag" ); ?>>
do_action( "{$taxonomy}_term_edit_form_tag" );
?>>
<input type="hidden" name="action" value="editedtag" />
<input type="hidden" name="tag_ID" value="<?php echo esc_attr($tag->term_id) ?>" />
<input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy) ?>" />
@ -153,7 +154,7 @@ do_action( "{$taxonomy}_pre_edit_form", $tag, $taxonomy ); ?>
/**
* Fires after the Edit Term form fields are displayed.
*
* The dynamic portion of the hook name, $taxonomy, refers to
* The dynamic portion of the hook name, `$taxonomy`, refers to
* the taxonomy slug.
*
* @since 3.0.0
@ -186,7 +187,7 @@ if ( 'category' == $taxonomy ) {
/**
* Fires at the end of the Edit Term form for all taxonomies.
*
* The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug.
* The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
*
* @since 3.0.0
*

View File

@ -351,7 +351,7 @@ endif; ?>
/**
* Fires after the taxonomy list table.
*
* The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug.
* The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
*
* @since 3.0.0
*
@ -420,7 +420,7 @@ if ( current_user_can($tax->cap->edit_terms) ) {
/**
* Fires before the Add Term form for all taxonomies.
*
* The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug.
* The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
*
* @since 3.0.0
*
@ -431,16 +431,17 @@ if ( current_user_can($tax->cap->edit_terms) ) {
<div class="form-wrap">
<h3><?php echo $tax->labels->add_new_item; ?></h3>
<form id="addtag" method="post" action="edit-tags.php" class="validate"
<?php
/**
* Fires at the beginning of the Add Tag form.
*
* The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug.
* The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
*
* @since 3.7.0
*/
?>
<form id="addtag" method="post" action="edit-tags.php" class="validate"<?php do_action( "{$taxonomy}_term_new_form_tag" ); ?>>
do_action( "{$taxonomy}_term_new_form_tag" );
?>>
<input type="hidden" name="action" value="add-tag" />
<input type="hidden" name="screen" value="<?php echo esc_attr($current_screen->id); ?>" />
<input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
@ -521,7 +522,7 @@ if ( ! is_taxonomy_hierarchical( $taxonomy ) ) {
/**
* Fires after the Add Term form fields for hierarchical taxonomies.
*
* The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug.
* The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
*
* @since 3.0.0
*
@ -566,7 +567,7 @@ if ( 'category' == $taxonomy ) {
/**
* Fires at the end of the Add Term form for all taxonomies.
*
* The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug.
* The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
*
* @since 3.0.0
*

View File

@ -74,13 +74,13 @@ if ( isset($action) && $action == 'edit' && !$ID )
* Fires inside specific upload-type views in the legacy (pre-3.5.0)
* media popup based on the current tab.
*
* The dynamic portion of the hook name, $type, refers to the specific
* The dynamic portion of the hook name, `$type`, refers to the specific
* media upload type. Possible values include 'image', 'audio', 'video',
* 'file', etc.
*
* The hook only fires if the current $tab is 'type' (From Computer),
* The hook only fires if the current `$tab` is 'type' (From Computer),
* 'type_url' (From URL), or, if the tab does not exist (i.e., has not
* been registered via the 'media_upload_tabs' filter.
* been registered via the {@see 'media_upload_tabs'} filter.
*
* @since 2.5.0
*/
@ -90,9 +90,9 @@ if ( isset($action) && $action == 'edit' && !$ID )
* Fires inside limited and specific upload-tab views in the legacy
* (pre-3.5.0) media popup.
*
* The dynamic portion of the hook name, $tab, refers to the specific
* The dynamic portion of the hook name, `$tab`, refers to the specific
* media upload tab. Possible values include 'library' (Media Library),
* or any custom tab registered via the 'media_upload_tabs' filter.
* or any custom tab registered via the {@see 'media_upload_tabs'} filter.
*
* @since 2.5.0
*/

View File

@ -57,7 +57,7 @@ $body_id = $tab;
/**
* Fires before each tab on the Install Plugins screen is loaded.
*
* The dynamic portion of the action hook, $tab, allows for targeting
* The dynamic portion of the action hook, `$tab`, allows for targeting
* individual tabs, for instance 'install_plugins_pre_plugin-information'.
*
* @since 2.7.0
@ -117,15 +117,14 @@ if ( $tab !== 'upload' ) {
/**
* Fires after the plugins list table in each tab of the Install Plugins screen.
*
* The dynamic portion of the action hook, $tab, allows for targeting
* The dynamic portion of the action hook, `$tab`, allows for targeting
* individual tabs, for instance 'install_plugins_plugin-information'.
*
* @since 2.7.0
*
* @param int $paged The current page number of the plugins list table.
*/
?>
<?php do_action( "install_plugins_$tab", $paged ); ?>
do_action( "install_plugins_$tab", $paged ); ?>
</div>
<?php
/**

View File

@ -55,16 +55,16 @@ wp_localize_script( 'theme', '_wpThemeSettings', array(
wp_enqueue_script( 'theme' );
/**
* Fires before each of the tabs are rendered on the Install Themes page.
*
* The dynamic portion of the hook name, $tab, refers to the current
* theme install tab. Possible values are 'dashboard', 'search', 'upload',
* 'featured', 'new', or 'updated'.
*
* @since 2.8.0
*/
if ( $tab ) {
/**
* Fires before each of the tabs are rendered on the Install Themes page.
*
* The dynamic portion of the hook name, `$tab`, refers to the current
* theme install tab. Possible values are 'dashboard', 'search', 'upload',
* 'featured', 'new', or 'updated'.
*
* @since 2.8.0
*/
do_action( "install_themes_pre_{$tab}" );
}
@ -177,18 +177,18 @@ include(ABSPATH . 'wp-admin/admin-header.php');
<br class="clear" />
<?php
/**
* Fires at the top of each of the tabs on the Install Themes page.
*
* The dynamic portion of the hook name, $tab, refers to the current
* theme install tab. Possible values are 'dashboard', 'search', 'upload',
* 'featured', 'new', or 'updated'.
*
* @since 2.8.0
*
* @param int $paged Number of the current page of results being viewed.
*/
if ( $tab ) {
/**
* Fires at the top of each of the tabs on the Install Themes page.
*
* The dynamic portion of the hook name, `$tab`, refers to the current
* theme install tab. Possible values are 'dashboard', 'search', 'upload',
* 'featured', 'new', or 'updated'.
*
* @since 2.8.0
*
* @param int $paged Number of the current page of results being viewed.
*/
do_action( "install_themes_{$tab}", $paged );
}
?>

View File

@ -649,7 +649,7 @@ if ( 'upgrade-core' == $action ) {
/**
* Fires for each custom update action on the WordPress Updates screen.
*
* The dynamic portion of the hook name, $action, refers to the
* The dynamic portion of the hook name, `$action`, refers to the
* passed update action. The hook fires in lieu of all available
* default update actions.
*

View File

@ -261,7 +261,7 @@ if ( isset($_GET['action']) ) {
/**
* Fires when a custom plugin or theme update request is received.
*
* The dynamic portion of the hook name, $action, refers to the action
* The dynamic portion of the hook name, `$action`, refers to the action
* provided in the request for wp-admin/update.php. Can be used to
* provide custom update functionality for themes and plugins.
*

View File

@ -436,19 +436,21 @@ if ( is_multisite() && is_network_admin() && ! IS_PROFILE_PAGE && current_user_c
foreach ( wp_get_user_contact_methods( $profileuser ) as $name => $desc ) {
?>
<tr class="user-<?php echo $name; ?>-wrap">
<?php
/**
* Filter a user contactmethod label.
*
* The dynamic portion of the filter hook, $name, refers to
* each of the keys in the contactmethods array.
*
* @since 2.9.0
*
* @param string $desc The translatable label for the contactmethod.
*/
?>
<th><label for="<?php echo $name; ?>"><?php echo apply_filters( "user_{$name}_label", $desc ); ?></label></th>
<th><label for="<?php echo $name; ?>">
<?php
/**
* Filter a user contactmethod label.
*
* The dynamic portion of the filter hook, `$name`, refers to
* each of the keys in the contactmethods array.
*
* @since 2.9.0
*
* @param string $desc The translatable label for the contactmethod.
*/
echo apply_filters( "user_{$name}_label", $desc );
?>
</label></th>
<td><input type="text" name="<?php echo $name; ?>" id="<?php echo $name; ?>" value="<?php echo esc_attr($profileuser->$name) ?>" class="regular-text" /></td>
</tr>
<?php

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.1-beta2-30648';
$wp_version = '4.1-beta2-30649';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.