PluginProbe ʕ •ᴥ•ʔ
Presto Player / 4.4.0
Presto Player v4.4.0
4.4.1 4.4.0 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 1 week ago integrations 3 months ago shared 3 months ago PerformancePage.js 3 months ago config.js 1 week ago entities.js 3 months ago
config.js
217 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 Bot,
25 } from 'lucide-react';
26
27 import BrandingPage from './general/BrandingPage';
28 import MediaHubPage from './general/MediaHubPage';
29 import ViewingAnalyticsPage from './general/ViewingAnalyticsPage';
30 import PresetsPage from './general/PresetsPage';
31 import CustomCssPage from './general/CustomCssPage';
32 import UninstallPage from './general/UninstallPage';
33 import ContributePage from './general/ContributePage';
34
35 import GoogleAnalyticsPage from './integrations/GoogleAnalyticsPage';
36 import YouTubePage from './integrations/YouTubePage';
37 import EmailCapturePage from './integrations/EmailCapturePage';
38 import BunnyNetPage from './integrations/BunnyNetPage';
39 import WebhooksPage from './integrations/WebhooksPage';
40
41 import PerformancePage from './PerformancePage';
42 import LicensePage from './general/LicensePage';
43 import McpPage from './general/McpPage';
44
45 export const SETTINGS_PAGES = [
46 {
47 slug: 'branding',
48 label: __( 'Branding', 'presto-player' ),
49 icon: Palette,
50 group: 'general',
51 component: BrandingPage,
52 pro: false,
53 },
54 {
55 slug: 'media-hub',
56 label: __( 'Media Hub', 'presto-player' ),
57 icon: FolderOpen,
58 group: 'general',
59 component: MediaHubPage,
60 pro: false,
61 },
62 {
63 slug: 'viewing-analytics',
64 label: __( 'Video Analytics', 'presto-player' ),
65 icon: BarChart3,
66 group: 'general',
67 component: ViewingAnalyticsPage,
68 pro: true,
69 },
70 {
71 slug: 'presets',
72 label: __( 'Presets', 'presto-player' ),
73 icon: SlidersHorizontal,
74 group: 'general',
75 component: PresetsPage,
76 pro: true,
77 },
78 {
79 slug: 'custom-css',
80 label: __( 'Custom CSS', 'presto-player' ),
81 icon: Code2,
82 group: 'general',
83 component: CustomCssPage,
84 pro: true,
85 },
86 {
87 slug: 'uninstall',
88 label: __( 'Uninstall Options', 'presto-player' ),
89 icon: Trash2,
90 group: 'general',
91 component: UninstallPage,
92 pro: false,
93 },
94 {
95 slug: 'contribute',
96 label: __( 'Contribute', 'presto-player' ),
97 icon: HeartHandshake,
98 group: 'general',
99 component: ContributePage,
100 pro: false,
101 },
102 {
103 slug: 'license',
104 label: __( 'License', 'presto-player' ),
105 icon: KeyRound,
106 group: 'general',
107 component: LicensePage,
108 pro: true,
109 requiresProPlugin: true,
110 },
111
112 {
113 slug: 'google-analytics',
114 label: __( 'Google Analytics', 'presto-player' ),
115 icon: LineChart,
116 group: 'integrations',
117 component: GoogleAnalyticsPage,
118 pro: true,
119 },
120 {
121 slug: 'youtube',
122 label: __( 'YouTube', 'presto-player' ),
123 icon: Youtube,
124 group: 'integrations',
125 component: YouTubePage,
126 pro: false,
127 },
128 {
129 slug: 'email-capture',
130 label: __( 'Email Capture', 'presto-player' ),
131 icon: Mail,
132 group: 'integrations',
133 component: EmailCapturePage,
134 pro: true,
135 skeletonCards: 2,
136 },
137 {
138 slug: 'bunny-net',
139 label: __( 'Bunny.net', 'presto-player' ),
140 icon: Cloud,
141 group: 'integrations',
142 component: BunnyNetPage,
143 pro: true,
144 },
145 {
146 slug: 'webhooks',
147 label: __( 'Webhooks', 'presto-player' ),
148 icon: Webhook,
149 group: 'integrations',
150 component: WebhooksPage,
151 pro: true,
152 requiresProPlugin: true,
153 requireManageOptions: true,
154 },
155 {
156 slug: 'mcp',
157 label: __( 'AI Abilities & MCP', 'presto-player' ),
158 icon: Bot,
159 group: 'integrations',
160 component: McpPage,
161 pro: false,
162 requireManageOptions: true,
163 },
164
165 {
166 slug: 'performance',
167 label: __( 'Performance', 'presto-player' ),
168 icon: Gauge,
169 group: 'performance',
170 component: PerformancePage,
171 pro: false,
172 },
173 ];
174
175 export const GROUPS = [
176 { key: 'general', label: __( 'General', 'presto-player' ) },
177 { key: 'integrations', label: __( 'Integrations', 'presto-player' ) },
178 { key: 'performance', label: __( 'Performance', 'presto-player' ) },
179 ];
180
181 export const DEFAULT_SLUG = 'branding';
182
183 export const OPTION_KEYS = {
184 branding: 'presto_player_branding',
185 mediaHubWidth: 'presto_player_instant_video_width',
186 mediaHubSync: 'presto_player_media_hub_sync_default',
187 analytics: 'presto_player_analytics',
188 presets: 'presto_player_presets',
189 audioPresets: 'presto_player_audio_presets',
190 uninstall: 'presto_player_uninstall',
191 usageOptin: 'presto-player_usage_optin',
192 googleAnalytics: 'presto_player_google_analytics',
193 youtube: 'presto_player_youtube',
194 mailchimp: 'presto_player_mailchimp',
195 mailerlite: 'presto_player_mailerlite',
196 activecampaign: 'presto_player_activecampaign',
197 fluentcrm: 'presto_player_fluentcrm',
198 bunnyStream: 'presto_player_bunny_stream',
199 bunnyStreamPublic: 'presto_player_bunny_stream_public',
200 bunnyStreamPrivate: 'presto_player_bunny_stream_private',
201 bunnyPullZones: 'presto_player_bunny_pull_zones',
202 performance: 'presto_player_performance',
203 mcp: 'presto_player_mcp',
204 };
205
206 export const BUNNY_STREAM_KEYS = [
207 OPTION_KEYS.bunnyStream,
208 OPTION_KEYS.bunnyStreamPublic,
209 OPTION_KEYS.bunnyStreamPrivate,
210 OPTION_KEYS.bunnyPullZones,
211 ];
212
213 export const WEBHOOK_ENTITY = [ 'presto-player', 'webhook' ];
214
215 export const findPage = ( slug ) =>
216 SETTINGS_PAGES.find( ( page ) => page.slug === slug ) || null;
217