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::generate_template_slug_from_path( string $path )

Convert the template paths into a slug.


Parameters Parameters

$path

(string) (Required) The template's path.


Top ↑

Return Return

(string)


Top ↑

Source Source

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

	 *
	 * @param string $path The template's path.
	 * @return string
	 */
	private function generate_template_slug_from_path( $path ) {

		$prefix  = $this->block_template_config_property_from_path( $path, 'slug_prefix' );

		return $prefix . basename( $path, '.html' );

	}

	/**
	 * Generate the template namespace from the template path.
	 *

Top ↑

Changelog Changelog

Changelog
Version Description
5.9.0 Return empty string if the passed path is not in the configuration.
5.8.0
5.10.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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