PluginProbe
Parse.ly / 3.24.2
Parse.ly v3.24.2
3.24.3 3.24.2 3.24.1 3.24.0 3.23.7 3.23.6 3.23.5 3.23.4 3.23.3 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.17.0 3.18.0 3.18.1 3.19.0 3.19.1 3.19.2 3.19.3 3.2.0 3.2.1 3.20.0 3.20.1 All 107 releases
← All changes | src/content-helper/common/utils/constants.ts +30 -4 3.18.1 → 3.24.2 View file →
@@ -6,10 +6,36 @@
6 6 export const DASHBOARD_BASE_URL = 'https://dash.parsely.com';
7 7 export const PUBLIC_API_BASE_URL = 'https://api.parsely.com/v2';
8 8
9 9 /**
10 - * Periods that are available in the Content Helper.
10 + * The maximum length of a free-text (custom) tone or persona, in characters.
11 11 *
12 + * @since 3.24.0
13 + */
14 +export const MAX_CUSTOM_VALUE_LENGTH = 32;
15 +
16 +/**
17 + * The key denoting that a free-text (custom) tone or persona is in use.
18 + *
19 + * @since 3.24.0
20 + */
21 +export const CUSTOM_VALUE = 'custom';
22 +
23 +/**
24 + * The tone and persona shipped with the plugin, shared by the suggestion
25 + * features. Only a last resort: PHP injects the site's own defaults, which
26 + * take precedence.
27 + *
28 + * Kept in sync with DEFAULT_PERSONA and DEFAULT_TONE in Suggestion_Defaults.
29 + *
30 + * @since 3.24.0
31 + */
32 +export const DEFAULT_PERSONA = 'journalist';
33 +export const DEFAULT_TONE = 'neutral';
34 +
35 +/**
36 + * Periods that are available in Content Intelligence.
37 + *
12 38 * @since 3.10.0
13 39 * @since 3.11.0 Moved to constants.ts.
14 40 */
15 41 export enum Period {
@@ -22,9 +48,9 @@
22 48 Days30 = '30d'
23 49 }
24 50
25 51 /**
26 - * Metrics that are available in the Content Helper.
52 + * Metrics that are available in Content Intelligence.
27 53 *
28 54 * @since 3.10.0
29 55 * @since 3.11.0 Moved to constants.ts.
30 56 */
@@ -33,9 +59,9 @@
33 59 AvgEngaged = 'avg_engaged'
34 60 }
35 61
36 62 /**
37 - * Post filter types that are available in the Content Helper.
63 + * Post filter types that are available in Content Intelligence.
38 64 *
39 65 * @since 3.11.0
40 66 */
41 67 export enum PostFilterType {
@@ -84,9 +110,9 @@
84 110 ): string {
85 111 const timeValue = parseInt( period, 10 );
86 112 const timeUnit = period.charAt( period.length - 1 );
87 113
88 - let description = __( 'Unknown Period', 'wp-parsely' );
114 + let description: string = __( 'Unknown Period', 'wp-parsely' );
89 115
90 116 /* eslint-disable @wordpress/valid-sprintf */
91 117 switch ( timeUnit ) {
92 118 case 'm':