Docs: Fix formatting, tense, verb conjugation, and other syntax for wp-includes/* elements introduced or changed in 4.6.

Part 2/2.

Fixes #37318.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes
2016-07-20 19:33:30 +00:00
parent 68756af049
commit e6267dcf19
12 changed files with 37 additions and 32 deletions

View File

@@ -669,8 +669,8 @@ function remove_all_actions($tag, $priority = false) {
* @param string $tag The name of the filter hook.
* @param array $args Array of additional function arguments to be passed to apply_filters().
* @param string $version The version of WordPress that deprecated the hook.
* @param string $replacement Optional. The hook that should have been used.
* @param string $message Optional. A message regarding the change.
* @param string $replacement Optional. The hook that should have been used. Default false.
* @param string $message Optional. A message regarding the change. Default null.
*/
function apply_filters_deprecated( $tag, $args, $version, $replacement = false, $message = null ) {
if ( ! has_filter( $tag ) ) {
@@ -1003,7 +1003,7 @@ function _wp_filter_build_unique_id($tag, $function, $priority) {
}
/**
* Back up global variables used for actions and filters.
* Backs up global variables used for actions and filters.
*
* Prevents redefinition of these globals in advanced-cache.php from accidentally
* destroying existing data.
@@ -1016,11 +1016,14 @@ function _wp_filter_build_unique_id($tag, $function, $priority) {
* @global array $merged_filters Merges the filter hooks using this function.
* @global array $wp_current_filter Stores the list of current filters with the current one last.
* @staticvar array $backup_globals Backed up globals.
*
* @return array the staticvar from the first time it is set.
*/
function _backup_plugin_globals(){
global $wp_filter, $wp_actions, $merged_filters, $wp_current_filter;
static $backup_globals = array();
if ( empty( $backup_globals ) ) {
$backup_globals = array(
'backup_wp_filter' => $wp_filter,
@@ -1033,7 +1036,7 @@ function _backup_plugin_globals(){
}
/**
* Safely restore backed up global variables used for actions and filters.
* Safely restores backed up global variables used for actions and filters.
*
* @since 4.6.0
* @access private
@@ -1046,7 +1049,9 @@ function _backup_plugin_globals(){
*/
function _restore_plugin_globals(){
global $wp_filter, $wp_actions, $merged_filters, $wp_current_filter;
$backup_globals = _backup_plugin_globals();
if ( $wp_filter !== $backup_globals['backup_wp_filter'] ){
$wp_filter = array_merge_recursive( $wp_filter, $backup_globals['backup_wp_filter'] );
}