Properties

$slug

$slug : string

The slug of this dashboard.

Type

string — The slug of this dashboard.

$plugin_name

$plugin_name : string

The name of the plugin.

Type

string — The name of the plugin.

$plugin_pretty_name

$plugin_pretty_name : string

The plugin pretty name

Type

string — The pretty name of the plugin.

$title

$title : string

The title of this dashboard

Type

string — The title of this dashboard.

$associated_post_type

$associated_post_type : string

The associated post type

Type

string — The post type that can be created with this dashboard.

$meta_fields_to_set_when_inserting_post

$meta_fields_to_set_when_inserting_post : array

The meta fields to set

Type

array — The meta fields to set when creating and inserting a post.

$storage

$storage : \O3PO_Ready2Publish_Storage

The storage from where to get manuscript information

Type

\O3PO_Ready2Publish_Storage — The storage from where to get manuscript information.

Methods

__construct()

__construct(string  $plugin_name, string  $plugin_pretty_name, string  $slug, string  $title,   $storage) 

Construct this dashboard.

Parameters

string $plugin_name

The name of the plugin.

string $plugin_pretty_name

The pretty name of the plugin.

string $slug

The slug of this dashboard.

string $title

The title of this dashboard.

$storage

specify_settings()

specify_settings(\O3PO_Settings  $settings) 

Specifies class specific settings sections and fields.

To be called during during O3PO_Settings::configure().

Parameters

\O3PO_Settings $settings

Settings object.

wp_dashboard_setup()

wp_dashboard_setup() 

Setup the dashboard box

To be added to the 'wp_dashboard_setup' action.

render_manuscript_entry()

render_manuscript_entry(integer  $id, string  $action) 

Render a single manuscript entry.

Parameters

integer $id

The id of the manuscript

string $action

The action appropriate for this entry, e.g., 'continue' or 'publish'

render_dashboard_widget()

render_dashboard_widget() 

Render the dashboard widget.

insert_post()

insert_post(integer  $id) 

Insert a post

Inserts a post of the associated post type generated from the manuscript information in storage.

Parameters

integer $id

The id of the manuscript

insert_and_display_post()

insert_and_display_post(integer  $id) 

Insert and display a post

Inserts a post of the associated post type generated from the manuscript information in storage and displays the post edit page.

Parameters

integer $id

The id of the manuscript

display_post()

display_post(integer  $post_id) 

Display a post

Parameters

integer $post_id

The post_id of the post to display

init()

init() 

Adds a rewrite endpoint for the form.

To be added to the 'init' action.

do_parse_request()

do_parse_request(boolean  $bool, \WP  $wp, array|string  $extra_query_vars) 

Parse dashboard requests

Parse requests aimed at performing actions on manuscripts such as starting or continuing the publishing process.

Parameters

boolean $bool

Whether or not to parse the request.

\WP $wp

Current WordPress environment instance.

array|string $extra_query_vars

Extra passed query variables.

render_invoice_header_img_setting()

render_invoice_header_img_setting() 

Render the setting for the invoice header image.

render_invoice_email_setting()

render_invoice_email_setting() 

Render the setting for the invoice email.

render_invoice_footer_setting()

render_invoice_footer_setting() 

Render the setting for the invoice header image.

show_invoice()

show_invoice(integer  $id) 

Render the setting for the invoice header image.

Parameters

integer $id

The id of the manuscript whose invoice to show.

add_metabox()

add_metabox() 

Adds the meta box for ready2publish dashboard functionality on the publication type edit page.

render_metabox()

render_metabox(\WP_Post  $post) 

Render the meta box.

Parameters

\WP_Post $post

The post for which to render the metabox.