WordPress at Your Fingertips
function is not described

WC_Settings_API::generate_title_html() public WC 1.0.0

Generate Title HTML.

{} It's a method of the class: WC_Settings_API{}

No Hooks.

Return

String.

Usage

$WC_Settings_API = new WC_Settings_API();
$WC_Settings_API->generate_title_html( $key, $data );
$key(string) (required)
Field key.
$data(array) (required)
Field data.

Changelog

Since 1.0.0 Introduced.

Code of WC_Settings_API::generate_title_html() WC 5.5.2

<?php
public function generate_title_html( $key, $data ) {
	$field_key = $this->get_field_key( $key );
	$defaults  = array(
		'title' => '',
		'class' => '',
	);

	$data = wp_parse_args( $data, $defaults );

	ob_start();
	?>
		</table>
		<h3 class="wc-settings-sub-title <?php echo esc_attr( $data['class'] ); ?>" id="<?php echo esc_attr( $field_key ); ?>"><?php echo wp_kses_post( $data['title'] ); ?></h3>
		<?php if ( ! empty( $data['description'] ) ) : ?>
			<p><?php echo wp_kses_post( $data['description'] ); ?></p>
		<?php endif; ?>
		<table class="form-table">
	<?php

	return ob_get_clean();
}