Requests::delete() WordPress Method

Requests::delete() is a method used to delete a WordPress post. This method can be used with an ID or slug to delete a specific post, or it can be used without any parameters to delete the current post. This method returns a WP_Error object on failure, or true on success.

Requests::delete( $url,  $headers = array(),  $options = array() ) #

Send a DELETE request


Source

File: wp-includes/class-requests.php

	public static function delete($url, $headers = array(), $options = array()) {
		return self::request($url, $headers, null, self::DELETE, $options);
	}

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.