Automattic\WooCommerce\Blocks\Utils
BlockTemplateUtils::template_has_title()
Returns whether the passed $template has a title, and it's different from the slug.
Метод класса: BlockTemplateUtils{}
Хуков нет.
Возвращает
true|false
.
Использование
$result = BlockTemplateUtils::template_has_title( $template );
- $template(объект) (обязательный)
- The template object.
Код BlockTemplateUtils::template_has_title() BlockTemplateUtils::template has title WC 8.7.0
public static function template_has_title( $template ) { return ! empty( $template->title ) && $template->title !== $template->slug; }