Tribe__Events__Pro__Editor::format_checkbox_field( string $value = '', string $initial_separator = ', ', string $end_separator = ' & ' )

Format a string using the new blocks UI to shape the values of a meta


Parameters

$value

(string) (Optional)

Default value: ''

$initial_separator

(string) (Optional)

Default value: ', '

$end_separator

(string) (Optional)

Default value: ' & '


Top ↑

Return

(string)


Top ↑

Source

File: src/Tribe/Editor.php

	public function format_checkbox_field( $value = '', $initial_separator = ', ', $end_separator = ' & ' ) {
		$pieces = explode( '|', $value );
		$last   = '';
		if ( count( $pieces ) >= 3 ) {
			$last = trim( array_pop( $pieces ) );
		}

		$output = implode( $initial_separator, $pieces );
		if ( '' === $last ) {
			return $output;
		}
		return implode( $end_separator, array( $output, $last ) );
	}

Top ↑

Changelog

Changelog
Version Description
4.5 Introduced.