Make WordPress Core


Ignore:
Timestamp:
09/17/2015 12:32:20 PM (10 years ago)
Author:
helen
Message:

Superglobals: Revert [34059] until further notice.

see #33837.

File:
1 edited

Legend:

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

    r34264 r34265  
    49914991    <?php
    49924992}
    4993 
    4994 /**
    4995  * Retrieve and, optionally, validate, an `action` query var
    4996  *
    4997  * @since 4.4.0
    4998  *
    4999  * @param string $action Optional. Action to validate.
    5000  * @return string Empty string if there is no action in the request or it doesn't
    5001  *                match the passed `$action`. Returns the [passed `$action` or
    5002  *                request action on succcess.
    5003  */
    5004 function wp_validate_action( $action = '' ) {
    5005     $r = $_REQUEST;
    5006     if ( ! isset( $r['action'] ) ) {
    5007         return '';
    5008     }
    5009 
    5010     if ( ! empty( $action ) ) {
    5011         return $action === $r['action'] ? $action : '';
    5012     }
    5013 
    5014     return $r['action'];
    5015 }
Note: See TracChangeset for help on using the changeset viewer.