WP_REST_Request::offsetUnset() WordPress Method

The WP_REST_Request::offsetUnset() method is used to remove a parameter from a request. This is useful if you need to modify a request before it is sent to the server.

WP_REST_Request::offsetUnset( $offset ) #


Source

File: wp-includes/rest-api/class-wp-rest-request.php

	public function offsetUnset( $offset ) {
		$order = $this->get_parameter_order();

		// Remove the offset from every group.
		foreach ( $order as $type ) {
			unset( $this->params[ $type ][ $offset ] );
		}
	}

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.