json['label'] ) ) { $this->json['label'] = html_entity_decode( $this->json['label'] ); } if ( isset( $this->json['description'] ) ) { $this->json['description'] = html_entity_decode( $this->json['description'] ); } // @link https://react-select.com/props $this->json['isClearable'] = $this->clearable; $this->json['isMulti'] = $this->multiple; $this->json['placeholder'] = ( $this->placeholder ) ? $this->placeholder : esc_html__( 'Select...', 'kirki' ); // Will be a custom implementation, couldn't find an official prop to set this in react-select. $this->json['maxSelectionNumber'] = $this->max_selection_number; $this->json['messages'] = [ // translators: %s is the limit of selection number. 'maxLimitReached' => sprintf( esc_html__( 'You can only select %s items', 'kirki' ), $this->max_selection_number ), ]; } }