Documentation

O3PO_Settings extends O3PO_Singleton
in package
uses O3PO_Form

Manage the settings of the plugin.

Provide methods to set and get plugin settings fields and to create the respective admin page and menu entry. *

Tags
since
0.1.0
subpackage

O3PO/includes

author

Christian Gogolin o3po@quantum-journal.org

Table of Contents

Properties

$fields  : array<string|int, mixed>
Array of all field of the form.
$pages  : array<string|int, mixed>
Array of all pages of the form.
$plugin_name  : string
The unique identifier of this plugin.
$sections  : array<string|int, mixed>
Array of all sections of the form.
$slug  : string
Slug of this form.
$active_post_type_names_callback  : mixed
The callback from which to get the active post type names.
$configured  : string
Whether this singleton had already been configured.
$plugin_pretty_name  : string
The human readable name of this plugin.
$version  : string
The current version of the plugin.

Methods

__sleep()  : mixed
__wakeup()  : mixed
add_settings_page_to_menu()  : mixed
Add the settings page to the admin menu.
checked()  : mixed
Ensure that a check box field is checked
checked_or_unchecked()  : mixed
Restrict input to checked or unchecked fields
configured()  : bool
Check whether this settings singleton has already been configured or not.
get_field_default()  : string
Get the default value of a field by id.
get_field_defaults()  : mixed
Get the default values of all fields.
get_field_title()  : mixed
Get the title of a field by id.
get_field_value()  : mixed
Get the value of a field by id.
get_plugin_name()  : string
Get the plugin_name.
get_plugin_pretty_name()  : mixed
Get the plugin_pretty_name.
instance()  : O3PO_Settings
Returns the settings singleton.
leave_unchanged()  : mixed
Leave user input to field unchanged.
register_settings()  : mixed
Register all the settings.
render_ads_api_search_url_setting()  : mixed
Render the setting for the ads api search URL.
render_ads_api_token_setting()  : mixed
Render the setting for the ads api token.
render_ads_settings()  : mixed
Render the head of the ads settings part.
render_array_as_comma_separated_list_field()  : mixed
Render an array as comma separated list type field.
render_arxiv_doi_feed_identifier_setting()  : mixed
Render the setting for the DOI feed identifier for the arXiv.
render_arxiv_paper_doi_feed_days_setting()  : mixed
Render the setting for the arXiv DOI feed number of days.
render_arxiv_paper_doi_feed_endpoint_setting()  : mixed
Render the setting for the DOI feed endpoint for the arXiv.
render_arxiv_settings()  : mixed
Render the head of the arXiv settings part.
render_arxiv_submission_history_refresh_seconds_setting()  : mixed
render_arxiv_url_abs_prefix_setting()  : mixed
Render the setting for the arXiv abstract URL prefix.
render_arxiv_url_pdf_prefix_setting()  : mixed
Render the setting for the arXiv pdf URL prefix.
render_arxiv_url_source_prefix_setting()  : mixed
Render the setting for the arXiv source URL prefix.
render_arxiv_url_trackback_prefix_setting()  : mixed
Render the setting for the arXiv trackback prefix.
render_arxiv_vanity_url_prefix_setting()  : mixed
Render the setting for the arXiv vanity URL prefix.
render_buffer_access_token_setting()  : mixed
Render the setting for the Buffer.com access token.
render_buffer_api_url_setting()  : mixed
Render the setting for the Buffer.com api url.
render_buffer_profile_ids_setting()  : mixed
Render the setting for the Buffer.com prfile ids.
render_buffer_settings()  : mixed
Render the head of the Buffer.com settings part.
render_checkbox_field()  : mixed
Render a checkbox type field.
render_cited_by_refresh_seconds_setting()  : mixed
Render the cited by refresh seconds field
render_clockss_ftp_url_setting()  : mixed
Render the setting for the CLOCKSS ftp url.
render_clockss_password_setting()  : mixed
Render the setting for the CLOCKSS password.
render_clockss_settings()  : mixed
Render the head of the clockss settings part.
render_clockss_username_setting()  : mixed
Render the setting for the CLOCKSS username.
render_crossref_archive_locations_setting()  : mixed
Render the setting for the archives the primary journal is listed in for submitting meta-data to CrossRef.
render_crossref_crossmark_policy_page_doi_setting()  : mixed
Render the setting for the crossmark policy page.
render_crossref_deposite_url_setting()  : mixed
Render the setting for the CrossRef deposit URL.
render_crossref_email_setting()  : mixed
Render the setting for the email to submit to crossref.
render_crossref_get_forward_links_url_setting()  : mixed
Render the setting for the url to query to retrieve citing articles.
render_crossref_id_setting()  : mixed
Render the setting for the CorssRef id.
render_crossref_pw_setting()  : mixed
Render the setting for the CorssRef password.
render_crossref_settings()  : mixed
Render the head of the crossref settings part.
render_crossref_test_deposite_url_setting()  : mixed
Render the setting for the URl of the CrossRef deposit test system.
render_custom_search_page_setting()  : mixed
Render the setting for whether to show the custom search page.
render_developer_email_setting()  : mixed
Render the setting for the email of the developer.
render_doaj_api_key_setting()  : mixed
Render the setting for the DOAJ api key.
render_doaj_api_url_setting()  : mixed
Render the setting for the URL of the DOAJ API.
render_doaj_language_code_setting()  : mixed
Render the setting for the language code for DOAJ.
render_doaj_settings()  : mixed
Render the head of the DOAJ settings part.
render_doi_prefix_setting()  : mixed
Render the setting for the DOI prefix.
render_doi_url_prefix_setting()  : mixed
Render the setting for the CrossRef DOI resolution url prefix.
render_eissn_setting()  : mixed
Render the setting for the EISSN.
render_extended_search_and_navigation_setting()  : mixed
Render the setting for whether to show the extended search-based navigation on the home page.
render_facebook_app_id_setting()  : mixed
Render the setting for the Facebook App Id.
render_fermats_library_about_url_setting()  : mixed
Render the setting for the about URL of Fermat's library.
render_fermats_library_email_setting()  : mixed
Render the setting for the email of Fermt's library.
render_fermats_library_url_prefix_setting()  : mixed
Render the setting for the URL prefix of Fermat's library.
render_first_volume_year_setting()  : mixed
Render the setting for the year of the first volume.
render_journal_description_setting()  : mixed
Render the setting for the journal description.
render_journal_level_doi_suffix_setting()  : mixed
Render the setting for the journal level DOI suffix.
render_journal_settings()  : mixed
Render the head of the journal settings part.
render_journal_subtitle_setting()  : mixed
Render the setting for the subtitle of the primary journal.
render_journal_title_setting()  : mixed
Render the setting for the journal title of the primary journal.
render_license_explanation_setting()  : mixed
Render the setting for the text appearing in the license statement.
render_license_name_setting()  : mixed
Render the setting for the licence name.
render_license_type_setting()  : mixed
Render the setting for the license type.
render_license_url_setting()  : mixed
Render the setting for the license URL.
render_license_version_setting()  : mixed
Render the setting for the license version.
render_maintenance_mode_setting()  : mixed
Render the setting to enabled maintenance mode.
render_mathjax_url_setting()  : mixed
Render the setting for the MathJax URL.
render_multi_line_field()  : mixed
Render a multi line text box type field.
render_orcid_url_prefix_setting()  : mixed
Render the setting for the ORCID URL prefix.
render_other_plugins_settings()  : mixed
Render the head of the other plugins settings part.
render_other_service_settings()  : mixed
Render the head of the other services settings part.
render_page_template_abstract_header_setting()  : mixed
Render the setting for the abstract heading
render_page_template_for_publication_posts_setting()  : mixed
Render the setting for whether to use the page template for publications.
render_password_field()  : mixed
Render a password field.
render_plugin_settings()  : mixed
Render the head of the plugin settings page.
render_production_site_url_setting()  : mixed
Render the setting for the production site url.
render_publisher_country_setting()  : mixed
Render the setting for the country of the publisher.
render_publisher_email_setting()  : mixed
Render the setting for the email of the publisher.
render_publisher_phone_setting()  : mixed
Render the setting for the publisher phone.
render_publisher_setting()  : mixed
Render the setting for the publisher name.
render_publisher_street_and_number_setting()  : mixed
Render the setting for the publisher street and number.
render_publisher_zip_code_and_city_setting()  : mixed
Render the setting for the publisher zip code and city.
render_relevanssi_index_pdfs_asynchronously_setting()  : mixed
Render the setting for whether to index pdf asynchronously.
render_relevanssi_mime_types_to_exclude_setting()  : mixed
Render the setting for the Relevanssi mime types to exclude.
render_scholastica_manuscripts_url_setting()  : mixed
Render the setting for the Scholastica manuscript page setting.
render_scirate_url_abs_prefix_setting()  : mixed
Render the setting for the Scirate abstract URL prefix.
render_search_form_on_search_page_setting()  : mixed
Render the setting for whether to show a search form above the results on the search page.
render_secondary_journal_eissn_setting()  : mixed
Render the setting for the EISSN of the secondary journal.
render_secondary_journal_level_doi_suffix_setting()  : mixed
Render the setting for the journal level DOI suffix of the secondary journal.
render_secondary_journal_title_setting()  : mixed
Render the setting for the title of the secondary journal.
render_select_field()  : mixed
Render a select type field.
render_settings_page()  : mixed
Render the settings page.
render_single_line_field()  : mixed
Render a standard text box type field.
render_social_media_thumbnail_url_setting()  : mixed
Render the setting for the URL of the default thubnail for social media.
render_trackbacks_from_secondary_directly_into_database_setting()  : mixed
Render the setting for whether to write trackbacks directly.
specify_fake_field()  : mixed
Add a fake field
specify_field()  : mixed
Specify a field of the form.
specify_page()  : mixed
Specify a section of the form.
specify_section()  : mixed
Specify a section of the form.
trim()  : mixed
Trim user input to field
trim_ensure_not_empty_and_schedule_flush_rewrite_rules_if_changed()  : mixed
Trim user input to special fields connected to rewrite rules.
trim_strip_tags()  : mixed
Trim user input to field
validate_array_as_comma_separated_list()  : mixed
Validate input to comma separated list fields.
validate_array_of_at_most_1000_checked_or_unchecked()  : mixed
Validate an array of at most 1000 values of checked or unchecked
validate_array_of_at_most_1000_names()  : mixed
Validate that an array of at most 1000 names
validate_array_of_at_most_1000_roles()  : mixed
Validate an array of at most 1000 editor coordinator or steering board entries
validate_array_of_at_most_1000_urls()  : mixed
Validate an array of at most 1000 urls
validate_array_of_at_most_1000_urls_or_empty()  : mixed
Validate an array of at most 1000 urls or empty fields
validate_array_of_at_most_1000_uuidv4s()  : mixed
Validate that an array consists of at most 1000 UUIDv4s
validate_array_of_at_most_1000_years()  : mixed
Validate that an array of at most 1000 years
validate_array_of_at_most_1000_years_or_empty()  : mixed
Validate that an array of at most 1000 years or empty
validate_doi_prefix()  : mixed
Clean user input to doi_prefix fields
validate_doi_suffix()  : mixed
Clean user input to doi_suffix fields
validate_email()  : mixed
Clean user input to email fields
validate_eprint()  : string
Clean user input to eprint fields
validate_four_digit_year()  : mixed
Clean user input to fields expecting a year.
validate_input()  : array<string|int, mixed>
Validate settings.
validate_issn()  : mixed
Clean user input to issn fields
validate_issn_or_empty()  : string
Clean user input to issn fields
validate_non_negative_euros()  : mixed
Validate non-negative euro fields
validate_non_negative_float()  : mixed
Validate non-negative float
validate_positive_integer()  : mixed
Validate positive integer fields
validate_role()  : mixed
Restrict input to valid roles of people working for the journal
validate_two_letter_country_code()  : mixed
Validate two letter country code fields
validate_url()  : mixed
Clean user input to url fields
add_error()  : mixed
Record errors during input verification.
configure()  : mixed
Configure the settings singleton.
specify_sections_and_fields()  : mixed
Specifies plugin wide settings sections and fields.

Properties

$fields

Array of all field of the form.

protected array<string|int, mixed> $fields = array()

Dictionary of all fields and their properties.

Tags
since
0.4.0
access

protected

$pages

Array of all pages of the form.

protected array<string|int, mixed> $pages = array()
Tags
since
0.4.0
access

protected

$plugin_name

The unique identifier of this plugin.

protected string $plugin_name

The string used to uniquely identify this plugin.

Tags
since
0.1.0
access

private

$sections

Array of all sections of the form.

protected array<string|int, mixed> $sections = array()

Dictionary of all sections and their properties.

Tags
since
0.4.0
access

protected

$slug

Slug of this form.

protected string $slug

Used for css classes when rendering the sections and fields. Used then storing/retreiving data from the database.

Slug of the form.

Tags
since
0.4.0
access

protected

$active_post_type_names_callback

The callback from which to get the active post type names.

private mixed $active_post_type_names_callback

The callback from which to get the active post type names.

Tags
since
0.1.0
access

private

$configured

Whether this singleton had already been configured.

private static string $configured = \false
Tags
since
0.4.0
access

private

$plugin_pretty_name

The human readable name of this plugin.

private string $plugin_pretty_name

The human readable name of this plugin.

Tags
since
0.1.0
access

private

$version

The current version of the plugin.

private string $version

The current version of the plugin.

Tags
since
0.1.0
access

private

Methods

add_settings_page_to_menu()

Add the settings page to the admin menu.

public add_settings_page_to_menu() : mixed

To be added to the 'admin_menu' action.

Tags
since
0.1.0
access

public

checked()

Ensure that a check box field is checked

public checked(string $id, string $input) : mixed
Parameters
$id : string

The field this was input to.

$input : string

User input.

Tags
sinde

0.4.0

access

public

checked_or_unchecked()

Restrict input to checked or unchecked fields

public checked_or_unchecked(string $id, string $input) : mixed
Parameters
$id : string

The field this was input to.

$input : string

User input.

Tags
since
0.3.0
access

private

configured()

Check whether this settings singleton has already been configured or not.

public static configured() : bool
Tags
since
0.4.0
access

public

Return values
bool —

Whether this settings singleton has already been configured or not.

get_field_default()

Get the default value of a field by id.

public get_field_default(int $id) : string
Parameters
$id : int

Id of the field.

Tags
since
0.4.0
acceess

public

Return values
string —

Default value of the field

get_field_defaults()

Get the default values of all fields.

public get_field_defaults([bool $include_fake_fields = false ]) : mixed
Parameters
$include_fake_fields : bool = false

Whether to also include fake fields in the list.

Tags
since
0.4.0
acceess

public

get_field_title()

Get the title of a field by id.

public get_field_title(int $id) : mixed
Parameters
$id : int

Id of the field.

Tags
since
0.4.0
acceess

prublic

get_field_value()

Get the value of a field by id.

public get_field_value(int $id) : mixed
Parameters
$id : int

Id of the field.

Tags
since
0.4.0
0.4.1

If $id is of the form foo[bar] and a field of that name does not exist then an attempt is made to return index bar of field foo.

acceess

prublic

get_plugin_name()

Get the plugin_name.

public get_plugin_name() : string
Tags
since
0.3.0
access

public

Return values
string —

The name of the plugin.

get_plugin_pretty_name()

Get the plugin_pretty_name.

public get_plugin_pretty_name() : mixed
Tags
since
0.3.0
access

public

instance()

Returns the settings singleton.

public static instance([string $plugin_name = null ][, string $plugin_pretty_name = null ][, string $version = null ][, callable $active_post_type_names_callback = null ]) : O3PO_Settings

Also checks whether it has been configured.

Parameters
$plugin_name : string = null

Simple name of this plugin.

$plugin_pretty_name : string = null

Pretty name of this plugin.

$version : string = null

Version of this plugin.

$active_post_type_names_callback : callable = null

The callback from which to get the active post type names.

Tags
since
0.4.0
Return values
O3PO_Settings —

The settings singleton.

leave_unchanged()

Leave user input to field unchanged.

public leave_unchanged(string $id, string $input) : mixed
Parameters
$id : string

The field this was input to.

$input : string

User input.

Tags
since
0.3.0
access

private

register_settings()

Register all the settings.

public register_settings() : mixed

To be added to the 'admin_init' action.

Tags
since
0.1.0
access

public

render_ads_api_search_url_setting()

Render the setting for the ads api search URL.

public render_ads_api_search_url_setting() : mixed
Tags
since
0.3.0
access

public

render_ads_api_token_setting()

Render the setting for the ads api token.

public render_ads_api_token_setting() : mixed
Tags
since
0.3.0
access

public

render_ads_settings()

Render the head of the ads settings part.

public render_ads_settings() : mixed
Tags
since
0.3.0
access

public

render_array_as_comma_separated_list_field()

Render an array as comma separated list type field.

public render_array_as_comma_separated_list_field(string $id[, string $placeholder = null ]) : mixed

Does not escape or otherwise handle individual fields that contain commas.

Parameters
$id : string

Id of the field.

$placeholder : string = null

Placeholder text.

Tags
since
0.3.0
access

public

render_arxiv_doi_feed_identifier_setting()

Render the setting for the DOI feed identifier for the arXiv.

public render_arxiv_doi_feed_identifier_setting() : mixed
Tags
since
0.1.0
access

public

render_arxiv_paper_doi_feed_days_setting()

Render the setting for the arXiv DOI feed number of days.

public render_arxiv_paper_doi_feed_days_setting() : mixed
Tags
since
0.3.0
access

public

render_arxiv_paper_doi_feed_endpoint_setting()

Render the setting for the DOI feed endpoint for the arXiv.

public render_arxiv_paper_doi_feed_endpoint_setting() : mixed
Tags
since
0.3.0
access

public

render_arxiv_settings()

Render the head of the arXiv settings part.

public render_arxiv_settings() : mixed
Tags
since
0.1.0
access

public

render_arxiv_submission_history_refresh_seconds_setting()

public render_arxiv_submission_history_refresh_seconds_setting() : mixed

render_arxiv_url_abs_prefix_setting()

Render the setting for the arXiv abstract URL prefix.

public render_arxiv_url_abs_prefix_setting() : mixed
Tags
since
0.1.0
access

public

render_arxiv_url_pdf_prefix_setting()

Render the setting for the arXiv pdf URL prefix.

public render_arxiv_url_pdf_prefix_setting() : mixed
Tags
since
0.1.0
access

public

render_arxiv_url_source_prefix_setting()

Render the setting for the arXiv source URL prefix.

public render_arxiv_url_source_prefix_setting() : mixed
Tags
since
0.1.0
access

public

render_arxiv_url_trackback_prefix_setting()

Render the setting for the arXiv trackback prefix.

public render_arxiv_url_trackback_prefix_setting() : mixed
Tags
since
0.1.0
access

public

render_arxiv_vanity_url_prefix_setting()

Render the setting for the arXiv vanity URL prefix.

public render_arxiv_vanity_url_prefix_setting() : mixed
Tags
since
0.3.0
access

public

render_buffer_access_token_setting()

Render the setting for the Buffer.com access token.

public render_buffer_access_token_setting() : mixed
Tags
since
0.3.0
access

public

render_buffer_api_url_setting()

Render the setting for the Buffer.com api url.

public render_buffer_api_url_setting() : mixed
Tags
since
0.3.0
access

public

render_buffer_profile_ids_setting()

Render the setting for the Buffer.com prfile ids.

public render_buffer_profile_ids_setting() : mixed
Tags
since
0.3.0
access

public

render_buffer_settings()

Render the head of the Buffer.com settings part.

public render_buffer_settings() : mixed
Tags
since
0.3.0
access

public

render_checkbox_field()

Render a checkbox type field.

public render_checkbox_field(string $id[, string $label = '' ][, bool $esc_label = true ]) : mixed
Parameters
$id : string

Id of the field.

$label : string = ''

Label of the field.

$esc_label : bool = true

Whether to escape the content of $label, disable in case you want $label to contains htmls

Tags
since
0.1.0
access

public

render_cited_by_refresh_seconds_setting()

Render the cited by refresh seconds field

public render_cited_by_refresh_seconds_setting() : mixed
Tags
sinde

0.3.0

access

public

render_clockss_ftp_url_setting()

Render the setting for the CLOCKSS ftp url.

public render_clockss_ftp_url_setting() : mixed
Tags
since
0.1.0
access

public

render_clockss_password_setting()

Render the setting for the CLOCKSS password.

public render_clockss_password_setting() : mixed
Tags
since
0.1.0
access

public

render_clockss_settings()

Render the head of the clockss settings part.

public render_clockss_settings() : mixed
Tags
since
0.1.0
access

public

render_clockss_username_setting()

Render the setting for the CLOCKSS username.

public render_clockss_username_setting() : mixed
Tags
since
0.1.0
access

public

render_crossref_archive_locations_setting()

Render the setting for the archives the primary journal is listed in for submitting meta-data to CrossRef.

public render_crossref_archive_locations_setting() : mixed
Tags
since
0.1.0
access

public

render_crossref_crossmark_policy_page_doi_setting()

Render the setting for the crossmark policy page.

public render_crossref_crossmark_policy_page_doi_setting() : mixed
Tags
since
0.4.0
access

public

render_crossref_deposite_url_setting()

Render the setting for the CrossRef deposit URL.

public render_crossref_deposite_url_setting() : mixed
Tags
since
0.1.0
access

public

render_crossref_email_setting()

Render the setting for the email to submit to crossref.

public render_crossref_email_setting() : mixed
Tags
since
0.1.0
access

public

Render the setting for the url to query to retrieve citing articles.

public render_crossref_get_forward_links_url_setting() : mixed
since
0.1.0
access

public

render_crossref_id_setting()

Render the setting for the CorssRef id.

public render_crossref_id_setting() : mixed
Tags
since
0.1.0
access

public

render_crossref_pw_setting()

Render the setting for the CorssRef password.

public render_crossref_pw_setting() : mixed
Tags
since
0.1.0
access

public

render_crossref_settings()

Render the head of the crossref settings part.

public render_crossref_settings() : mixed
Tags
since
0.1.0
access

public

render_crossref_test_deposite_url_setting()

Render the setting for the URl of the CrossRef deposit test system.

public render_crossref_test_deposite_url_setting() : mixed
Tags
since
0.1.0
access

public

render_custom_search_page_setting()

Render the setting for whether to show the custom search page.

public render_custom_search_page_setting() : mixed
Tags
since
0.1.0
access

public

render_developer_email_setting()

Render the setting for the email of the developer.

public render_developer_email_setting() : mixed
Tags
since
0.1.0
access

public

render_doaj_api_key_setting()

Render the setting for the DOAJ api key.

public render_doaj_api_key_setting() : mixed
Tags
since
0.1.0
access

public

render_doaj_api_url_setting()

Render the setting for the URL of the DOAJ API.

public render_doaj_api_url_setting() : mixed
Tags
since
0.1.0
access

public

render_doaj_language_code_setting()

Render the setting for the language code for DOAJ.

public render_doaj_language_code_setting() : mixed
Tags
since
0.1.0
access

public

render_doaj_settings()

Render the head of the DOAJ settings part.

public render_doaj_settings() : mixed
Tags
since
0.1.0
access

public

render_doi_prefix_setting()

Render the setting for the DOI prefix.

public render_doi_prefix_setting() : mixed
Tags
since
0.1.0
access

public

render_doi_url_prefix_setting()

Render the setting for the CrossRef DOI resolution url prefix.

public render_doi_url_prefix_setting() : mixed
Tags
since
0.1.0
access

public

render_eissn_setting()

Render the setting for the EISSN.

public render_eissn_setting() : mixed
Tags
since
0.1.0
access

public

render_extended_search_and_navigation_setting()

Render the setting for whether to show the extended search-based navigation on the home page.

public render_extended_search_and_navigation_setting() : mixed
Tags
since
0.3.0
access

public

render_facebook_app_id_setting()

Render the setting for the Facebook App Id.

public render_facebook_app_id_setting() : mixed
Tags
since
0.1.0
access

public

render_fermats_library_about_url_setting()

Render the setting for the about URL of Fermat's library.

public render_fermats_library_about_url_setting() : mixed
Tags
since
0.4.0
access

public

render_fermats_library_email_setting()

Render the setting for the email of Fermt's library.

public render_fermats_library_email_setting() : mixed
Tags
since
0.1.0
access

public

render_fermats_library_url_prefix_setting()

Render the setting for the URL prefix of Fermat's library.

public render_fermats_library_url_prefix_setting() : mixed
Tags
since
0.1.0
access

public

render_first_volume_year_setting()

Render the setting for the year of the first volume.

public render_first_volume_year_setting() : mixed
Tags
since
0.1.0
access

public

render_journal_description_setting()

Render the setting for the journal description.

public render_journal_description_setting() : mixed
Tags
since
0.1.0
access

public

render_journal_level_doi_suffix_setting()

Render the setting for the journal level DOI suffix.

public render_journal_level_doi_suffix_setting() : mixed
Tags
since
0.1.0
access

public

render_journal_settings()

Render the head of the journal settings part.

public render_journal_settings() : mixed
Tags
since
0.1.0
access

public

render_journal_subtitle_setting()

Render the setting for the subtitle of the primary journal.

public render_journal_subtitle_setting() : mixed
Tags
since
0.1.0
access

public

render_journal_title_setting()

Render the setting for the journal title of the primary journal.

public render_journal_title_setting() : mixed
Tags
since
0.1.0
access

public

render_license_explanation_setting()

Render the setting for the text appearing in the license statement.

public render_license_explanation_setting() : mixed
Tags
since
0.1.0
access

public

render_license_name_setting()

Render the setting for the licence name.

public render_license_name_setting() : mixed
Tags
since
0.1.0
access

public

render_license_type_setting()

Render the setting for the license type.

public render_license_type_setting() : mixed
Tags
since
0.1.0
access

public

render_license_url_setting()

Render the setting for the license URL.

public render_license_url_setting() : mixed
Tags
since
0.1.0
access

public

render_license_version_setting()

Render the setting for the license version.

public render_license_version_setting() : mixed
Tags
since
0.1.0
access

public

render_maintenance_mode_setting()

Render the setting to enabled maintenance mode.

public render_maintenance_mode_setting() : mixed
Tags
since
0.1.0
access

public

render_mathjax_url_setting()

Render the setting for the MathJax URL.

public render_mathjax_url_setting() : mixed
Tags
since
0.1.0
access

public

render_multi_line_field()

Render a multi line text box type field.

public render_multi_line_field(string $id[, int $rows = false ][, string $style = false ][, bool $preview = false ][, string $placeholder = false ]) : mixed
Parameters
$id : string

Id of the field.

$rows : int = false

Number of rows

$style : string = false

CSS style

$preview : bool = false

Whether to show a LaTeX preview below the field.

$placeholder : string = false

Placeholder

Tags
since
0.4.0
access

public

render_orcid_url_prefix_setting()

Render the setting for the ORCID URL prefix.

public render_orcid_url_prefix_setting() : mixed
Tags
since
0.1.0
access

public

render_other_plugins_settings()

Render the head of the other plugins settings part.

public render_other_plugins_settings() : mixed
Tags
since
0.3.0
access

public

render_other_service_settings()

Render the head of the other services settings part.

public render_other_service_settings() : mixed
Tags
since
0.1.0
access

public

render_page_template_abstract_header_setting()

Render the setting for the abstract heading

public render_page_template_abstract_header_setting() : mixed
Tags
since
0.3.1
access

public

render_page_template_for_publication_posts_setting()

Render the setting for whether to use the page template for publications.

public render_page_template_for_publication_posts_setting() : mixed
Tags
since
0.3.0
access

public

render_password_field()

Render a password field.

public render_password_field(string $id) : mixed
Parameters
$id : string

Id of the field.

Tags
since
0.1.0
access

public

render_plugin_settings()

Render the head of the plugin settings page.

public render_plugin_settings() : mixed
Tags
since
0.1.0
access

public

render_production_site_url_setting()

Render the setting for the production site url.

public render_production_site_url_setting() : mixed
Tags
since
0.1.0
access

public

render_publisher_country_setting()

Render the setting for the country of the publisher.

public render_publisher_country_setting() : mixed
Tags
since
0.1.0
access

public

render_publisher_email_setting()

Render the setting for the email of the publisher.

public render_publisher_email_setting() : mixed
Tags
since
0.1.0
access

public

render_publisher_phone_setting()

Render the setting for the publisher phone.

public render_publisher_phone_setting() : mixed
Tags
since
0.4.0
access

public

render_publisher_setting()

Render the setting for the publisher name.

public render_publisher_setting() : mixed
Tags
since
0.1.0
access

public

render_publisher_street_and_number_setting()

Render the setting for the publisher street and number.

public render_publisher_street_and_number_setting() : mixed
Tags
since
0.4.0
access

public

render_publisher_zip_code_and_city_setting()

Render the setting for the publisher zip code and city.

public render_publisher_zip_code_and_city_setting() : mixed
Tags
since
0.4.0
access

public

render_relevanssi_index_pdfs_asynchronously_setting()

Render the setting for whether to index pdf asynchronously.

public render_relevanssi_index_pdfs_asynchronously_setting() : mixed
Tags
since
0.3.0
access

public

render_relevanssi_mime_types_to_exclude_setting()

Render the setting for the Relevanssi mime types to exclude.

public render_relevanssi_mime_types_to_exclude_setting() : mixed
Tags
since
0.3.0
access

public

render_scholastica_manuscripts_url_setting()

Render the setting for the Scholastica manuscript page setting.

public render_scholastica_manuscripts_url_setting() : mixed
Tags
since
0.1.0
access

public

render_scirate_url_abs_prefix_setting()

Render the setting for the Scirate abstract URL prefix.

public render_scirate_url_abs_prefix_setting() : mixed
Tags
since
0.1.0
access

public

render_search_form_on_search_page_setting()

Render the setting for whether to show a search form above the results on the search page.

public render_search_form_on_search_page_setting() : mixed
Tags
since
0.3.0
access

public

render_secondary_journal_eissn_setting()

Render the setting for the EISSN of the secondary journal.

public render_secondary_journal_eissn_setting() : mixed
Tags
since
0.1.0
access

public

render_secondary_journal_level_doi_suffix_setting()

Render the setting for the journal level DOI suffix of the secondary journal.

public render_secondary_journal_level_doi_suffix_setting() : mixed
Tags
since
0.1.0
access

public

render_secondary_journal_title_setting()

Render the setting for the title of the secondary journal.

public render_secondary_journal_title_setting() : mixed
Tags
since
0.1.0
access

public

render_select_field()

Render a select type field.

public render_select_field(string $id, array<string|int, mixed> $options[, string $onchange = false ][, mixed $label = '' ][, mixed $esc_label = true ]) : mixed
Parameters
$id : string

Id of the field.

$options : array<string|int, mixed>

The options between which to select

$onchange : string = false

The HTML onchange parameter

$label : mixed = ''
$esc_label : mixed = true
Tags
since
0.4.0
access

public

render_settings_page()

Render the settings page.

public render_settings_page() : mixed
Tags
since
0.1.0
access

public

render_single_line_field()

Render a standard text box type field.

public render_single_line_field(string $id[, string|null $placeholder = null ][, string $autocomplete = 'on' ][, string $style = false ][, string $label = false ][, bool $esc_label = true ][, string $label_style = false ][, mixed $fallback_value = false ][, mixed $readonly = false ][, mixed $default_generator = false ]) : mixed
Parameters
$id : string

Id of the field.

$placeholder : string|null = null

Placeholder text (default is null).

$autocomplete : string = 'on'

Whether to auto complete 'on' (default) or 'off.

$style : string = false

CSS style.

$label : string = false

HTML label.

$esc_label : bool = true

Whether to escape the content of label.

$label_style : string = false

CSS style for the label.

$fallback_value : mixed = false
$readonly : mixed = false
$default_generator : mixed = false
Tags
since
0.4.0
access

public

render_social_media_thumbnail_url_setting()

Render the setting for the URL of the default thubnail for social media.

public render_social_media_thumbnail_url_setting() : mixed
Tags
since
0.1.0
access

public

render_trackbacks_from_secondary_directly_into_database_setting()

Render the setting for whether to write trackbacks directly.

public render_trackbacks_from_secondary_directly_into_database_setting() : mixed
Tags
since
0.3.1
access

public

specify_fake_field()

Add a fake field

public specify_fake_field(string $id, string $default) : mixed

Fake fields cannot be modified, but have default values that can be used to avoid hard coding values.

Parameters
$id : string

Slug-name to identify the section. Used in the 'id' attribute of tags.

$default : string

Default value for the field.

Tags
since
0.4.0
access

private

specify_field()

Specify a field of the form.

public specify_field(string $id, string $title, callable $callback, string $page, string $section, array<string|int, mixed> $args, callable $validation_callable, string $default[, int $max_length = false ]) : mixed

Keeps a record of all fields in $this->fields.

Parameters
$id : string

Slug-name to identify the field. Used in the 'id' attribute of tags.

$title : string

Formatted title of the field. Shown as the heading for the field.

$callback : callable

Function that echos out any content at the top of the field (between heading and fields).

$page : string

The slug-name of the page on which to show the field.

$section : string

The slug-name of the section in which to show the field.

$args : array<string|int, mixed>

{ Extra arguments used when outputting the field. May be an empty array().

@type string $label_for When supplied, the label will be wrapped
                        in a `<label>` element, its `for` attribute populated
                        with this value.
@type string $class     CSS Class to be added to the `<tr>` element when the
                        field is output.

}

$validation_callable : callable

Callable to use during validation of inputs. Must take a field ID and input as parameters and return a valid value for the field. Should call $this->add_error() to indicate problems.

$default : string

Default value for the field.

$max_length : int = false

Maximum length of the value of the field.

Tags
since
0.4.0
access

private

specify_page()

Specify a section of the form.

public specify_page(string $id, string $title[, callable $callback = null ]) : mixed

Keeps a record of all sections in $this->sections.

Parameters
$id : string

Slug-name to identify the page.

$title : string

Formatted title of the section. Shown as the heading for the section.

$callback : callable = null

Function that echos out the any content at the top of the page (before the first section).

Tags
since
0.4.0
access

private

specify_section()

Specify a section of the form.

public specify_section(string $id, string $title, callable $callback, string $page[, callable $summary_callback = null ]) : mixed

Keeps a record of all sections in $this->sections.

Parameters
$id : string

Slug-name to identify the section. Used in the 'id' attribute of tags.

$title : string

Formatted title of the section. Shown as the heading for the section.

$callback : callable

Function that echos out any content at the top of the section (between heading and fields).

$page : string

The slug-name of the page on which to show the section.

$summary_callback : callable = null

Callback to call when composing the summary of this form.

Tags
since
0.4.0
access

private

trim()

Trim user input to field

public trim(string $id, string $input) : mixed
Parameters
$id : string

The field this was input to.

$input : string

User input.

Tags
since
0.3.0
access

private

trim_ensure_not_empty_and_schedule_flush_rewrite_rules_if_changed()

Trim user input to special fields connected to rewrite rules.

public trim_ensure_not_empty_and_schedule_flush_rewrite_rules_if_changed(string $id, string $input) : mixed

Ensure the rewrite rules are flushed when such setting is changed.

Parameters
$id : string

The field this was input to.

$input : string

User input.

Tags
since
0.3.0
access

private

trim_strip_tags()

Trim user input to field

public trim_strip_tags(string $id, string $input) : mixed
Parameters
$id : string

The field this was input to.

$input : string

User input.

Tags
since
0.3.0
access

private

validate_array_as_comma_separated_list()

Validate input to comma separated list fields.

public validate_array_as_comma_separated_list(string $id, string $input) : mixed

Break a comma separated list into an array of fields.

Parameters
$id : string

The field this was input to.

$input : string

User input.

Tags
since
0.3.0
access

private

validate_array_of_at_most_1000_checked_or_unchecked()

Validate an array of at most 1000 values of checked or unchecked

public validate_array_of_at_most_1000_checked_or_unchecked(string $id, array<string|int, mixed> $input) : mixed
Parameters
$id : string

The id of the field whose input is validated.

$input : array<string|int, mixed>

The input.

Tags
since
0.4.1
access

private

validate_array_of_at_most_1000_names()

Validate that an array of at most 1000 names

public validate_array_of_at_most_1000_names(string $id, array<string|int, mixed> $input) : mixed
Parameters
$id : string

The id of the field whose input is validated.

$input : array<string|int, mixed>

The input.

Tags
since
0.4.1
access

private

validate_array_of_at_most_1000_roles()

Validate an array of at most 1000 editor coordinator or steering board entries

public validate_array_of_at_most_1000_roles(string $id, array<string|int, mixed> $input) : mixed
Parameters
$id : string

The id of the field whose input is validated.

$input : array<string|int, mixed>

The input.

Tags
since
0.4.1
access

private

validate_array_of_at_most_1000_urls()

Validate an array of at most 1000 urls

public validate_array_of_at_most_1000_urls(string $id, array<string|int, mixed> $input) : mixed
Parameters
$id : string

The id of the field whose input is validated.

$input : array<string|int, mixed>

The input.

Tags
since
0.4.1
access

private

validate_array_of_at_most_1000_urls_or_empty()

Validate an array of at most 1000 urls or empty fields

public validate_array_of_at_most_1000_urls_or_empty(string $id, array<string|int, mixed> $input) : mixed
Parameters
$id : string

The id of the field whose input is validated.

$input : array<string|int, mixed>

The input.

Tags
since
0.4.1
access

private

validate_array_of_at_most_1000_uuidv4s()

Validate that an array consists of at most 1000 UUIDv4s

public validate_array_of_at_most_1000_uuidv4s(string $id, array<string|int, mixed> $input) : mixed
Parameters
$id : string

The id of the field whose input is validated.

$input : array<string|int, mixed>

The input.

Tags
since
0.4.3
access

private

validate_array_of_at_most_1000_years()

Validate that an array of at most 1000 years

public validate_array_of_at_most_1000_years(string $id, array<string|int, mixed> $input) : mixed
Parameters
$id : string

The id of the field whose input is validated.

$input : array<string|int, mixed>

The input.

Tags
since
0.4.1
access

private

validate_array_of_at_most_1000_years_or_empty()

Validate that an array of at most 1000 years or empty

public validate_array_of_at_most_1000_years_or_empty(string $id, array<string|int, mixed> $input) : mixed
Parameters
$id : string

The id of the field whose input is validated.

$input : array<string|int, mixed>

The input.

Tags
since
0.4.1
access

private

validate_doi_prefix()

Clean user input to doi_prefix fields

public validate_doi_prefix(string $id, string $input) : mixed
Parameters
$id : string

The field this was input to.

$input : string

User input.

Tags
since
0.4.0
access

private

validate_doi_suffix()

Clean user input to doi_suffix fields

public validate_doi_suffix(string $id, string $input) : mixed
Parameters
$id : string

The field this was input to.

$input : string

User input.

Tags
since
0.4.0
access

private

validate_email()

Clean user input to email fields

public validate_email(string $id, string $input) : mixed
Parameters
$id : string

The field this was input to.

$input : string

User input.

Tags
since
0.4.0
access

private

validate_eprint()

Clean user input to eprint fields

public validate_eprint(string $id, string $input) : string
Parameters
$id : string

The field this was input to.

$input : string

User input.

Tags
since
0.4.0
access

private

Return values
string —

Valid issn or empty string.

validate_four_digit_year()

Clean user input to fields expecting a year.

public validate_four_digit_year(string $id, string $input) : mixed
Parameters
$id : string

The field this was input to.

$input : string

User input.

Tags
since
0.3.1
access

private

validate_input()

Validate settings.

public validate_input(array<string|int, mixed> $input) : array<string|int, mixed>
Parameters
$input : array<string|int, mixed>

Array of all given input values to validate with ids as keys.

Tags
since
0.4.0
access

public

Return values
array<string|int, mixed> —

Array of validated inputs.

validate_issn()

Clean user input to issn fields

public validate_issn(string $id, string $input) : mixed
Parameters
$id : string

The field this was input to.

$input : string

User input.

Tags
since
0.3.0
access

private

validate_issn_or_empty()

Clean user input to issn fields

public validate_issn_or_empty(string $id, string $input) : string
Parameters
$id : string

The field this was input to.

$input : string

User input.

Tags
since
0.4.0
access

private

Return values
string —

Valid issn or empty string.

validate_non_negative_euros()

Validate non-negative euro fields

public validate_non_negative_euros(string $id, string $input) : mixed
Parameters
$id : string

The field this was input to.

$input : string

User input.

Tags
since
0.3.0
access

private

validate_non_negative_float()

Validate non-negative float

public validate_non_negative_float(string $id, string $input) : mixed
Parameters
$id : string

The field this was input to.

$input : string

User input.

Tags
since
0.3.0
access

private

validate_positive_integer()

Validate positive integer fields

public validate_positive_integer(string $id, string $input) : mixed
Parameters
$id : string

The field this was input to.

$input : string

User input.

Tags
since
0.3.0
access

private

validate_role()

Restrict input to valid roles of people working for the journal

public validate_role(string $id, string $input) : mixed
Parameters
$id : string

The field this was input to.

$input : string

User input.

Tags
since
0.4.1
access

private

validate_two_letter_country_code()

Validate two letter country code fields

public validate_two_letter_country_code(string $id, string $input) : mixed
Parameters
$id : string

The field this was input to.

$input : string

User input.

Tags
since
0.3.0
access

private

validate_url()

Clean user input to url fields

public validate_url(string $id, string $input) : mixed
Parameters
$id : string

The field this was input to.

$input : string

User input.

Tags
since
0.3.0
access

private

add_error()

Record errors during input verification.

protected add_error(string $setting, string $code, string $message[, string $type = 'error' ]) : mixed

Calls through to WP's add_settings_error().

Parameters
$setting : string

Slug title of the setting to which this error applies.

$code : string

Slug-name to identify the error. Used as part of 'id' attribute in HTML output.

$message : string

The formatted message text to display to the user (will be shown inside styled

and

tags).

$type : string = 'error'

Message type, controls HTML class. Possible values include 'error', 'success', 'warning', 'info'. Default value: 'error'

Tags
since
0.3.1
access

protected

configure()

Configure the settings singleton.

private configure(string $plugin_name, string $plugin_pretty_name, string $version, callable $active_post_type_names_callback) : mixed
Parameters
$plugin_name : string

Simple name of this plugin.

$plugin_pretty_name : string

Pretty name of this plugin.

$version : string

Version of this plugin.

$active_post_type_names_callback : callable

The callback from which to get the active post type names.

Tags
since
0.1.0
0.3.1

Access set to private.

access

private

specify_sections_and_fields()

Specifies plugin wide settings sections and fields.

private specify_sections_and_fields() : mixed
Tags
since
0.4.0
access

private


        
On this page

Search results