Documentation

WYSIWYG

Class providing WYSIWYG editor intergration for the plugin.

Tags
since
1.5.0

Table of Contents

$plugin_name  : string
The ID of this plugin.
__construct()  : mixed
Initialize the class and set its properties.
ajax_callback()  : mixed
AJAX Callback function when the Footnotes Button is clicked. Either in the Plain text or Visual editor.
include_scripts()  : array<string|int, string>
Includes the Plugins WYSIWYG editor script.
new_plain_text_editor_button()  : mixed
Add a new button to the plain text editor.
new_visual_editor_button()  : array<string|int, string>
Append a new Button to the WYSIWYG editor of Posts and Pages.

Properties

$plugin_name

The ID of this plugin.

private string $plugin_name
Tags
access

private

since
2.8.0

Methods

__construct()

Initialize the class and set its properties.

public __construct(string $plugin_name) : mixed
Parameters
$plugin_name : string

The name of this plugin.

Tags
since
2.8.0
Return values
mixed

ajax_callback()

AJAX Callback function when the Footnotes Button is clicked. Either in the Plain text or Visual editor.

public static ajax_callback() : mixed

Returns an JSON encoded array with the Footnotes start and end short code.

Tags
since
1.5.0
Return values
mixed

include_scripts()

Includes the Plugins WYSIWYG editor script.

public static include_scripts(array<string|int, string> $p_arr_plugins) : array<string|int, string>
Parameters
$p_arr_plugins : array<string|int, string>

Scripts to be included by the editor.

Tags
since
1.5.0
todo

Should this be static?

Return values
array<string|int, string>

new_plain_text_editor_button()

Add a new button to the plain text editor.

public static new_plain_text_editor_button() : mixed
Tags
since
1.5.0
Return values
mixed

new_visual_editor_button()

Append a new Button to the WYSIWYG editor of Posts and Pages.

public static new_visual_editor_button(array<string|int, string> $p_arr_buttons) : array<string|int, string>
Parameters
$p_arr_buttons : array<string|int, string>

Already-defined editor buttons.

Tags
since
1.5.0
todo

Should this be static?

Return values
array<string|int, string>

Search results