wp_ajax_untrash_post() WordPress Function

The wp_ajax_untrash_post() function is used to move a post from the trash to its original location. This function is only available to logged in users who have the capability to edit the post.

wp_ajax_untrash_post( string $action ) #

Ajax handler to restore a post from the Trash.


Parameters

$action

(string)(Required)Action to perform.


Top ↑

Source

File: wp-admin/includes/ajax-actions.php

function wp_ajax_untrash_post( $action ) {
	if ( empty( $action ) ) {
		$action = 'untrash-post';
	}

	wp_ajax_trash_post( $action );
}


Top ↑

Changelog

Changelog
VersionDescription
3.1.0Introduced.

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.

Show More