W3cubDocs

/WordPress

wp_ajax_untrash_post( string $action )

Handles restoring a post from the Trash via AJAX.

Parameters

$actionstringrequired
Action to perform.

Source

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

	wp_ajax_trash_post( $action );
}

Changelog

Version Description
3.1.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_ajax_untrash_post