Post class

A WordPress Post

Refer the above link to see which arguments are set based on different context modes. (WordPressContext).

Constructors

Post({String date, String dateGmt, String password, String slug, PostPageStatus status = PostPageStatus.publish, @required String title, @required String content, @required String excerpt, @required int authorID, String featuredMedia, int featuredMediaID, PostCommentStatus commentStatus = PostCommentStatus.open, PostPingStatus pingStatus = PostPingStatus.open, bool sticky, String template, PostFormat format = PostFormat.standard, List<int> categoryIDs, List<int> tagIDs})
Post.fromJson(Map<String, dynamic> json)

Properties

attachments List<Media>
A list of attachments contained in the post.
read / write
author User
The User object denoting the author of the post.
read / write
authorID int
ID of the post author. Refer User.
read / write
categories List<Category>
A list of categories assigned to the post.
read / write
categoryIDs List<int>
List of IDs of categories this post belongs to.
read / write
comments List<Comment>
A list of comments for the post.
read / write
commentsHierarchy List<CommentHierarchy>
A list of comments for the post, where each CommentHierarchy object is a direct comment to the post, with CommentHierarchy.children containing replies to that comment.
read / write
commentStatus PostCommentStatus
Whether the post allows commenting.
read / write
content Content
Post content
read / write
date String
The date the post was published, in the site's Timezone.
read / write
dateGmt String
The date the post was published, in GMT.
read / write
excerpt Excerpt
Post excerpt
read / write
featuredMedia Media
The featured Media of the post.
read / write
featuredMediaID int
read / write
format PostFormat
The format of the post.
read / write
generatedSlug String
read / write
guid Guid
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
id int
ID of the post
read / write
read / write
read / write
modified String
read / write
modifiedGmt String
read / write
password String
Password for the post in case it needs to be password protected.
read / write
permalinkTemplate String
read / write
pingStatus PostPingStatus
Whether the post can be pinged.
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
slug String
An alphanumeric identifier unique to each post.
read / write
status PostPageStatus
The state in which the post should be created (draft, publish etc.)
read / write
sticky bool
Whether the post needs to sticky i.e. a Featured post.
read / write
tagIDs List<int>
List of IDs of tags this post should have.
read / write
tags List<Tag>
A list of tags assigned to the post.
read / write
template String
read / write
title Title
Post title
read / write
type String
read / write

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object. [...]
override

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited