Options
Settings Options Utilities
Tags
Table of Contents
- DOCUMENT_FIELDS_OPTION_KEY = 'dlp_document_fields'
- DOCUMENT_PAGE_OPTION_KEY = 'dlp_document_page'
- DOCUMENT_SLUG_OPTION_KEY = 'dlp_document_slug'
- FOLDER_CLOSE_SVG_OPTION_KEY = 'dlp_folder_icon_svg_closed'
- FOLDER_OPEN_SVG_OPTION_KEY = 'dlp_folder_icon_svg_open'
- GENERAL_OPTION_GROUP = 'document_library_pro_general'
- GRID_OPTION_GROUP = 'document_library_pro_grid'
- MISC_OPTION_KEY = 'dlp_misc_settings'
- SEARCH_PAGE_OPTION_KEY = 'dlp_search_page'
- SHORTCODE_OPTION_KEY = 'dlp_shortcode_defaults'
- SINGLE_DOCUMENT_DISPLAY_OPTION_KEY = 'dlp_document_fields_display'
- SINGLE_OPTION_GROUP = 'document_library_pro_single_document'
- TABLE_OPTION_GROUP = 'document_library_pro_table'
- get_additional_options() : mixed
- Get additional options.
- get_dlp_specific_default_args() : array<string|int, string>
- Retrieves the default args specific to DLP (as opposed to the PTP defaults)
- get_document_display_default_structure() : array<string|int, mixed>
- Get the document display default structure.
- get_document_display_fields() : array<string|int, mixed>
- Retrieve the single document display option.
- get_document_display_option_labels() : mixed
- Get the document display option labels
- get_document_fields() : array<string|int, mixed>
- Retrive the Document post type fields.
- get_document_slug() : array<string|int, mixed>
- Retrieve the document slug
- get_search_page_option() : mixed
- get_shortcode_options() : array<string|int, mixed>
- Retrieve the shortcode options.
- get_user_shortcode_options() : mixed
- get_version_control_mode() : bool|string
- Return the version control mode (keep or delete) or false if version control is disabled
- is_submission_admin_email_active() : bool
- Determine if admin notifications for frontend submissions are active.
- is_submission_moderated() : bool
- Determine if frontend submissions are moderated.
- is_version_history_active() : bool
- Determine whether the version control is enabled and the replacing file strategy is set to `keep`
- normalize_user_arguments() : array<string|int, mixed>
- Normalize user arguments provided to shortcode.
- sanitize_grid_content() : array<string|int, mixed>
- Sanitizes grid content data to the correct array format.
- string_list_to_multicheckbox_array() : null|array<string|int, mixed>
- Convert a string list to a multicheckbox array.
- update_shortcode_option() : mixed
- uses_excerpt_option() : bool
- Determine if the excerpt option is enabled and in use.
- get_option() : mixed
- Retrieve an option.
- sanitize_shortcode_options() : mixed
Constants
DOCUMENT_FIELDS_OPTION_KEY
public
mixed
DOCUMENT_FIELDS_OPTION_KEY
= 'dlp_document_fields'
Tags
DOCUMENT_PAGE_OPTION_KEY
public
mixed
DOCUMENT_PAGE_OPTION_KEY
= 'dlp_document_page'
Tags
DOCUMENT_SLUG_OPTION_KEY
public
mixed
DOCUMENT_SLUG_OPTION_KEY
= 'dlp_document_slug'
Tags
FOLDER_CLOSE_SVG_OPTION_KEY
public
mixed
FOLDER_CLOSE_SVG_OPTION_KEY
= 'dlp_folder_icon_svg_closed'
Tags
FOLDER_OPEN_SVG_OPTION_KEY
public
mixed
FOLDER_OPEN_SVG_OPTION_KEY
= 'dlp_folder_icon_svg_open'
Tags
GENERAL_OPTION_GROUP
public
mixed
GENERAL_OPTION_GROUP
= 'document_library_pro_general'
Tags
GRID_OPTION_GROUP
public
mixed
GRID_OPTION_GROUP
= 'document_library_pro_grid'
Tags
MISC_OPTION_KEY
public
mixed
MISC_OPTION_KEY
= 'dlp_misc_settings'
Tags
SEARCH_PAGE_OPTION_KEY
public
mixed
SEARCH_PAGE_OPTION_KEY
= 'dlp_search_page'
Tags
SHORTCODE_OPTION_KEY
public
mixed
SHORTCODE_OPTION_KEY
= 'dlp_shortcode_defaults'
Tags
SINGLE_DOCUMENT_DISPLAY_OPTION_KEY
public
mixed
SINGLE_DOCUMENT_DISPLAY_OPTION_KEY
= 'dlp_document_fields_display'
Tags
SINGLE_OPTION_GROUP
public
mixed
SINGLE_OPTION_GROUP
= 'document_library_pro_single_document'
Tags
TABLE_OPTION_GROUP
public
mixed
TABLE_OPTION_GROUP
= 'document_library_pro_table'
Tags
Methods
get_additional_options()
Get additional options.
public
static get_additional_options() : mixed
We use the PTP function to maintain consistency across grid and table code.
Tags
Return values
mixed —get_dlp_specific_default_args()
Retrieves the default args specific to DLP (as opposed to the PTP defaults)
public
static get_dlp_specific_default_args() : array<string|int, string>
Tags
Return values
array<string|int, string> —get_document_display_default_structure()
Get the document display default structure.
public
static get_document_display_default_structure() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —get_document_display_fields()
Retrieve the single document display option.
public
static get_document_display_fields() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —get_document_display_option_labels()
Get the document display option labels
public
static get_document_display_option_labels() : mixed
Tags
Return values
mixed —get_document_fields()
Retrive the Document post type fields.
public
static get_document_fields() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —get_document_slug()
Retrieve the document slug
public
static get_document_slug() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —get_search_page_option()
public
static get_search_page_option() : mixed
Tags
Return values
mixed —get_shortcode_options()
Retrieve the shortcode options.
public
static get_shortcode_options([array<string|int, mixed> $defaults = [] ]) : array<string|int, mixed>
We use the PTP function to maintain consistency across grid and table code.
Parameters
- $defaults : array<string|int, mixed> = []
Tags
Return values
array<string|int, mixed> —get_user_shortcode_options()
public
static get_user_shortcode_options() : mixed
Tags
Return values
mixed —get_version_control_mode()
Return the version control mode (keep or delete) or false if version control is disabled
public
static get_version_control_mode() : bool|string
Tags
Return values
bool|string —Either 'keep', 'delete' or false
is_submission_admin_email_active()
Determine if admin notifications for frontend submissions are active.
public
static is_submission_admin_email_active() : bool
Tags
Return values
bool —is_submission_moderated()
Determine if frontend submissions are moderated.
public
static is_submission_moderated() : bool
Tags
Return values
bool —is_version_history_active()
Determine whether the version control is enabled and the replacing file strategy is set to `keep`
public
static is_version_history_active() : bool
Tags
Return values
bool —normalize_user_arguments()
Normalize user arguments provided to shortcode.
public
static normalize_user_arguments(array<string|int, mixed> $args) : array<string|int, mixed>
Parameters
- $args : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —sanitize_grid_content()
Sanitizes grid content data to the correct array format.
public
static sanitize_grid_content(mixed $fields) : array<string|int, mixed>
Parameters
- $fields : mixed
Tags
Return values
array<string|int, mixed> —string_list_to_multicheckbox_array()
Convert a string list to a multicheckbox array.
public
static string_list_to_multicheckbox_array(mixed $string_list) : null|array<string|int, mixed>
Parameters
- $string_list : mixed
Tags
Return values
null|array<string|int, mixed> —update_shortcode_option()
public
static update_shortcode_option([mixed $values = [] ]) : mixed
Parameters
- $values : mixed = []
Tags
Return values
mixed —uses_excerpt_option()
Determine if the excerpt option is enabled and in use.
public
static uses_excerpt_option() : bool
- New installs and existing installs with the excerpt option disabled will return false.
- Used to remove the excerpt option from the single document display settings in a backwards compatible way.
Tags
Return values
bool —get_option()
Retrieve an option.
private
static get_option(string $option, mixed $default) : mixed
Parameters
- $option : string
- $default : mixed
Tags
Return values
mixed —sanitize_shortcode_options()
private
static sanitize_shortcode_options(array<string|int, mixed> $options[, array<string|int, mixed> $defaults = [] ]) : mixed
Parameters
- $options : array<string|int, mixed>
- $defaults : array<string|int, mixed> = []