wp_ajax_untrash_post

The timeline below displays how wordpress function wp_ajax_untrash_post has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.3

/**
 * Handles restoring a post from the Trash via AJAX.
 *
 * @since 3.1.0
 *
 * @param string $action Action to perform.
 */
function wp_ajax_untrash_post($action)
{
    if (empty($action)) {
        $action = 'untrash-post';
    }
    wp_ajax_trash_post($action);
}

WordPress Version: 5.4

/**
 * Ajax handler to restore a post from the Trash.
 *
 * @since 3.1.0
 *
 * @param string $action Action to perform.
 */
function wp_ajax_untrash_post($action)
{
    if (empty($action)) {
        $action = 'untrash-post';
    }
    wp_ajax_trash_post($action);
}

WordPress Version: 4.0

/**
 * Ajax handler to restore a post from the trash.
 *
 * @since 3.1.0
 *
 * @param string $action Action to perform.
 */
function wp_ajax_untrash_post($action)
{
    if (empty($action)) {
        $action = 'untrash-post';
    }
    wp_ajax_trash_post($action);
}

WordPress Version: 3.7

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