\MainWP\DashboardMainWP_Recent_Posts

Class MainWP_Recent_Posts

Displays the Child Sites most recent published draft, pending, trash & future posts.

Summary

Methods
Properties
Constants
get_class_name()
render()
render_sites()
render_top_grid()
render_published_posts()
render_draft_posts()
render_pending_posts()
render_future_posts()
render_trash_posts()
publish()
approve()
unpublish()
trash()
delete()
restore()
action()
action_update()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

get_class_name()

get_class_name() : string

Method get_class_name()

Returns

string —

CLASS Class Name

render()

render() 

Method render()

Fire off render_sites().

render_top_grid()

render_top_grid() 

Render MainWP Recent Posts Widget Header

render_published_posts()

render_published_posts(array  $allPosts, integer  $recent_number) 

Render Published Posts.

Parameters

array $allPosts

All posts data.

integer $recent_number

Number of posts.

render_draft_posts()

render_draft_posts(array  $allPosts, integer  $recent_number) 

Render all draft posts.

Parameters

array $allPosts

All posts data.

integer $recent_number

Number of posts.

render_pending_posts()

render_pending_posts(array  $allPosts, integer  $recent_number) 

Render all pending posts.

Parameters

array $allPosts

All posts data.

integer $recent_number

Number of posts.

render_future_posts()

render_future_posts(array  $allPosts, integer  $recent_number) 

Render all future posts.

Parameters

array $allPosts

All posts data.

integer $recent_number

Number of posts.

render_trash_posts()

render_trash_posts(array  $allPosts, integer  $recent_number) 

Render all trashed posts.

Parameters

array $allPosts

All posts data.

integer $recent_number

Number of posts.

publish()

publish() 

Method publish()

Publish Post.

approve()

approve() 

Method approve()

Approve Post.

unpublish()

unpublish() 

Method unpublish()

Unpublish Post.

trash()

trash() 

Method trash()

Trash Post.

delete()

delete() 

Method delete()

Delete Post.

restore()

restore() 

Method restore()

Restore Post.

action()

action(string  $pAction, string  $type = 'post') 

Method action()

Initiate try catch for chosen Action

Parameters

string $pAction

Post Action.

string $type

Post type.

Throws

\Exception

Error message.

action_update()

action_update(mixed  $pAction) 

Method action_update()

Update Post Action.

Parameters

mixed $pAction

Post Action.

Throws

\Exception

Error message.