Utilities
Class Utilities.
Description #
Source #
Changelog #
| Version | Description |
|---|---|
| 4.21.4 | Introduced. |
Methods #
- associative_list_pluck — Recursively extracts values for a specified key from a nested associative array.
- build_posts_query_args — Build Post Query Args to use based on the provided Args.
- checked_array — Helper method similar to checked() that also has the ability to set the given input element as disabled.
- format_price — Formats the displayed price for a Course.
- generate_random_id — Generates a random ID string for use in Course Grid elements.
- get_card_layout — Gets the template path for a card layout.
- get_card_script — Gets the URL for the card JavaScript file.
- get_card_style — Gets the URL for the card style CSS file.
- get_duration — Retrieves the amount of time it takes for the course to be completed.
- get_excluded_post_types — Get a list of excluded Post Types for queries.
- get_image_sizes_for_block_editor — Gets image sizes formatted for block editor.
- get_orderby_for_block_editor — Gets orderby options formatted for block editor.
- get_pagination_script — Gets the URL for the pagination JavaScript file.
- get_pagination_style — Gets the URL for the pagination style CSS file.
- get_pagination_template — Gets the pagination template based on the specified type.
- get_paginations_for_block_editor — Gets available pagination types formatted for block editor.
- get_post_types — Gets all available post types for use in Course Grid.
- get_post_types_for_block_editor — Gets all available post types formatted for block editor.
- get_post_types_slugs — Gets all available post type slugs for use in Course Grid.
- get_skin_item — Gets the template path for a skin item.
- get_skin_layout — Gets the template path for a skin layout.
- get_skin_script — Gets the URL for the skin JavaScript file.
- get_skin_style — Gets the URL for the skin style CSS file.
- get_taxonomies_for_block_editor — Gets taxonomies formatted for block editor.
- get_template — Gets a template path based on the provided file name.
- get_template_url — Gets template URL from a file.
- parse_taxonomies — Parses a textual representation of taxonomies and their terms. Used by Shortcode Attributes.