\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()
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, boolean  $individual) 

Render Published Posts.

Parameters

array $allPosts

All posts data.

integer $recent_number

Number of posts.

boolean $individual

Determins if it's individual site dashbaord.

render_draft_posts()

render_draft_posts(array  $allPosts, integer  $recent_number, boolean  $individual) 

Render all draft posts.

Parameters

array $allPosts

All posts data.

integer $recent_number

Number of posts.

boolean $individual

Determins if it's individual site dashbaord.

render_pending_posts()

render_pending_posts(array  $allPosts, integer  $recent_number, boolean  $individual) 

Render all pending posts.

Parameters

array $allPosts

All posts data.

integer $recent_number

Number of posts.

boolean $individual

Determins if it's individual site dashbaord.

render_future_posts()

render_future_posts(array  $allPosts, integer  $recent_number, boolean  $individual) 

Render all future posts.

Parameters

array $allPosts

All posts data.

integer $recent_number

Number of posts.

boolean $individual

Determins if it's individual site dashbaord .

render_trash_posts()

render_trash_posts(array  $allPosts, integer  $recent_number, boolean  $individual) 

Render all trashed posts.

Parameters

array $allPosts

All posts data.

integer $recent_number

Number of posts.

boolean $individual

Determins if it's individual site dashbaord .

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.