WordPress at Your Fingertips
function is not described

WC_Settings_Page::output_sections() public WC 1.0

Output sections.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Settings_Page = new WC_Settings_Page();
$WC_Settings_Page->output_sections();

Code of WC_Settings_Page::output_sections() WC 5.9.0

public function output_sections() {
	global $current_section;

	$sections = $this->get_sections();

	if ( empty( $sections ) || 1 === count( $sections ) ) {
		return;
	}

	echo '<ul class="subsubsub">';

	$array_keys = array_keys( $sections );

	foreach ( $sections as $id => $label ) {
		$url       = admin_url( 'admin.php?page=wc-settings&tab=' . $this->id . '&section=' . sanitize_title( $id ) );
		$class     = ( $current_section === $id ? 'current' : '' );
		$separator = ( end( $array_keys ) === $id ? '' : '|' );
		$text      = esc_html( $label );
		echo "<li><a href='$url' class='$class'>$text</a> $separator </li>"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
	}

	echo '</ul><br class="clear" />';
}