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.
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 );
}
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description |
|---|---|
| 3.1.0 | Introduced. |