CData Python Connector for WordPress

Build 25.0.9454

RestorePoststoPreviousStatus

Restore a post or page from the trash to its previous status.

Stored Procedure Specific Information

Execute

Call this procedure to restore a post or page from the trash to its previous status.

The only required column is PostId, which must reference a valid post in the trash. A successful authentication is also required.

EXECUTE RestorePoststoPreviousStatus PostId=6 

Input

Name Type Description
PostId Integer The unique identifier of the post to restore to its previous status.

Result Set Columns

Name Type Description
Success String Indicates whether the request to restore the post to its previous status was completed successfully.
Id Integer The unique identifier of the restored post.
SiteId Integer The unique identifier of the WordPress site that owns the restored post.
AuthorId Integer The unique identifier of the user who authored the restored post.
AuthorLogin String The login name of the post author.
AuthorEmail String The email address of the post author.
AuthorName String The display name of the post author.
AuthorFirstName String The first name of the post author.
AuthorLastName String The last name of the post author.
AuthorNiceName String A URL-friendly version of the author's username.
AuthorURL String The website URL provided by the post author.
AuthorAvatarURL String The URL to the author's avatar image.
AuthorProfileURL String The profile or Gravatar URL of the post author.
Date Date The original date and time when the post was created, in the site's timezone.
Modified Datetime The date and time when the post was last modified after being restored.
Title String The title of the restored post.
URL String The permalink URL of the restored post.
ShortURL String The WordPress shortlink (wp.me) for the restored post.
Content String The full HTML content of the restored post.
Excerpt String The excerpt or summary of the restored post.
Slug String The URL-friendly slug used for the restored post.
Guid String The globally unique identifier (GUID) of the restored post.
Status String The post's restored publication status, such as publish, draft, or private.
Sticky String Indicates whether the restored post is marked as sticky.
Password String The password protecting the post, if applicable.
Parent String The ID of the parent post, if this post is part of a hierarchy.
Type String The post type, such as post, page, or custom type.
DiscussionCommentsOpen String Indicates whether comments are open for the restored post.
DiscussionCommentStatus String The current moderation status of comments on the post.
DiscussionPingsOpen String Indicates whether pingbacks and trackbacks are open for the post.
DiscussionPingStatus String The pingback status of the post.
LikesEnabled String Indicates whether likes are enabled for the post.
SharingEnabled String Indicates whether sharing options are enabled for the post.
LikeCount String The total number of likes for the restored post.
ILike String Indicates whether the authenticated user has liked the post.
IsReblogged String Indicates whether the authenticated user has reblogged the post.
IsFollowing String Indicates whether the authenticated user follows the site hosting the post.
GlobalId String A unique WordPress.com-wide identifier for the restored post.
FeaturedImage String The URL of the featured image assigned to the restored post.
PostThumbnail String The attachment object representing the post's featured image.
Format String The post format, such as standard, gallery, quote, video, or audio.
Geo String Geolocation data associated with the restored post, if available.
MenuOrder String The order of the post relative to others of the same type.
PageTemplate String The page template applied to the post, if it is a page.
PublicizeURLs String A list of URLs where the post has been shared through connected Publicize services.
Terms String The taxonomy terms associated with the post.
Tags String The tags applied to the restored post.
Categories String The categories assigned to the restored post.
Attachments String A list of media attachments linked to the post.
AttachmentCount String The total number of media attachments associated with the post.
Metadata String Custom metadata fields and their values associated with the post.
Meta String Additional metadata details returned from the WordPress API.
Capabilities String The user's permissions related to this post, such as edit or delete rights.
Revisions String A list of available revisions for the restored post.
OtherURLs String Additional URLs associated with the post, such as alternate endpoints or feeds.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9454