API Documentation

Interfaces, Classes, Traits and Enums

Cp_Plgn_Drctry_Admin
Class to handle general Admin Area Features.
Cp_Plgn_Drctry_Cp_Plugins_Dir
The class to gather and list all Plugins from all apis.
Cp_Plgn_Drctry_Plugin_Fx
Class to handle helper Functions for Plugin Management.
Cp_Plgn_Drctry_Settings
The settings for this plugin.
Cp_Plgn_Drctry_Activator
Fired during plugin activation.
Cp_Plgn_Drctry_Deactivator
Fired during plugin deactivation.
Cp_Plgn_Drctry_I18n
Define the internationalization functionality.
Cp_Plgn_Drctry_Loader
Register all actions and filters for the plugin.
Cp_Plgn_Drctry
The core plugin class.
Tkt_Search_And_Filter_Admin
The admin-specific functionality of the plugin.
Tkt_Search_And_Filters_Gui
The class to generate a ShortCode GUI.
Tkt_Common
The TukuToi Common functionality.
Tkt_Shortcodes_Processor
The ShortCode Resolver Class.
Tkt_Search_And_Filter_Activator
Fired during plugin activation.
Tkt_Search_And_Filter_Deactivator
Fired during plugin deactivation.
Tkt_Search_And_Filter_Declarations
The Declarations Class.
Tkt_Search_And_Filter_I18n
Define the internationalization functionality.
Tkt_Search_And_Filter_Loader
Register all actions and filters for the plugin.
Tkt_Search_And_Filter_Sanitizer
The Sanitization, Validation and error handling Class.
Tkt_Search_And_Filter
The core plugin class.
Tkt_Search_And_Filter_Posts_Query
The Posts Query Builder
Tkt_Search_And_Filter_Public
The public-facing functionality of the plugin.
Tkt_Search_And_Filter_Shortcodes
Defines all ShortCodes of the TukuToi Search & Filter Plugin.
Tkt_Shortcodes_Admin
The admin-specific functionality of the plugin.
Tkt_Shortcodes_Gui
The class to generate a ShortCode GUI.
Tkt_Common
The TukuToi Common functionality.
Tkt_Shortcodes_Processor
The ShortCode Resolver Class.
Tkt_Shortcodes_Activator
Fired during plugin activation.
Tkt_Shortcodes_Deactivator
Fired during plugin deactivation.
Tkt_Shortcodes_Declarations
The Declarations Class.
Tkt_Shortcodes_I18n
Define the internationalization functionality.
Tkt_Shortcodes_Loader
Register all actions and filters for the plugin.
Tkt_Shortcodes_Sanitizer
The ShortCode Sanitization, Validation and error handling Class.
Tkt_Shortcodes
The core plugin class.
Tkt_Shortcodes_Shortcodes
Defines all ShortCodes of the TukuToi ShortCodes Plugin.
Tkt_Template_Builder_Admin
The admin-specific functionality of the plugin.
Tkt_Template_Builder_Gui
The class to generate a ShortCode GUI.
Tkt_Common
The TukuToi Common functionality.
Tkt_Shortcodes_Processor
The ShortCode Resolver Class.
Tkt_Template_Builder_Activator
Fired during plugin activation.
Tkt_Template_Builder_Deactivator
Fired during plugin deactivation.
Tkt_Template_Builder_Declarations
The Declarations Class.
Tkt_Template_Builder_I18n
Define the internationalization functionality.
Tkt_Template_Builder_Loader
Register all actions and filters for the plugin.
Tkt_Template_Builder_Sanitizer
The Sanitization, Validation and error handling Class.
Tkt_Template_Builder
The core plugin class.
Tkt_Template_Builder_Public
The public-facing functionality of the plugin.
Tkt_Template_Builder_Shortcodes
Defines all ShortCodes of the TukuToi Template Builder Plugin.
WP_Bootstrap_Navwalker
WP_Bootstrap_Navwalker class.
Cp_Plgn_Drctry_Cp_Api_v2
Trait to get Plugins from the CP API.
Cp_Plgn_Drctry_Cp_Api
Trait to get Plugins from the CP API.
Cp_Plgn_Drctry_Fx
Trait to provide helper Functions for arbitrary operations.
Cp_Plgn_Drctry_GitHub
Trait to get Plugins from the CP API.

Table of Contents

CP_PLGN_DRCTRY_BASE_NAME  = \plugin_basename(__FILE__)
Define the Plugin basename.
CP_PLGN_DRCTRY_VERSION  = '1.4.0'
Current plugin version.
TKT_COMMON_LOADED  = true
Defines if the TukuToi Common Code is already loaded
TKT_COMMON_LOADED  = true
Whether the TukuToi Common code is loaded or not.
TKT_COMMON_LOADED  = true
Whether the common code is loaded or not.
TKT_SEARCH_AND_FILTER_VERSION  = '2.29.1'
Current plugin version.
TKT_SHORTCODES_VERSION  = '1.26.2'
Current plugin version.
TKT_TEMPLATE_BUILDER_VERSION  = '1.8.9'
Current plugin version.
cp_plgn_drctry_activate()  : mixed
The code that runs during plugin activation.
cp_plgn_drctry_deactivate()  : mixed
The code that runs during plugin deactivation.
cp_plgn_drctry_run()  : void
Begins execution of the plugin.
cp_plgn_drctry_uninstall()  : void
Perform Uninstall Actions.
better_dropdown_users()  : string
### Start Comment to document Fix ### This function is not offerng a way to alter the `value` of the User Dropdown options.
better_dropdown_categories()  : string
### Start Comment to document Fix ### Taxonomy Dropdown is a little less messy than user Dropdown but misses the multiselect.
better_paginate_links()  : array<string|int, mixed>|string|void
### Start Comment to document Fix ### Pagination links is a mess. This needs to be urgently refactored and enhqanced.
plugin_name_activate()  : mixed
The code that runs during plugin activation.
plugin_name_deactivate()  : mixed
The code that runs during plugin deactivation.
tkt_search_and_filters_run()  : mixed
Begins execution of the plugin.
plugin_name_uninstall()  : mixed
Perform Uninstall Actions.
tkt_shortcodes_activate()  : mixed
The code that runs during plugin activation.
tkt_shortcodes_deactivate()  : mixed
The code that runs during plugin deactivation.
tkt_shortcodes_run()  : mixed
Begins execution of the plugin.
plugin_name_uninstall()  : mixed
Perform Uninstall Actions.
tkt_tmplt_bldr_activate()  : mixed
The code that runs during plugin activation.
tkt_tmplt_bldr_deactivate()  : mixed
The code that runs during plugin deactivation.
tkt_tmplt_bldr_run()  : mixed
Begins execution of the plugin.
plugin_name_uninstall()  : mixed
Perform Uninstall Actions.

Constants

CP_PLGN_DRCTRY_BASE_NAME

Define the Plugin basename.

public string CP_PLGN_DRCTRY_BASE_NAME = \plugin_basename(__FILE__)
Description

The Plugin Basename.

CP_PLGN_DRCTRY_VERSION

Current plugin version.

public string CP_PLGN_DRCTRY_VERSION = '1.4.0'
Description

Start at version 1.0.0 and use SemVer. Rename this for your plugin and update it as you release new versions.

Description

The Plugin Version.

Tags
link
https://semver.org

TKT_COMMON_LOADED

Defines if the TukuToi Common Code is already loaded

public bool TKT_COMMON_LOADED = true
Description

Whether the common code is loaded or not.

TKT_COMMON_LOADED

Whether the TukuToi Common code is loaded or not.

public bool TKT_COMMON_LOADED = true
Description

If the common code is loaded.

TKT_COMMON_LOADED

Whether the common code is loaded or not.

public bool TKT_COMMON_LOADED = true
Description

If the common code is loaded.

TKT_SEARCH_AND_FILTER_VERSION

Current plugin version.

public string TKT_SEARCH_AND_FILTER_VERSION = '2.29.1'
Description

Start at version 1.0.0 and use SemVer Rename this for your plugin and update it as you release new versions.

Description

The version of this plugin.

Tags
link
https://semver.org

TKT_SHORTCODES_VERSION

Current plugin version.

public string TKT_SHORTCODES_VERSION = '1.26.2'
Description

Start at version 1.0.0 and use SemVer Rename this for your plugin and update it as you release new versions.

Description

The Version of this plugin.

Tags
link
https://semver.org

TKT_TEMPLATE_BUILDER_VERSION

Current plugin version.

public string TKT_TEMPLATE_BUILDER_VERSION = '1.8.9'
Description

Start at version 0.0.1 and use SemVer Rename this for your plugin and update it as you release new versions.

Description

The version of this plugin.

Tags
see
https://semver.org

Functions

cp_plgn_drctry_run()

Begins execution of the plugin.

cp_plgn_drctry_run() : void
Description

Since everything within the plugin is registered via hooks, kicking off the plugin from this point in the file does not affect the page life cycle.

Tags
since
1.0.0
Return
(void)

cp_plgn_drctry_uninstall()

Perform Uninstall Actions.

cp_plgn_drctry_uninstall() : void
Description

If uninstall not called from WordPress, If no uninstall action, If not this plugin, If no caps, then exit.

Tags
since
1.0.0
Return
(void)

better_dropdown_users()

### Start Comment to document Fix ### This function is not offerng a way to alter the `value` of the User Dropdown options.

better_dropdown_users([array<string|int, mixed>|string $args = '' ]) : string
Description

The fix adds the option to alter the value by any data from the user data object which should be used to start with, but WP Somehow chose to do things awkwardly when it comes to users

Also this fix includes a better output build. The Horrific syntax used in core for this is ununderstandable to me. It includes as well a new attribute to actually escape the output echoed. I mean, wtf.

Needless to say that also now it is WPCS compliant, which it was NOT at time of editing. If code comments would support emojy, I would :puke: at this point.

And for those who say this is useless or so:

  1. wp_dropdown_categories( string|array $args = '' ) does HAVE the value_field attribute which exactly what is needed.
  2. It IS useful because these dropdowns are not only used for silly thigns.
  3. Current core code was/is messy, unsafe and incomplete, as usual when it comes to USERS in WP.

Additionally this thing does not even support multiple selects, for whatever reasons. Yes, the HTML has a filter applied, but it is not the goal of filters to FIX things, it is the goal of filters to ALTER EXISTING content. Thus, we added a option for multi, too, which was there already but literally did NOTHING. I mean NOTHING. AT. ALL.

End Comment to document Fix

Create dropdown HTML content of users.

The content can either be displayed, which it is by default or retrieved by setting the 'echo' argument. The 'include' and 'exclude' arguments do not need to be used; all users will be displayed in that case. Only one can be used, either 'include' or 'exclude', but not both.

The available arguments are as follows:

Parameters
$args
(array<string|int, mixed> |string)
    Optional. Array or string of arguments to generate a drop-down of users.
    See WP_User_Query::prepare_query() for additional available arguments.

    @type string       $show_option_all         Text to show as the drop-down default (all).
                                                Default empty.
    @type string       $show_option_none        Text to show as the drop-down default when no
                                                users were found. Default empty.
    @type int|string   $option_none_value       Value to use for $show_option_non when no users
                                                were found. Default -1.
    @type string       $hide_if_only_one_author Whether to skip generating the drop-down
                                                if only one user was found. Default empty.
    @type string       $orderby                 Field to order found users by. Accepts user fields.
                                                Default 'display_name'.
    @type string       $order                   Whether to order users in ascending or descending
                                                order. Accepts 'ASC' (ascending) or 'DESC' (descending).
                                                Default 'ASC'.
    @type array|string $include                 Array or comma-separated list of user IDs to include.
                                                Default empty.
    @type array|string $exclude                 Array or comma-separated list of user IDs to exclude.
                                                Default empty.
    @type bool|int     $multi                   Whether to skip the ID attribute on the 'select' element.
                                                Accepts 1|true or 0|false. Default 0|false.
    @type string       $show                    User data to display. If the selected item is empty
                                                then the 'user_login' will be displayed in parentheses.
                                                Accepts any user field, or 'display_name_with_login' to show
                                                the display name with user_login in parentheses.
                                                Default 'display_name'.
    @type string       $value_field             User `data` object values to use as selection option **value**.
                                                Accepts any User `data` object property.
                                                Default to user ID.
    @type int|bool     $echo                    Whether to echo or return the drop-down. Accepts 1|true (echo)
                                                or 0|false (return). Default 1|true.
    @type int|bool     $allowed_html            Array of allowed HTML to pass to wp_kses if echo.
    @type int          $selected                Which user ID should be selected. Default 0. If $value is passed,
                                                $selected should pass a valid value to match $value.
    @type bool         $include_selected        Whether to always include the selected user ID in the drop-
                                                down. Default false.
    @type string       $name                    Name attribute of select element. Default 'user'.
    @type string       $id                      ID attribute of the select element. Default is the value of $name.
    @type string       $class                   Class attribute of the select element. Default empty.
    @type int          $blog_id                 ID of blog (Multisite only). Default is ID of the current blog.
    @type string       $who                     Which type of users to query. Accepts only an empty string or
                                                'authors'. Default empty.
    @type string|array $role                    An array or a comma-separated list of role names that users must
                                                match to be included in results. Note that this is an inclusive
                                                list: users must match *each* role. Default empty.
    @type array        $role__in                An array of role names. Matched users must have at least one of
                                                these roles. Default empty array.
    @type array        $role__not_in            An array of role names to exclude. Users matching one or more of
                                                these roles will not be included in results. Default empty array.
Defaults to: ''
Tags
since

WP-2.3.0

since

WP-4.5.0 Added the 'display_name_with_login' value for 'show'.

since

WP-4.7.0 Added the $role, $role__in, and $role__not_in parameters.

since

TUKUTOI Added the $value_field parameter.

Return
(string) String of HTML content.

better_dropdown_categories()

### Start Comment to document Fix ### Taxonomy Dropdown is a little less messy than user Dropdown but misses the multiselect.

better_dropdown_categories([string|array<string|int, mixed> $args = '' ]) : string
Description

The suggested solution wp_terms_checklist is a huge garbage, almost worse than user Dropdown. Long enough I have battled the messy crap it generates and yu need to subclass its walker to even alter just one tiny aspect of its HTML. This is just an example of what shit programming is. Not saying I can do better, but obviously this is not the standards I would expect from WP or CP.

End Comment to document Fix

Display or retrieve the HTML dropdown list of categories.

The 'hierarchical' argument, which is disabled by default, will override the depth argument, unless it is true. When the argument is false, it will display all of the categories. When it is enabled it will use the value in the 'depth' argument.

Parameters
$args
(string |array<string|int, mixed>)
    Optional. Array or string of arguments to generate a categories drop-down element. See WP_Term_Query::__construct()
    for information on additional accepted arguments.

    @type string       $show_option_all   Text to display for showing all categories. Default empty.
    @type string       $show_option_none  Text to display for showing no categories. Default empty.
    @type string       $option_none_value Value to use when no category is selected. Default empty.
    @type string       $orderby           Which column to use for ordering categories. See get_terms() for a list
                                          of accepted values. Default 'id' (term_id).
    @type bool         $pad_counts        See get_terms() for an argument description. Default false.
    @type bool|int     $show_count        Whether to include post counts. Accepts 0, 1, or their bool equivalents.
                                          Default 0.
    @type bool|int     $echo              Whether to echo or return the generated markup. Accepts 0, 1, or their
                                          bool equivalents. Default 1.
    @type bool|int     $hierarchical      Whether to traverse the taxonomy hierarchy. Accepts 0, 1, or their bool
                                          equivalents. Default 0.
    @type int          $depth             Maximum depth. Default 0.
    @type int          $tab_index         Tab index for the select element. Default 0 (no tabindex).
    @type string       $name              Value for the 'name' attribute of the select element. Default 'cat'.
    @type string       $id                Value for the 'id' attribute of the select element. Defaults to the value
                                          of `$name`.
    @type string       $class             Value for the 'class' attribute of the select element. Default 'postform'.
    @type int|string   $selected          Value of the option that should be selected. Default 0.
    @type string       $value_field       Term field that should be used to populate the 'value' attribute
                                          of the option elements. Accepts any valid term field: 'term_id', 'name',
                                          'slug', 'term_group', 'term_taxonomy_id', 'taxonomy', 'description',
                                          'parent', 'count'. Default 'term_id'.
    @type string|array $taxonomy          Name of the category or categories to retrieve. Default 'category'.
    @type bool         $hide_if_empty     True to skip generating markup if no categories are found.
                                          Default false (create select element even if no categories are found).
    @type bool         $required          Whether the `` element should have the HTML5 'multiple' attribute
                                          and an `[]` in the name.
                                          Accepts '' or 'multiple'.
                                          Default ''.
Defaults to: ''
Tags
since

WP-2.1.0

since

WP-4.2.0 Introduced the value_field argument.

since

WP-4.6.0 Introduced the required argument.

Return
(string) HTML content only if 'echo' argument is 0.

### Start Comment to document Fix ### Pagination links is a mess. This needs to be urgently refactored and enhqanced.

better_paginate_links([string|array<string|int, mixed> $args = '' ]) : array<string|int, mixed>|string|void
Description

For now we will add some additional features and fix the biggest mess (they dont even follow WPCS)

End Comment to document Fix

Retrieve paginated link for archive post pages.

Technically, the function can be used to create paginated link list for any area. The 'base' argument is used to reference the url, which will be used to create the paginated links. The 'format' argument is then used for replacing the page number. It is however, most likely and by default, to be used on the archive post pages.

The 'type' argument controls format of the returned value. The default is 'plain', which is just a string with the links separated by a newline character. The other possible values are either 'array' or 'list'. The 'array' value will return an array of the paginated link list to offer full control of display. The 'list' value will place all of the paginated links in an unordered HTML list.

The 'total' argument is the total amount of pages and is an integer. The 'current' argument is the current page number and is also an integer.

An example of the 'base' argument is "http://example.com/all_posts.php%%" and the '%%' is required. The '%_%' will be replaced by the contents of in the 'format' argument. An example for the 'format' argument is "?page=%#%" and the '%#%' is also required. The '%#%' will be replaced with the page number.

You can include the previous and next links in the list by setting the 'prev_next' argument to true, which it is by default. You can set the previous text, by using the 'prev_text' argument. You can set the next text by setting the 'next_text' argument.

If the 'show_all' argument is set to true, then it will show all of the pages instead of a short list of the pages near the current page. By default, the 'show_all' is set to false and controlled by the 'end_size' and 'mid_size' arguments. The 'end_size' argument is how many numbers on either the start and the end list edges, by default is 1. The 'mid_size' argument is how many numbers to either side of current page, but not including current page.

It is possible to add query vars to the link by using the 'add_args' argument and see add_query_arg() for more information.

The 'before_page_number' and 'after_page_number' arguments allow users to augment the links themselves. Typically this might be to add context to the numbered links so that screen reader users understand what the links are for. The text strings are added before and after the page number - within the anchor tag.

Parameters
$args
(string |array<string|int, mixed>)
    Optional. Array or string of arguments for generating paginated links for archives.

    @type string $base               Base of the paginated url. Default empty.
    @type string $format             Format for the pagination structure. Default empty.
    @type int    $total              The total amount of pages. Default is the value WP_Query's
                                     `max_num_pages` or 1.
    @type int    $current            The current page number. Default is 'paged' query var or 1.
    @type string $aria_current       The value for the aria-current attribute. Possible values are 'page',
                                     'step', 'location', 'date', 'time', 'true', 'false'. Default is 'page'.
    @type bool   $show_all           Whether to show all pages. Default false.
    @type int    $end_size           How many numbers on either the start and the end list edges.
                                     Default 1.
    @type int    $mid_size           How many numbers to either side of the current pages. Default 2.
    @type bool   $prev_next          Whether to include the previous and next links in the list. Default true.
    @type bool   $prev_text          The previous page text. Default '« Previous'.
    @type bool   $next_text          The next page text. Default 'Next »'.
    @type string $type               Controls format of the returned value. Possible values are 'plain',
                                     'array' and 'list'. Default is 'plain'.
    @type array  $add_args           An array of query args to add. Default false.
    @type string $add_fragment       A string to append to each link. Default empty.
    @type string $before_page_number A string to appear before the page number. Default empty.
    @type string $after_page_number  A string to append after the page number. Default empty.

    @type string $li_classes         Classes to be added to each LIST element. Default: empty. Accepts: valid HTML classes.
    @type string $ul_classes         Classes to be added to the UL element. Default: empty. Accepts: valid HTML classes.
    @type string $a_classes          Classes to be added to each a href element. Default: empty. Accepts: valid HTML classes.
    @type string $current_classes    Classes to be added to each span (aria current) element. Default: empty. Accepts: valid HTML classes.
Defaults to: ''
Tags
since

WP-2.1.0

since

WP-4.9.0 Added the aria_current argument.

global

WP_Query $wp_query

global

WP_Rewrite $wp_rewrite

Return
(array<string|int, mixed> |string |void) String of page links or array of page links.

tkt_search_and_filters_run()

Begins execution of the plugin.

tkt_search_and_filters_run() : mixed
Description

Since everything within the plugin is registered via hooks, kicking off the plugin from this point in the file does not affect the page life cycle.

Generally you will want to hook this function, instead of callign it globally. However since the purpose of your plugin is not known until you write it, we include the function globally.

Tags
since
1.0.0
Return
(mixed)

plugin_name_uninstall()

Perform Uninstall Actions.

plugin_name_uninstall() : mixed
Description

If uninstall not called from WordPress, If no uninstall action, If not this plugin, If no caps, then exit.

Tags
since
1.0.0
Return
(mixed)

tkt_shortcodes_run()

Begins execution of the plugin.

tkt_shortcodes_run() : mixed
Description

Since everything within the plugin is registered via hooks, kicking off the plugin from this point in the file does not affect the page life cycle.

Generally you will want to hook this function, instead of callign it globally. However since the purpose of your plugin is not known until you write it, we include the function globally.

Tags
since
1.0.0
Return
(mixed)

plugin_name_uninstall()

Perform Uninstall Actions.

plugin_name_uninstall() : mixed
Description

If uninstall not called from WordPress, If no uninstall action, If not this plugin, If no caps, then exit.

Tags
since
1.0.0
Return
(mixed)

tkt_tmplt_bldr_run()

Begins execution of the plugin.

tkt_tmplt_bldr_run() : mixed
Description

Since everything within the plugin is registered via hooks, kicking off the plugin from this point in the file does not affect the page life cycle.

Generally you will want to hook this function, instead of callign it globally. However since the purpose of your plugin is not known until you write it, we include the function globally.

Tags
since
0.0.1
Return
(mixed)

plugin_name_uninstall()

Perform Uninstall Actions.

plugin_name_uninstall() : mixed
Description

If uninstall not called from WordPress, If no uninstall action, If not this plugin, If no caps, then exit.

Tags
since
0.0.1
Return
(mixed)

Search results