Properties

$subPages

$subPages : array

Public static variable to hold Sub-pages data.

Type

array — Sub-pages.

Methods

get_class_name()

get_class_name() : object

Method get_class_name()

Get Class Name.

Returns

object —

CLASS

init()

init() : void

Method init()

Initiate Page.

init_menu()

init_menu() : void

Method ini_menu()

Initiate Page menu.

on_load_page()

on_load_page() : void

Method on_load_page()

Used during init_menu() to get the class names of, admin_head and get_hidden_columns.

on_load_add_edit()

on_load_add_edit() : void

Method on_load_add_edit()

Get the post ID, pass it to method on_load_bulkpost().

on_load_bulkpost()

on_load_bulkpost(mixed  $post_id) : void

Method on_load_bulkpost()

For the given post ID, this method Enqueues all scripts, styles, settings, and templates necessary to use all media JS APIs, then retrieves post data.

Parameters

mixed $post_id

Given post ID.

get_manage_columns()

get_manage_columns() : array

Method get_manage_columns()

Get columns to display.

Returns

array —

$colums Array of columns to display on the page.

admin_head()

admin_head() : void

Method admin_head()

Grab the current_screen ID, set the pagenow JS variable, and render the JS HTML Meta tag.

get_hidden_columns()

get_hidden_columns(mixed  $hidden, mixed  $screen) : \MainWP\Dashboard\(mixed)

Method get_hidden_columns()

Get the currently hidden page columns.

Parameters

mixed $hidden

User option value.

mixed $screen

Current screen ID.

Returns

\MainWP\Dashboard\(mixed) —

$hidden User option value on success, false on failure.

hook_screen_options_modal_bottom()

hook_screen_options_modal_bottom() 

Method hook_screen_options_modal_bottom()

Render screen options modal bottom.

init_subpages_menu()

init_subpages_menu() : void

Method init_subpages_menu()

Initiate subpages menu.

init_left_menu()

init_left_menu(array  $subPages = array()) : void

Method init_left_menu()

Initiate left menu.

Parameters

array $subPages

Array of subPages to add to the Post left menu.

admin_post_thumbnail_html()

admin_post_thumbnail_html(mixed  $content, mixed  $post_id, mixed  $thumbnail_id) : string

Method admin_post_thumbnail_html()

Grab the post thumbnail html.

Parameters

mixed $content

Admin post thumbnail HTML markup.

mixed $post_id

Post ID.

mixed $thumbnail_id

Thumbnail ID.

Returns

string —

html

render_header()

render_header(string  $shownPage = '', null  $post_id = null) 

Method render_header()

Parameters

string $shownPage

Current page slug.

null $post_id

BulkEdit Post ID.

render_footer()

render_footer() 

Method render_footer()

Render page footer.

render()

render() : string

Method render()

Render the page content.

Returns

string —

Post page html content.

render_search_options()

render_search_options() 

Method render_search_options()

Search form for Post page.

render_table()

render_table(boolean  $cached = true, mixed  $keyword = '', mixed  $dtsstart = '', mixed  $dtsstop = '', mixed  $status = '', mixed  $groups = '', mixed  $sites = '', integer  $postId, integer  $userId, string  $post_type = '', string  $search_on = 'all', mixed  $clients = '') 

Renders Posts table.

Parameters

boolean $cached

Show cached data or not. Default: true.

mixed $keyword

Search keywords.

mixed $dtsstart

Date & time of Session start.

mixed $dtsstop

Date & time of Session stop.

mixed $status

Page statuses.

mixed $groups

Groups to display.

mixed $sites

Site URLS.

integer $postId

Post ID.

integer $userId

Current user ID.

string $post_type

Post type.

string $search_on

Site on all sites. Default = all.

mixed $clients

Clients.

render_table_body()

render_table_body(mixed  $keyword, mixed  $dtsstart, mixed  $dtsstop, mixed  $status, mixed  $groups, mixed  $sites, integer  $postId, integer  $userId, string  $post_type = '', string  $search_on = 'all', boolean  $table_content = false, mixed  $clients = '') : string

Method render_table_body()

Render Posts table body.

Parameters

mixed $keyword

Search keywords.

mixed $dtsstart

Date & time of Session start.

mixed $dtsstop

Date & time of Session stop.

mixed $status

Page statuses.

mixed $groups

Groups to display.

mixed $sites

Site URLS.

integer $postId

Post ID.

integer $userId

Current user ID.

string $post_type

Post type.

string $search_on

Site on all sites. Default = all.

boolean $table_content

Generate table content only. Default = false.

mixed $clients

Clients.

Returns

string —

Post table body html.

posts_search_handler()

posts_search_handler(mixed  $data, mixed  $website, mixed  $output) : string

Method posts_search_handler()

Post page search handler.

Parameters

mixed $data

Search data.

mixed $website

Child Sites ID.

mixed $output

Html to output.

Returns

string —

Returned search results html.

list_meta_row()

list_meta_row(array  $entry, integer  $count) : string

Method list_meta_row()

Outputs a single row of public meta data in the Custom Fields meta box.

Parameters

array $entry

Post array.

integer $count

Counter variable.

Returns

string —

$r Custom Fields meta box HTML.

meta_form()

meta_form(\MainWP\Dashboard\WP_Post  $pos = null) 

Method meta_form()

Prints the form in the Custom Fields meta box.

Parameters

\MainWP\Dashboard\WP_Post $pos

Optional. The post being edited.

post_custom_meta_box()

post_custom_meta_box(object  $post) 

Method post_custom_meta_box()

Display custom fields form fields.

Parameters

object $post

Current post object.

wp_post_thumbnail_html()

wp_post_thumbnail_html(integer  $thumbnail_id = null, mixed  $pos = null) : string

Output HTML for the post thumbnail meta-box.

Parameters

integer $thumbnail_id

ID of the attachment used for thumbnail.

mixed $pos

The post ID or object associated with the thumbnail, defaults to global $post.

Returns

string —

html

post_thumbnail_meta_box()

post_thumbnail_meta_box(mixed  $pos) 

Method post_thumbnail_meta_box()

Renders the post thumbnail meta box.

Parameters

mixed $pos

Post ID.

touch_time()

touch_time(object  $post, integer  $edit = 1, integer  $for_post = 1, integer  $tab_index, integer  $multi) : string

Method touch_time()

Add time stamps to Post for screen readers.

Parameters

object $post

Current Post object.

integer $edit

Whether or not this is an edit or new post.

integer $for_post

For post.

integer $tab_index

Tabindex position.

integer $multi

Multi.

Returns

string —

Hidden time stamps html.

do_meta_boxes()

do_meta_boxes(mixed  $screen, mixed  $context, mixed  $input_obj) : string

Method do_meta_boxes()

Render meta boxes.

Parameters

mixed $screen

Current page tab.

mixed $context

Context.

mixed $input_obj

Object.

Returns

string —

Metabox html

render_bulkpost()

render_bulkpost(mixed  $post_id, mixed  $input_type) : string

Renders bulkpost to edit.

Parameters

mixed $post_id

Post ID.

mixed $input_type

Post type.

Returns

string —

Edit bulk post html.

render_categories()

render_categories(object  $post) 

Renders Select Categories form

Parameters

object $post

Post object.

render_post_fields()

render_post_fields(object  $post, mixed  $post_type) 

Method render_post_fields()

Render Featured Image & Post Options fields.

Parameters

object $post

Post object.

mixed $post_type

Post type.

render_bulk_add()

render_bulk_add() : string

Method render_bulk_add()

Check if user has rights, render the bulk add tab.

Returns

string —

Bulk add tab html.

render_bulk_edit()

render_bulk_edit() : string

Method render_bulk_edit()

Check if user has rights, render the bulk edit tab.

Returns

string —

Bulk edit tab html.

render_addedit()

render_addedit(mixed  $post_id, mixed  $what) 

Method render_bulk_addedit()

Render both the Add & Edit tabs.

Parameters

mixed $post_id

post ID.

mixed $what

what tab is active.

hook_posts_search_handler()

hook_posts_search_handler(mixed  $data, object  $website, mixed  $output) 

Method hook_posts_search_handler()

Hook Posts Search handler.

Parameters

mixed $data

search data.

object $website

child site object.

mixed $output

output.

mainwp_help_content()

mainwp_help_content() 

Method mainwp_help_content()

Attatch MainWP help content.

get_status()

get_status(mixed  $status) : string

Method get_status()

Get Post status.

Parameters

mixed $status

Post status.

Returns

string —

$status Post status.