plugin_help
Plugin help trait - {eac}Doojigger for WordPress
Add help content to plugin administration screens
Tags
Table of Contents
- $plugin_help_fields_on_first_tab : bool
- addPluginHelpField() : void
- Add field-level content to the help tabs.
- addPluginHelpTab() : void
- Add content to the help tabs.
- addPluginSidebarLink() : void
- Add link to the help sidebar.
- addPluginSidebarText() : void
- Add text to the help sidebar.
- formatPluginHelp() : string
- Additional formatting of the help content.
- plugin_help_enabled() : bool
- plugin_help_enabled - set or test enabled for use
Properties
$plugin_help_fields_on_first_tab
public
bool
$plugin_help_fields_on_first_tab
= false
force field help on first tab
Methods
addPluginHelpField()
Add field-level content to the help tabs.
public
addPluginHelpField(array<string|int, mixed>|string $titles, string $label, array<string|int, mixed>|string $content) : void
May occur after help has been rendered.
Parameters
- $titles : array<string|int, mixed>|string
-
tab title or [multiple titles to match in priority order]
- $label : string
-
field label
- $content : array<string|int, mixed>|string
-
field content (may be [title=>content])
Return values
void —addPluginHelpTab()
Add content to the help tabs.
public
addPluginHelpTab(array<string|int, mixed>|string $title, array<string|int, mixed>|string $content[, string|array<string|int, mixed> $header = null ][, int $priority = 10 ]) : void
Parameters
- $title : array<string|int, mixed>|string
-
tab title or [title,id]
- $content : array<string|int, mixed>|string
-
tab content
- $header : string|array<string|int, mixed> = null
-
section header or [header,true] (optional)
- $priority : int = 10
-
priority of the tab (optional, default 10)
Return values
void —addPluginSidebarLink()
Add link to the help sidebar.
public
addPluginSidebarLink(string $title, string $link[, string $tooltip = null ]) : void
Parameters
- $title : string
-
link title
- $link : string
-
link url
- $tooltip : string = null
-
a title tooltip (optional)
Return values
void —addPluginSidebarText()
Add text to the help sidebar.
public
addPluginSidebarText(array<string|int, mixed>|string $content) : void
Parameters
- $content : array<string|int, mixed>|string
-
sidebar content
Return values
void —formatPluginHelp()
Additional formatting of the help content.
public
formatPluginHelp(string $content) : string
May be overloaded in your plugin
Parameters
- $content : string
-
tab content
Return values
string —plugin_help_enabled()
plugin_help_enabled - set or test enabled for use
public
plugin_help_enabled([bool $tabs = null ][, bool $fields = null ]) : bool
Parameters
- $tabs : bool = null
-
enable/disable tabs
- $fields : bool = null
-
enable/disable fields