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

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

		$is_custom = false;
		if ( ! array_key_exists( $args['value'], $args['choices'] ) ) {
			$is_custom = true;
		}
		$options = '';
		foreach ( $args['choices'] as $key => $label ) {
			$options .= sprintf(
				'<option value="%s" %s>%s</option>',
				$key,
				( empty( $key ) && $is_custom ) ? ' selected' : selected( $key, $args['value'], false ),
				$label
			);
		}
		printf(
			'<select name="%s" id="%s" %s%s>%s</select><br />',
			$args['name'],
			$args['id'],
			( $args['multiple'] ) ? ' multiple' : '',
			( ! empty( $args['disabled'] ) ) ? ' disabled' : '',
			$options
		);
	}
static function renderCustomSelect( $args ) {
		$defaults = [
			'id' => null,
			'name' => null,
			'value' => '',
			'choices' => [],
			'multiple' => false,
			'disabled' => false,
		];

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

		$is_custom = false;
		if ( ! array_key_exists( $args['value'], $args['choices'] ) ) {
			$is_custom = true;
		}
		$options = '';
		foreach ( $args['choices'] as $key => $label ) {
			$options .= sprintf(
				'<option value="%s" %s>%s</option>',
				$key,
				( empty( $key ) && $is_custom ) ? ' selected' : selected( $key, $args['value'], false ),
				$label
			);
		}
		printf(
			'<select name="%s" id="%s" %s%s>%s</select><br />',
			$args['name'],
			$args['id'],
			( $args['multiple'] ) ? ' multiple' : '',
			( ! empty( $args['disabled'] ) ) ? ' disabled' : '',
			$options
		);
	}
static function renderCustomSelect ( $ args ) { $ defaults = [ 'id' => null , 'name' => null , 'value' => '' , 'choices' => [ ] , 'multiple' => false , 'disabled' => false , ] ; $ args = wp_parse_args ( $ args , $ defaults ) ; $ is_custom = false ; if ( ! array_key_exists ( $ args [ 'value' ] , $ args [ 'choices' ] ) ) { $ is_custom = true ; } $ options = '' ; foreach ( $ args [ 'choices' ] as $ key => $ label ) { $ options .= sprintf ( '<option value="%s" %s>%s</option>' , $ key , ( empty ( $ key ) && $ is_custom ) ? ' selected' : selected ( $ key , $ args [ 'value' ] , false ) , $ label ) ; } printf ( '<select name="%s" id="%s" %s%s>%s</select><br />' , $ args [ 'name' ] , $ args [ 'id' ] , ( $ args [ 'multiple' ] ) ? ' multiple' : '' , ( ! empty ( $ args [ 'disabled' ] ) ) ? ' disabled' : '' , $ options ) ; }
Render a custom select element.

@param array $args
Render a custom select element .