← All changes
|
src/rest-api/content-helper/class-endpoint-excerpt-generator.php
+6
-3
3.23.5
→
3.24.2
View file →
| @@ -11,8 +11,9 @@ | ||
| 11 | 11 | |
| 12 | 12 | namespace Parsely\REST_API\Content_Helper; |
| 13 | 13 | |
| 14 | 14 | use Parsely\REST_API\Base_Endpoint; |
| 15 | +use Parsely\REST_API\Settings\Endpoint_Editor_Sidebar_Settings; | |
| 15 | 16 | use Parsely\Services\Suggestions_API\Suggestions_API_Service; |
| 16 | 17 | use WP_Error; |
| 17 | 18 | use WP_REST_Request; |
| 18 | 19 | use WP_REST_Response; |
| @@ -98,15 +99,15 @@ | ||
| 98 | 99 | 'persona' => array( |
| 99 | 100 | 'description' => __( 'The persona to use for the suggestion.', 'wp-parsely' ), |
| 100 | 101 | 'type' => 'string', |
| 101 | 102 | 'required' => false, |
| 102 | - 'default' => 'journalist', | |
| 103 | + 'default' => Endpoint_Editor_Sidebar_Settings::DEFAULT_EXCERPT_PERSONA, | |
| 103 | 104 | ), |
| 104 | 105 | 'style' => array( |
| 105 | 106 | 'description' => __( 'The style to use for the suggestion.', 'wp-parsely' ), |
| 106 | 107 | 'type' => 'string', |
| 107 | 108 | 'required' => false, |
| 108 | - 'default' => 'neutral', | |
| 109 | + 'default' => Endpoint_Editor_Sidebar_Settings::DEFAULT_EXCERPT_TONE, | |
| 109 | 110 | ), |
| 110 | 111 | 'max_items' => array( |
| 111 | 112 | 'description' => __( 'The maximum number of items to generate.', 'wp-parsely' ), |
| 112 | 113 | 'type' => 'integer', |
| @@ -116,9 +117,11 @@ | ||
| 116 | 117 | 'max_characters' => array( |
| 117 | 118 | 'description' => __( 'The maximum number of characters to generate.', 'wp-parsely' ), |
| 118 | 119 | 'type' => 'integer', |
| 119 | 120 | 'required' => false, |
| 120 | - 'default' => 160, | |
| 121 | + 'default' => Endpoint_Editor_Sidebar_Settings::DEFAULT_EXCERPT_LENGTH, | |
| 122 | + 'minimum' => Endpoint_Editor_Sidebar_Settings::MIN_EXCERPT_LENGTH, | |
| 123 | + 'maximum' => Endpoint_Editor_Sidebar_Settings::MAX_EXCERPT_LENGTH, | |
| 121 | 124 | ), |
| 122 | 125 | ) |
| 123 | 126 | ); |
| 124 | 127 | } |