public function sanitize_callback() {
		return function( $value ) {
			if ( ! is_array( $value ) ) {
				$value = explode( ',', $value );
			}

			$sanitized_values = [];

			foreach ( $value as $v ) {
				if ( ! array_key_exists( $v, $this->args['choices'] ) ) {
					continue;
				}
				$sanitized_values[] = $v;
			}

			$sanitized_values = array_map( 'sanitize_text_field', $sanitized_values );
			return implode( ',', $sanitized_values );
		};
	}
public function sanitize_callback() {
		return function( $value ) {
			if ( ! is_array( $value ) ) {
				$value = explode( ',', $value );
			}

			$sanitized_values = [];

			foreach ( $value as $v ) {
				if ( ! array_key_exists( $v, $this->args['choices'] ) ) {
					continue;
				}
				$sanitized_values[] = $v;
			}

			$sanitized_values = array_map( 'sanitize_text_field', $sanitized_values );
			return implode( ',', $sanitized_values );
		};
	}
public function sanitize_callback ( ) { return function ( $ value ) { if ( ! is_array ( $ value ) ) { $ value = explode ( ',' , $ value ) ; } $ sanitized_values = [ ] ; foreach ( $ value as $ v ) { if ( ! array_key_exists ( $ v , $ this -> args [ 'choices' ] ) ) { continue ; } $ sanitized_values [ ] = $ v ; } $ sanitized_values = array_map ( 'sanitize_text_field' , $ sanitized_values ) ; return implode ( ',' , $ sanitized_values ) ; } ; }
Sanitize callback function

@return string|function Function name or function for sanitize
Sanitize callback function