Tkt_Template_Builder_Shortcodes
in package

Defines all ShortCodes of the TukuToi Template Builder Plugin.

Tags
author

TukuToi hello@tukutoi.com

Table of Contents

$declarations  : string
The Configuration object.
$plugin_prefix  : string
The unique prefix of this plugin.
$version  : string
The version of this plugin.
__construct()  : mixed
Initialize the class and set its properties.
do_action()  : mixed
TukuToi `[do_action]` ShortCode.
funktion()  : mixed
TukuToi `[funktion]` ShortCode.
navmenu()  : mixed
TukuToi `[navmenu]` ShortCode.
sidebar()  : mixed
TukuToi `[sidebar]` ShortCode.
template()  : mixed
TukuToi `[template]` ShortCode.
widget()  : mixed
TukuToi `[widget]` ShortCode.

Properties

$declarations

The Configuration object.

private string $declarations
Description

All configurations and declarations of this plugin.

Tags
since
1.3.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.3.0
access

private

Methods

__construct()

Initialize the class and set its properties.

public __construct(string $plugin_prefix, string $version, object $declarations, object $sanitizer, object $plugin_public) : mixed
Parameters
$plugin_prefix
(string) The unique prefix of this plugin.
$version
(string) The version of this plugin.
$declarations
(object) The Configuration object.
$sanitizer
(object) The Sanitization object.
$plugin_public
(object) The Public object of this plugin.
Tags
since
1.3.0
Return
(mixed)

do_action()

TukuToi `[do_action]` ShortCode.

public do_action(array<string|int, mixed> $atts[, mixed $content = null ], string $tag) : mixed
Description

Executes an Action.

Example usage: [do_action hook_name="wp_head"]
For possible attributes see the Parameters > $atts section below or use the TukuToi ShortCodes GUI.

Parameters
$atts
(array<string|int, mixed>)
     The ShortCode Attributes.

     @type string    $hook_name       The action to execute. Default: ''. Accepts: valid action tag.
     @type string    ...$arg          Arguments to pass. Default: ''. Accepts: comma-delimited `argument:value` pairs.
$content
(mixed) ShortCode enclosed content. Not applicable for this ShortCode. Defaults to: null
$tag
(string) The Shortcode tag. Value: 'do_action'.
Tags
since
2.0.0
Return
(mixed)

funktion()

TukuToi `[funktion]` ShortCode.

public funktion(array<string|int, mixed> $atts[, mixed $content = null ], string $tag) : mixed
Description

Executes a Function.
This ShortCode is named funktion not because we love German Language, but because PHP does not allow for a function with name function to be declared.

Example usage: [funktion function_name="my_function" args="color:red,size:big"]
For possible attributes see the Parameters > $atts section below or use the TukuToi ShortCodes GUI.

Parameters
$atts
(array<string|int, mixed>)
     The ShortCode Attributes.

     @type string    $function_name   The Function to execute. Default: ''. Accepts: valid function tag.
     @type string    ...$arg          Arguments to pass. Default: ''. Accepts: comma-delimited `argument:value` pairs.
$content
(mixed) ShortCode enclosed content. Not applicable for this ShortCode. Defaults to: null
$tag
(string) The Shortcode tag. Value: 'funktion'.
Tags
since
2.0.0
Return
(mixed)

navmenu()

TukuToi `[navmenu]` ShortCode.

public navmenu(array<string|int, mixed> $atts[, mixed $content = null ], string $tag) : mixed
Description

Shows a Navigation Menu.

Example usage: [navmenu menu="my-menu"]
For possible attributes see the Parameters > $atts section below or use the TukuToi ShortCodes GUI.

Parameters
$atts
(array<string|int, mixed>)
     The ShortCode Attributes.

    @type string $menu                Desired menu. Default: ''. Accepts: menu ID, slug, name, or object.
    @type string $menu_class          CSS class to use for the ul element which forms the menu. Default 'menu'. Accepts: valid CSS class.
    @type string menu_id              The ID that is applied to the ul element which forms the menu. Default is the menu slug, incremented. Accepts: valid CSS ID.
    @type string container            Whether to wrap the ul, and what to wrap it with. Default 'div'. Accepts: valid HTML tag.
    @type string container_class      Class that is applied to the container. Default 'menu-[menu slug]-container'. Accepts: valid CSS class.
    @type string container_id         The ID that is applied to the container. Default: ''. Accepts: valid CSS ID.
    @type string container_aria_label The aria-label attribute that is applied to the container when it's a nav element. Default: ''. Accepts: valid aria-label attribute value
    @type string fallback_cb          If the menu doesn't exist, a callback function will fire. Default: 'wp_page_menu'. Accepts: 'false', valid callback.
    @type string before               Text before the link markup. Default: ''. Accepts: valid string.
    @type string after                Text after the link markup. Default: ''. Accepts: valid string.
    @type string link_before          Text before the link text. Default: ''. Accepts: valid string.
    @type string link_after           Text after the link text. Default: ''. Accepts: valid string.
    @type int    depth                How many levels of the hierarchy are to be included. 0 means all. Default: 0. Accepts: valid integer.
    @type object walker               Instance of a custom walker class. Default: ''. Accepts: valid Class Name with arguments (ClassName($arg, $arg1)).
    @type string theme_location       Theme location to be used. Must be registered with register_nav_menu() in order to be selectable by the user. Default: ''. Accepts: valid Theme Location.
    @type string items_wrap           How the list items should be wrapped. Uses printf() format with numbered placeholders. Default: ul with an id and class. Accepts: valid printf() format.
    @type string item_spacing         Whether to preserve whitespace within the menu's HTML. Default: 'preserve'. Accepts: 'preserve' or 'discard'.
$content
(mixed) ShortCode enclosed content. Not applicable for this ShortCode. Defaults to: null
$tag
(string) The Shortcode tag. Value: 'navmenu'.
Tags
since
2.0.0
Return
(mixed)

sidebar()

TukuToi `[sidebar]` ShortCode.

public sidebar(array<string|int, mixed> $atts[, mixed $content = null ], string $tag) : mixed
Description

Displays a Sidebar.

Example usage: [sidebar sidebar="my-sidebar" error="The sidebar cannot be found"]
For possible attributes see the Parameters > $atts section below or use the TukuToi ShortCodes GUI.

Parameters
$atts
(array<string|int, mixed>)
     The ShortCode Attributes.

     @type string    $sidebar        The Sidebar to display. Default: ''. Accepts: valid sidebar Index, name or ID.
     @type string    $error          An error if the sidebar cannot be found. Default: ''. Accepts: valid string.
$content
(mixed) ShortCode enclosed content. Not applicable for this ShortCode. Defaults to: null
$tag
(string) The Shortcode tag. Value: 'sidebar'.
Tags
since
2.0.0
Return
(mixed)

template()

TukuToi `[template]` ShortCode.

public template(array<string|int, mixed> $atts[, mixed $content = null ], string $tag) : mixed
Description

Outputs a Template when used as ShortCode.

Example usage: [template id="123"]
For possible attributes see the Parameters > $atts section below or use the TukuToi ShortCodes GUI.

Parameters
$atts
(array<string|int, mixed>)
     The ShortCode Attributes.

     @type string    $id       The ID of the Template to load. Default: 0. Accepts: valid Template ID.
$content
(mixed) ShortCode enclosed content. Not applicable for this ShortCode. Defaults to: null
$tag
(string) The Shortcode tag. Value: 'template'.
Tags
since
1.3.0
Return
(mixed)

widget()

TukuToi `[widget]` ShortCode.

public widget(array<string|int, mixed> $atts[, mixed $content = null ], string $tag) : mixed
Description

Displays a Widget.

Example usage: [widget widget="WP_Widget_Archives" title="Your Archives" count="1" dropdown="1"]
For possible attributes see the Parameters > $atts section below or use the TukuToi ShortCodes GUI.

Parameters
$atts
(array<string|int, mixed>)
     The ShortCode Attributes.

     @type string    $widget        The Widget to display. Default: ''. Accepts: valid Widget ClassName.
     @type string    $before_widget HTML content that will be prepended to the widget's HTML output. Default: <div class="widget %s"> (where %s is widget's class name). Accepts: valid HTML opening tag.
     @type string    $after_widget  HTML content that will be appended to the widget's HTML output. Default: </div>. Accepts: valid HTML closing tag.
     @type string    $before_title  HTML content that will be prepended to the widget's title when displayed. Default <h2 class="widgettitle">. Accepts: valid HTML opening tag.
     @type string    $after_title   HTML content that will be appended to the widget's title when displayed. Default </h2>. Accepts: valid HTML closing tag.
$content
(mixed) ShortCode enclosed content. Not applicable for this ShortCode, unless for 'WP_Widget_Custom_HTML' and 'WP_Widget_Text', where the wrapped $content will be the content of the HTML or Text widget. Defaults to: null
$tag
(string) The Shortcode tag. Value: 'widget'.
Tags
since
2.0.0
Return
(mixed)

Search results