Changeset 34059 for trunk/src/wp-includes/functions.php
- Timestamp:
- 09/11/2015 09:07:45 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r33969 r34059 4981 4981 <?php 4982 4982 } 4983 4984 /** 4985 * Retrieve and, optionally, validate, an `action` query var 4986 * 4987 * @since 4.4.0 4988 * 4989 * @param string $action Optional. Action to validate. 4990 * @return string Empty string if there is no action in the request or it doesn't 4991 * match the passed `$action`. Returns the [passed `$action` or 4992 * request action on succcess. 4993 */ 4994 function wp_validate_action( $action = '' ) { 4995 $r = $_REQUEST; 4996 if ( ! isset( $r['action'] ) ) { 4997 return ''; 4998 } 4999 5000 if ( ! empty( $action ) ) { 5001 return $action === $r['action'] ? $action : ''; 5002 } 5003 5004 return $r['action']; 5005 }
Note: See TracChangeset
for help on using the changeset viewer.