Skip to content

Commit

Permalink
Merge pull request #4009 from 10up/fix/isue-3927
Browse files Browse the repository at this point in the history
Better explanation of Autosuggest's Endpoint field
  • Loading branch information
felipeelia authored Nov 22, 2024
2 parents 32a6890 + 9e4a0d7 commit aa088d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion includes/classes/Feature/Autosuggest/Autosuggest.php
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ protected function set_settings_schema() {

$this->settings_schema[] = [
'disabled' => $set_in_wp_config,
'help' => $set_in_wp_config ? __( 'This address will be exposed to the public.', 'elasticpress' ) : '',
'help' => ! $set_in_wp_config ? __( 'A valid URL starting with <code>http://</code> or <code>https://</code>. This address will be exposed to the public.', 'elasticpress' ) : '',
'key' => 'endpoint_url',
'label' => __( 'Endpoint URL', 'elasticpress' ),
'type' => 'url',
Expand Down
4 changes: 4 additions & 0 deletions includes/classes/REST/Features.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ public function get_args() {
case 'toggle':
$property['type'] = 'boolean';
break;
case 'url':
$property['type'] = 'string';
$property['format'] = 'uri';
break;
}

$properties[ $schema['key'] ] = $property;
Expand Down

0 comments on commit aa088d1

Please sign in to comment.