static function renderRadioButtons( $args ) {
		$defaults = [
			'id' => null,
			'name' => null,
			'option' => null,
			'value' => '',
			'choices' => [],
			'custom' => false,
			'disabled' => false,
		];

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

		$is_custom = false;
		if ( ! array_key_exists( $args['value'], $args['choices'] ) ) {
			$is_custom = true;
		}
		echo '<fieldset>';
		foreach ( $args['choices'] as $key => $label ) {
			printf(
				'<label for="%s"><input type="radio" id="%s" name="%s[%s]" value="%s" %s%s/>%s</label><br />',
				$args['id'] . '_' . sanitize_key( $key ),
				$args['id'] . '_' . sanitize_key( $key ),
				$args['name'],
				$args['option'],
				$key,
				( $args['custom'] && $is_custom && empty( $key ) ) ? 'checked' : checked( $key, $args['value'], false ),
				( ! empty( $args['disabled'] ) ) ? ' disabled' : '',
				$label
			);
		}
		echo '</fieldset>';
	}
static function renderRadioButtons( $args ) {
		$defaults = [
			'id' => null,
			'name' => null,
			'option' => null,
			'value' => '',
			'choices' => [],
			'custom' => false,
			'disabled' => false,
		];

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

		$is_custom = false;
		if ( ! array_key_exists( $args['value'], $args['choices'] ) ) {
			$is_custom = true;
		}
		echo '<fieldset>';
		foreach ( $args['choices'] as $key => $label ) {
			printf(
				'<label for="%s"><input type="radio" id="%s" name="%s[%s]" value="%s" %s%s/>%s</label><br />',
				$args['id'] . '_' . sanitize_key( $key ),
				$args['id'] . '_' . sanitize_key( $key ),
				$args['name'],
				$args['option'],
				$key,
				( $args['custom'] && $is_custom && empty( $key ) ) ? 'checked' : checked( $key, $args['value'], false ),
				( ! empty( $args['disabled'] ) ) ? ' disabled' : '',
				$label
			);
		}
		echo '</fieldset>';
	}
static function renderRadioButtons ( $ args ) { $ defaults = [ 'id' => null , 'name' => null , 'option' => null , 'value' => '' , 'choices' => [ ] , 'custom' => false , 'disabled' => false , ] ; $ args = wp_parse_args ( $ args , $ defaults ) ; $ is_custom = false ; if ( ! array_key_exists ( $ args [ 'value' ] , $ args [ 'choices' ] ) ) { $ is_custom = true ; } echo '<fieldset>' ; foreach ( $ args [ 'choices' ] as $ key => $ label ) { printf ( '<label for="%s"><input type="radio" id="%s" name="%s[%s]" value="%s" %s%s/>%s</label><br />' , $ args [ 'id' ] . '_' . sanitize_key ( $ key ) , $ args [ 'id' ] . '_' . sanitize_key ( $ key ) , $ args [ 'name' ] , $ args [ 'option' ] , $ key , ( $ args [ 'custom' ] && $ is_custom && empty ( $ key ) ) ? 'checked' : checked ( $ key , $ args [ 'value' ] , false ) , ( ! empty ( $ args [ 'disabled' ] ) ) ? ' disabled' : '' , $ label ) ; } echo '</fieldset>' ; }
Render radio buttons.

@param array $args
Render radio buttons .