O3PO_Ready2PublishDashboard
in package
implements
O3PO_SettingsSpecifyer
Class for displaying manuscripts ready to publish on the admin panel.
Tags
Table of Contents
Interfaces
- O3PO_SettingsSpecifyer
- Interface for classes specifying settings.
Properties
- $associated_post_type : string
- The associated post type
- $plugin_name : string
- The name of the plugin.
- $plugin_pretty_name : string
- The plugin pretty name
- $slug : string
- The slug of this dashboard.
- $title : string
- The title of this dashboard
- $meta_fields_to_set_when_inserting_post : array<string|int, mixed>
- The meta fields to set
- $storage : O3PO_Ready2Publish_Storage
- The storage from where to get manuscript information
Methods
- __construct() : mixed
- Construct this dashboard.
- add_metabox() : mixed
- Adds the meta box for ready2publish dashboard functionality on the publication type edit page.
- display_post() : mixed
- Display a post
- do_parse_request() : mixed
- Parse dashboard requests
- init() : mixed
- Adds a rewrite endpoint for the form.
- insert_and_display_post() : mixed
- Insert and display a post
- insert_post() : mixed
- Insert a post
- render_dashboard_widget() : mixed
- Render the dashboard widget.
- render_default_vat_percent_setting() : mixed
- Render the setting for the default vat.
- render_invoice_email_setting() : mixed
- Render the setting for the invoice email.
- render_invoice_footer_setting() : mixed
- Render the setting for the invoice header image.
- render_invoice_header_img_setting() : mixed
- Render the setting for the invoice header image.
- render_manuscript_entry() : mixed
- Render a single manuscript entry.
- render_metabox() : mixed
- Render the meta box.
- render_publisher_vat_number_setting() : mixed
- Render the setting for the default vat.
- show_invoice() : mixed
- Render the setting for the invoice header image.
- specify_settings() : mixed
- Specifies class specific settings sections and fields.
- wp_dashboard_setup() : mixed
- Setup the dashboard box
Properties
$associated_post_type
The associated post type
protected
static string
$associated_post_type
= 'paper'
The post type that can be created with this dashboard.
Tags
$plugin_name
The name of the plugin.
protected
string
$plugin_name
The name of the plugin.
Tags
$plugin_pretty_name
The plugin pretty name
protected
string
$plugin_pretty_name
The pretty name of the plugin.
Tags
$slug
The slug of this dashboard.
protected
string
$slug
The slug of this dashboard.
Tags
$title
The title of this dashboard
protected
string
$title
The title of this dashboard.
Tags
$meta_fields_to_set_when_inserting_post
The meta fields to set
private
static array<string|int, mixed>
$meta_fields_to_set_when_inserting_post
= ['eprint', 'title', 'corresponding_author_email', 'abstract', 'author_given_names', 'author_surnames', 'author_name_styles', 'number_award_numbers', 'award_numbers', 'funder_names', 'funder_identifiers', 'popular_summary', 'feature_image_caption', 'dissemination_multimedia', 'fermats_library']
The meta fields to set when creating and inserting a post.
Tags
$storage
The storage from where to get manuscript information
private
O3PO_Ready2Publish_Storage
$storage
The storage from where to get manuscript information.
Tags
Methods
__construct()
Construct this dashboard.
public
__construct(string $plugin_name, string $plugin_pretty_name, string $slug, string $title, mixed $storage) : mixed
Parameters
- $plugin_name : string
-
The name of the plugin.
- $plugin_pretty_name : string
-
The pretty name of the plugin.
- $slug : string
-
The slug of this dashboard.
- $title : string
-
The title of this dashboard.
- $storage : mixed
Tags
add_metabox()
Adds the meta box for ready2publish dashboard functionality on the publication type edit page.
public
final add_metabox() : mixed
Tags
display_post()
Display a post
public
display_post(int $post_id) : mixed
Parameters
- $post_id : int
-
The post_id of the post to display
Tags
do_parse_request()
Parse dashboard requests
public
do_parse_request(bool $bool, WP $wp, array<string|int, mixed>|string $extra_query_vars) : mixed
Parse requests aimed at performing actions on manuscripts such as starting or continuing the publishing process.
Parameters
- $bool : bool
-
Whether or not to parse the request.
- $wp : WP
-
Current WordPress environment instance.
- $extra_query_vars : array<string|int, mixed>|string
-
Extra passed query variables.
Tags
init()
Adds a rewrite endpoint for the form.
public
init() : mixed
To be added to the 'init' action.
Tags
insert_and_display_post()
Insert and display a post
public
insert_and_display_post(int $id) : mixed
Inserts a post of the associated post type generated from the manuscript information in storage and displays the post edit page.
Parameters
- $id : int
-
The id of the manuscript
Tags
insert_post()
Insert a post
public
insert_post(int $id) : mixed
Inserts a post of the associated post type generated from the manuscript information in storage.
Parameters
- $id : int
-
The id of the manuscript
Tags
render_dashboard_widget()
Render the dashboard widget.
public
render_dashboard_widget() : mixed
Tags
render_default_vat_percent_setting()
Render the setting for the default vat.
public
static render_default_vat_percent_setting() : mixed
Tags
render_invoice_email_setting()
Render the setting for the invoice email.
public
static render_invoice_email_setting() : mixed
Tags
render_invoice_footer_setting()
Render the setting for the invoice header image.
public
static render_invoice_footer_setting() : mixed
Tags
render_invoice_header_img_setting()
Render the setting for the invoice header image.
public
static render_invoice_header_img_setting() : mixed
Tags
render_manuscript_entry()
Render a single manuscript entry.
public
render_manuscript_entry(int $id, string $action) : mixed
Parameters
- $id : int
-
The id of the manuscript
- $action : string
-
The action appropriate for this entry, e.g., 'continue' or 'publish'
Tags
render_metabox()
Render the meta box.
public
render_metabox(WP_Post $post) : mixed
Parameters
- $post : WP_Post
-
The post for which to render the metabox.
Tags
render_publisher_vat_number_setting()
Render the setting for the default vat.
public
static render_publisher_vat_number_setting() : mixed
Tags
show_invoice()
Render the setting for the invoice header image.
public
show_invoice(int $id) : mixed
Parameters
- $id : int
-
The id of the manuscript whose invoice to show.
Tags
specify_settings()
Specifies class specific settings sections and fields.
public
static specify_settings(O3PO_Settings $settings) : mixed
To be called during during O3PO_Settings::configure().
Parameters
- $settings : O3PO_Settings
-
Settings object.
Tags
wp_dashboard_setup()
Setup the dashboard box
public
wp_dashboard_setup() : mixed
To be added to the 'wp_dashboard_setup' action.