WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/20/2016 07:32:05 PM (5 years ago)
Author:
DrewAPicture
Message:

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

Part 2/2.

Fixes #37318.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/plugin.php

    r38061 r38125  
    670670 * @param array  $args        Array of additional function arguments to be passed to apply_filters().
    671671 * @param string $version     The version of WordPress that deprecated the hook.
    672  * @param string $replacement Optional. The hook that should have been used.
    673  * @param string $message     Optional. A message regarding the change.
     672 * @param string $replacement Optional. The hook that should have been used. Default false.
     673 * @param string $message     Optional. A message regarding the change. Default null.
    674674 */
    675675function apply_filters_deprecated( $tag, $args, $version, $replacement = false, $message = null ) {
     
    10041004
    10051005/**
    1006  * Back up global variables used for actions and filters.
     1006 * Backs up global variables used for actions and filters.
    10071007 *
    10081008 * Prevents redefinition of these globals in advanced-cache.php from accidentally
     
    10171017 * @global array $wp_current_filter Stores the list of current filters with the current one last.
    10181018 * @staticvar array $backup_globals Backed up globals.
     1019 *
    10191020 * @return array the staticvar from the first time it is set.
    10201021 */
    10211022function _backup_plugin_globals(){
    10221023    global $wp_filter, $wp_actions, $merged_filters, $wp_current_filter;
     1024
    10231025    static $backup_globals = array();
     1026
    10241027    if ( empty( $backup_globals ) ) {
    10251028        $backup_globals = array(
     
    10341037
    10351038/**
    1036  * Safely restore backed up global variables used for actions and filters.
     1039 * Safely restores backed up global variables used for actions and filters.
    10371040 *
    10381041 * @since 4.6.0
     
    10471050function _restore_plugin_globals(){
    10481051    global $wp_filter, $wp_actions, $merged_filters, $wp_current_filter;
     1052
    10491053    $backup_globals = _backup_plugin_globals();
     1054
    10501055    if ( $wp_filter !== $backup_globals['backup_wp_filter'] ){
    10511056        $wp_filter = array_merge_recursive( $wp_filter, $backup_globals['backup_wp_filter'] );
Note: See TracChangeset for help on using the changeset viewer.