Changeset 34265 for trunk/src/wp-includes/functions.php
- Timestamp:
- 09/17/2015 12:32:20 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r34264 r34265 4991 4991 <?php 4992 4992 } 4993 4994 /**4995 * Retrieve and, optionally, validate, an `action` query var4996 *4997 * @since 4.4.04998 *4999 * @param string $action Optional. Action to validate.5000 * @return string Empty string if there is no action in the request or it doesn't5001 * match the passed `$action`. Returns the [passed `$action` or5002 * 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.