Tkt_Shortcodes_Gui
in package

The class to generate a ShortCode GUI.

Description

Defines all type of Input fields necessary, also creates specific methods to populate eventual options and returns a fully usable GUI (jQuery dialog) for each ShortCode.

Tags
todo

Move all these procedural silly single methods to a more abstract method! The almost to all the same thing, unless one or two. Thus use arguments, not new methods.

since
1.4.0
author

Beda Schmid beda@tukutoi.com

Table of Contents

$declarations  : array<string|int, mixed>
The Configuration object.
$plugin_prefix  : string
The unique prefix of this plugin.
$version  : string
The current version of the plugin.
__construct()  : mixed
Define the core functionality of the plugin.
get_shortcode_gui()  : mixed
Get the GUI for the requested ShortCode.
alltypes_options()  : mixed
Create a Select Field set for the ShortCodes Forms SiteInfo Display Options.
attachment_options()  : mixed
Create a Select Field set for the ShortCodes Forms Attachment Display Options.
checkbox_fieldset()  : mixed
Create a Checkbox Field set for the ShortCodes Forms.
conditional_options()  : mixed
Create a Select Field set for the ShortCodes Forms Conditional Options.
imagesize_options()  : mixed
Create a Select Field set for the ShortCodes Forms Attachment Display Options.
math_options()  : mixed
Create a Select Field set for the ShortCodes Forms Math Options.
postshow_options()  : mixed
Create a Select Field set for the ShortCodes Forms Post Display Options.
posttypes_options()  : mixed
Create a Select Field set for the ShortCodes Forms Taxonomy Options.
roundconstants_options()  : mixed
Create a Select Field set for the ShortCodes Forms Attachment Display Options.
sanitize_options()  : mixed
Create a Select Field set for the ShortCodes Forms Sanitization options.
select_fieldset()  : mixed
Create a Select Field set for the ShortCodes Forms.
siteshow_options()  : mixed
Create a Select Field set for the ShortCodes Forms SiteInfo Display Options.
taxonomy_options()  : mixed
Create a Select Field set for the ShortCodes Forms Taxonomy Options.
termshow_options()  : mixed
Create a Select Field set for the ShortCodes Forms Term Display Options.
text_fieldset()  : mixed
Create a Generic Field set for the ShortCodes Forms.
usergetby_options()  : mixed
Create a Select Field set for the ShortCodes Forms User Get By Options.
usershow_options()  : mixed
Create a Select Field set for the ShortCodes Forms User Display Options.

Properties

$declarations

The Configuration object.

private array<string|int, mixed> $declarations
Description

All configurations and declarations of this plugin.

Tags
since
1.0.0
access

private

$plugin_prefix

The unique prefix of this plugin.

private string $plugin_prefix
Description

The string used to uniquely prefix technical functions of this plugin.

Tags
since
1.0.0
access

private

$version

The current version of the plugin.

private string $version
Description

The current version of the plugin.

Tags
since
1.0.0
access

private

Methods

__construct()

Define the core functionality of the plugin.

public __construct(string $plugin_prefix, string $version, string $shortcode, array<string|int, mixed> $declarations) : mixed
Description

Set the plugin name and the plugin version that can be used throughout the plugin. Load the dependencies, define the locale, and set the hooks for the admin area and the public-facing side of the site.

Parameters
$plugin_prefix
(string) The unique prefix of this plugin.
$version
(string) The version of this plugin.
$shortcode
(string) The ShortCode requested.
$declarations
(array<string|int, mixed>) The Configuration object.
Tags
since
1.0.0
Return
(mixed)

get_shortcode_gui()

Get the GUI for the requested ShortCode.

public get_shortcode_gui() : mixed
Tags
since
1.4.0
Return
(mixed) $gui The Requested GUI Form.

alltypes_options()

Create a Select Field set for the ShortCodes Forms SiteInfo Display Options.

private alltypes_options() : mixed
Tags
since
1.4.0
Return
(mixed)

attachment_options()

Create a Select Field set for the ShortCodes Forms Attachment Display Options.

private attachment_options() : mixed
Tags
since
1.4.0
Return
(mixed)

checkbox_fieldset()

Create a Checkbox Field set for the ShortCodes Forms.

private checkbox_fieldset(string $attribute, string $label, string $value[, string $explanation = 'Wether to return a single value or an array' ][, string $checked = 'checked' ]) : mixed
Parameters
$attribute
(string) The ShortCode attribute.
$label
(string) The ShortCode Attrbute Label.
$value
(string) The ShortCode Attribute default value.
$explanation
(string) The ShortCode Attribute explanation. Defaults to: 'Wether to return a single value or an array'
$checked
(string) Whether the Checkbox is checked or not. Defaults to: 'checked'
Tags
todo

remove this ugly default, untranslated string $explanation.

since
1.4.0
Return
(mixed)

conditional_options()

Create a Select Field set for the ShortCodes Forms Conditional Options.

private conditional_options() : mixed
Tags
since
1.4.0
Return
(mixed)

imagesize_options()

Create a Select Field set for the ShortCodes Forms Attachment Display Options.

private imagesize_options() : mixed
Tags
since
1.4.0
Return
(mixed)

math_options()

Create a Select Field set for the ShortCodes Forms Math Options.

private math_options() : mixed
Tags
since
1.4.0
Return
(mixed)

postshow_options()

Create a Select Field set for the ShortCodes Forms Post Display Options.

private postshow_options() : mixed
Tags
since
1.4.0
Return
(mixed)

posttypes_options()

Create a Select Field set for the ShortCodes Forms Taxonomy Options.

private posttypes_options() : mixed
Tags
since
1.4.0
Return
(mixed)

roundconstants_options()

Create a Select Field set for the ShortCodes Forms Attachment Display Options.

private roundconstants_options() : mixed
Tags
since
1.4.0
Return
(mixed)

sanitize_options()

Create a Select Field set for the ShortCodes Forms Sanitization options.

private sanitize_options() : mixed
Tags
since
1.4.0
Return
(mixed)

select_fieldset()

Create a Select Field set for the ShortCodes Forms.

private select_fieldset(string $attribute, string $label, string $value, string|array<string|int, mixed> $callback) : mixed
Parameters
$attribute
(string) The ShortCode attribute.
$label
(string) The ShortCode Attrbute Label.
$value
(string) The ShortCode Attribute default value.
$callback
(string |array<string|int, mixed>) The user Callback to generate the select options. Default: ''. Accepts: 'callback', array( $object, 'method' ).
Tags
since
1.4.0
Return
(mixed)

siteshow_options()

Create a Select Field set for the ShortCodes Forms SiteInfo Display Options.

private siteshow_options() : mixed
Tags
since
1.4.0
Return
(mixed)

taxonomy_options()

Create a Select Field set for the ShortCodes Forms Taxonomy Options.

private taxonomy_options() : mixed
Tags
since
1.4.0
Return
(mixed)

termshow_options()

Create a Select Field set for the ShortCodes Forms Term Display Options.

private termshow_options() : mixed
Tags
since
1.4.0
Return
(mixed)

text_fieldset()

Create a Generic Field set for the ShortCodes Forms.

private text_fieldset(string $attribute, string $label, string $value, string $explanation) : mixed
Parameters
$attribute
(string) The ShortCode attribute.
$label
(string) The ShortCode Attrbute Label.
$value
(string) The ShortCode Attribute default value.
$explanation
(string) The ShortCode Attribute explanation.
Tags
since
1.4.0
Return
(mixed)

usergetby_options()

Create a Select Field set for the ShortCodes Forms User Get By Options.

private usergetby_options() : mixed
Tags
since
1.4.0
Return
(mixed)

usershow_options()

Create a Select Field set for the ShortCodes Forms User Display Options.

private usershow_options() : mixed
Tags
since
1.4.0
Return
(mixed)

Search results