Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Block_Templates::convert_slug_to_title( string $template_slug )

Converts template slugs into readable titles.


Parameters Parameters

$template_slug

(string) (Required) The templates slug (e.g. single-product).


Top ↑

Return Return

(string) Human friendly title converted from the slug.


Top ↑

Source Source

File: includes/class-llms-block-templates.php

		return array_key_exists( $template_slug, $template_titles ) ?
			$template_titles[ $template_slug ]
			:
			// Replace all hyphens and underscores with spaces.
			ucwords( preg_replace( '/[\-_]/', ' ', $template_slug ) );

	}

	/**
	 * Add lifterlms blocks templates.
	 *

Top ↑

Changelog Changelog

Changelog
Version Description
5.8.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.