PluginProbe ʕ •ᴥ•ʔ
Presto Player / 4.3.3
Presto Player v4.3.3
4.3.3 4.3.2 4.3.1 4.3.0 4.2.4 4.2.3 4.2.2 4.2.0 4.2.1 trunk 1.10.0 1.10.1 1.10.2 1.11.0 1.12.0 1.13.0 1.14.0 1.14.1 1.5.10 1.5.11 1.5.12 1.5.13 1.5.14 1.5.15 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.10 1.6.11 1.6.12 1.6.13 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 1.8.0 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.9.0 1.9.1 1.9.10 1.9.11 1.9.12 1.9.13 1.9.14 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 2.0.10 2.0.11 2.0.12 2.0.13 2.0.14 2.0.15 2.0.16 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.2.0 2.2.1 2.2.2 2.2.3 2.2.3-beta1 2.3.0 2.3.1 2.3.2 2.3.3 3.0.0 3.0.0-beta1 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.1.0 3.1.1 3.1.2 3.1.3 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.0.6 4.0.7 4.0.8 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4
presto-player / src / admin / dashboard / pages / settings / config.js
presto-player / src / admin / dashboard / pages / settings Last commit date
general 2 months ago integrations 2 months ago shared 2 months ago PerformancePage.js 2 months ago config.js 6 days ago entities.js 2 months ago
config.js
205 lines
1 /**
2 * Single source of truth for the Settings area. Every consumer — sidebar,
3 * router, redirect rules, option-key callers — derives from the exports here.
4 *
5 * Adding a new leaf = one entry in SETTINGS_PAGES + (if new option) one entry
6 * in OPTION_KEYS. The sidebar, routing, and Save wiring follow automatically.
7 */
8 import { __ } from '@wordpress/i18n';
9 import {
10 Palette,
11 FolderOpen,
12 BarChart3,
13 SlidersHorizontal,
14 Code2,
15 Trash2,
16 HeartHandshake,
17 LineChart,
18 Youtube,
19 Mail,
20 Cloud,
21 Webhook,
22 Gauge,
23 KeyRound,
24 } from 'lucide-react';
25
26 import BrandingPage from './general/BrandingPage';
27 import MediaHubPage from './general/MediaHubPage';
28 import ViewingAnalyticsPage from './general/ViewingAnalyticsPage';
29 import PresetsPage from './general/PresetsPage';
30 import CustomCssPage from './general/CustomCssPage';
31 import UninstallPage from './general/UninstallPage';
32 import ContributePage from './general/ContributePage';
33
34 import GoogleAnalyticsPage from './integrations/GoogleAnalyticsPage';
35 import YouTubePage from './integrations/YouTubePage';
36 import EmailCapturePage from './integrations/EmailCapturePage';
37 import BunnyNetPage from './integrations/BunnyNetPage';
38 import WebhooksPage from './integrations/WebhooksPage';
39
40 import PerformancePage from './PerformancePage';
41 import LicensePage from './general/LicensePage';
42
43 export const SETTINGS_PAGES = [
44 {
45 slug: 'branding',
46 label: __( 'Branding', 'presto-player' ),
47 icon: Palette,
48 group: 'general',
49 component: BrandingPage,
50 pro: false,
51 },
52 {
53 slug: 'media-hub',
54 label: __( 'Media Hub', 'presto-player' ),
55 icon: FolderOpen,
56 group: 'general',
57 component: MediaHubPage,
58 pro: false,
59 },
60 {
61 slug: 'viewing-analytics',
62 label: __( 'Video Analytics', 'presto-player' ),
63 icon: BarChart3,
64 group: 'general',
65 component: ViewingAnalyticsPage,
66 pro: true,
67 },
68 {
69 slug: 'presets',
70 label: __( 'Presets', 'presto-player' ),
71 icon: SlidersHorizontal,
72 group: 'general',
73 component: PresetsPage,
74 pro: true,
75 },
76 {
77 slug: 'custom-css',
78 label: __( 'Custom CSS', 'presto-player' ),
79 icon: Code2,
80 group: 'general',
81 component: CustomCssPage,
82 pro: true,
83 },
84 {
85 slug: 'uninstall',
86 label: __( 'Uninstall Options', 'presto-player' ),
87 icon: Trash2,
88 group: 'general',
89 component: UninstallPage,
90 pro: false,
91 },
92 {
93 slug: 'contribute',
94 label: __( 'Contribute', 'presto-player' ),
95 icon: HeartHandshake,
96 group: 'general',
97 component: ContributePage,
98 pro: false,
99 },
100 {
101 slug: 'license',
102 label: __( 'License', 'presto-player' ),
103 icon: KeyRound,
104 group: 'general',
105 component: LicensePage,
106 pro: true,
107 requiresProPlugin: true,
108 },
109
110 {
111 slug: 'google-analytics',
112 label: __( 'Google Analytics', 'presto-player' ),
113 icon: LineChart,
114 group: 'integrations',
115 component: GoogleAnalyticsPage,
116 pro: true,
117 },
118 {
119 slug: 'youtube',
120 label: __( 'YouTube', 'presto-player' ),
121 icon: Youtube,
122 group: 'integrations',
123 component: YouTubePage,
124 pro: false,
125 },
126 {
127 slug: 'email-capture',
128 label: __( 'Email Capture', 'presto-player' ),
129 icon: Mail,
130 group: 'integrations',
131 component: EmailCapturePage,
132 pro: true,
133 skeletonCards: 2,
134 },
135 {
136 slug: 'bunny-net',
137 label: __( 'Bunny.net', 'presto-player' ),
138 icon: Cloud,
139 group: 'integrations',
140 component: BunnyNetPage,
141 pro: true,
142 },
143 {
144 slug: 'webhooks',
145 label: __( 'Webhooks', 'presto-player' ),
146 icon: Webhook,
147 group: 'integrations',
148 component: WebhooksPage,
149 pro: true,
150 requiresProPlugin: true,
151 requireManageOptions: true,
152 },
153
154 {
155 slug: 'performance',
156 label: __( 'Performance', 'presto-player' ),
157 icon: Gauge,
158 group: 'performance',
159 component: PerformancePage,
160 pro: false,
161 },
162 ];
163
164 export const GROUPS = [
165 { key: 'general', label: __( 'General', 'presto-player' ) },
166 { key: 'integrations', label: __( 'Integrations', 'presto-player' ) },
167 { key: 'performance', label: __( 'Performance', 'presto-player' ) },
168 ];
169
170 export const DEFAULT_SLUG = 'branding';
171
172 export const OPTION_KEYS = {
173 branding: 'presto_player_branding',
174 mediaHubWidth: 'presto_player_instant_video_width',
175 mediaHubSync: 'presto_player_media_hub_sync_default',
176 analytics: 'presto_player_analytics',
177 presets: 'presto_player_presets',
178 audioPresets: 'presto_player_audio_presets',
179 uninstall: 'presto_player_uninstall',
180 usageOptin: 'presto-player_usage_optin',
181 googleAnalytics: 'presto_player_google_analytics',
182 youtube: 'presto_player_youtube',
183 mailchimp: 'presto_player_mailchimp',
184 mailerlite: 'presto_player_mailerlite',
185 activecampaign: 'presto_player_activecampaign',
186 fluentcrm: 'presto_player_fluentcrm',
187 bunnyStream: 'presto_player_bunny_stream',
188 bunnyStreamPublic: 'presto_player_bunny_stream_public',
189 bunnyStreamPrivate: 'presto_player_bunny_stream_private',
190 bunnyPullZones: 'presto_player_bunny_pull_zones',
191 performance: 'presto_player_performance',
192 };
193
194 export const BUNNY_STREAM_KEYS = [
195 OPTION_KEYS.bunnyStream,
196 OPTION_KEYS.bunnyStreamPublic,
197 OPTION_KEYS.bunnyStreamPrivate,
198 OPTION_KEYS.bunnyPullZones,
199 ];
200
201 export const WEBHOOK_ENTITY = [ 'presto-player', 'webhook' ];
202
203 export const findPage = ( slug ) =>
204 SETTINGS_PAGES.find( ( page ) => page.slug === slug ) || null;
205