Documentation

O3PO_Admin
in package

The admin-specific functionality of the plugin.

Defines the plugin name, version, and hooks

Tags
subpackage

O3PO/admin

author

Christian Gogolin o3po@quantum-journal.org

Table of Contents

Properties

$meta_data_explorer_tabs  : array<string|int, mixed>
Array of tabs in the meta-data explorer.
$plugin_name  : string
The ID of this plugin.
$plugin_pretty_name  : string
The pretty name of this plugin.
$version  : string
The version of this plugin.

Methods

__construct()  : mixed
Initialize the class and set its properties.
add_meta_data_explorer_page_to_menu()  : mixed
Top-level item to the administration menu
add_plugin_action_links()  : mixed
Add links
enable_mathjax()  : mixed
Enable MathJax and some extra functionality on admin pages.
enqueue_scripts()  : mixed
Register the JavaScript for the admin area.
enqueue_styles()  : mixed
Register the stylesheets for the admin area.
get_meta_data_explorer_tabs()  : array<string|int, mixed>
Get the array of tabs in the meta-data explorer.
get_meta_data_field_map()  : array<string|int, mixed>
Get the dictionary of meta-data fields and their corresponding callables.
get_meta_data_fields()  : array<string|int, mixed>
Get the array of all meta-data fields.
get_output_formats()  : array<string|int, mixed>
Get the array of output formats of the meta-data explorer.
get_plugin_name()  : mixed
Get the plugin_name.
get_plugin_pretty_name()  : mixed
Get the plugin_pretty_name.
render_meta_data_explorer()  : mixed
Renders the O-3PO meta-data explorer
get_editor_leaderboard_data()  : array<string|int, mixed>
Get the number of published papers handled by each editor in each year.

Properties

$meta_data_explorer_tabs

Array of tabs in the meta-data explorer.

private array<string|int, mixed> $meta_data_explorer_tabs = ['meta-data' => 'Meta-data', 'citation-metrics' => 'Citation metrics', 'updated-after-publication' => 'Updated after publication', 'editor-leaderboard' => 'Editor leaderboard']

Array of slugs and labels of the tabs of the meta-data explorer.

Tags
since
0.3.0
access

private

$plugin_name

The ID of this plugin.

private string $plugin_name

The ID of this plugin.

Tags
since
0.1.0
access

private

$plugin_pretty_name

The pretty name of this plugin.

private string $plugin_pretty_name

The pretty name of this plugin.

Tags
since
0.1.0
access

private

$version

The version of this plugin.

private string $version

The current version of this plugin.

Tags
since
0.1.0
access

private

Methods

__construct()

Initialize the class and set its properties.

public __construct(string $plugin_name, string $version, string $plugin_pretty_name) : mixed
Parameters
$plugin_name : string

The name of this plugin.

$version : string

The version of this plugin.

$plugin_pretty_name : string

The pretty name of this plugin.

Tags
since
0.1.0

add_meta_data_explorer_page_to_menu()

Top-level item to the administration menu

public add_meta_data_explorer_page_to_menu() : mixed
Tags
access

public

since
0.3.0

Add links

public add_plugin_action_links(array<string|int, mixed> $actions) : mixed

To be added to the 'plugin_action_links_[plugin-name]/[plugin-name].php' filter.

Parameters
$actions : array<string|int, mixed>

Array of links to filter

since
0.2.0

enable_mathjax()

Enable MathJax and some extra functionality on admin pages.

public enable_mathjax() : mixed

This allows us to show a live preview of titles and abstracts containing mathematical formulas and save their MathML representation when a post is saved. This would be very hard (impossible?) to do with just php, so we have to resort to running some code in the browser of the person adding the manuscript to the website. Concretely, the following adds a live preview and MathML output to all text fields of with css class "preview_and_mathml". The MathML output is itself a textfield and gets and id that is derived from that of the input field. When the post is saved its content hence ends up in POST and can be captured by our PHP code in the custom post types.

To be added to the 'admin_head' action.

Tags
since
0.1.0

enqueue_scripts()

Register the JavaScript for the admin area.

public enqueue_scripts() : mixed

To be added to the 'admin_enqueue_scripts' action.

Tags
since
0.1.0

enqueue_styles()

Register the stylesheets for the admin area.

public enqueue_styles() : mixed

To be added to the 'admin_enqueue_scripts' action.

Tags
since
0.1.0

get_meta_data_explorer_tabs()

Get the array of tabs in the meta-data explorer.

public get_meta_data_explorer_tabs() : array<string|int, mixed>
Tags
since
0.3.0
access

public

Return values
array<string|int, mixed> —

Array of slugs and labels of the tabs of the meta-data explorer.

get_meta_data_field_map()

Get the dictionary of meta-data fields and their corresponding callables.

public get_meta_data_field_map() : array<string|int, mixed>
Tags
since
0.3.0
access

public

Return values
array<string|int, mixed> —

dictionary of meta-data fields and their corresponding callables.

get_meta_data_fields()

Get the array of all meta-data fields.

public get_meta_data_fields() : array<string|int, mixed>
Tags
since
0.3.0
access

public

Return values
array<string|int, mixed> —

array of meta-data fields.

get_output_formats()

Get the array of output formats of the meta-data explorer.

public get_output_formats() : array<string|int, mixed>
Tags
since
0.3.0
access

public

Return values
array<string|int, mixed> —

Array of output formats of the meta-data explorer.

get_plugin_name()

Get the plugin_name.

public get_plugin_name() : mixed
Tags
since
0.3.0
access

public

get_plugin_pretty_name()

Get the plugin_pretty_name.

public get_plugin_pretty_name() : mixed
Tags
since
0.3.0
access

public

render_meta_data_explorer()

Renders the O-3PO meta-data explorer

public render_meta_data_explorer() : mixed
Tags
access

public

sinde

0.3.0

get_editor_leaderboard_data()

Get the number of published papers handled by each editor in each year.

private get_editor_leaderboard_data() : array<string|int, mixed>
Tags
access

private

Return values
array<string|int, mixed> —

Paper counts indexed by publication year and editor.


        
On this page

Search results