PluginProbe ʕ •ᴥ•ʔ
Presto Player / 1.8.2
Presto Player v1.8.2
4.5.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 / settings / pages / Performance.js
presto-player / src / admin / settings / pages Last commit date
parts 5 years ago General.js 4 years ago Integrations.js 4 years ago Performance.js 5 years ago
Performance.js
90 lines
1 /** @jsx jsx */
2 import { css, jsx } from "@emotion/core";
3
4 const { __ } = wp.i18n;
5 const { Notice, ExternalLink } = wp.components;
6 import { getSettings } from "@/admin/settings/util";
7
8 import ToggleControl from "../components/ToggleControl";
9
10 import Group from "../components/Group";
11 import Page from "../components/Page";
12
13 export default () => {
14 const settings = getSettings();
15
16 return (
17 <Page
18 title={__("Performance", "presto-player")}
19 description={__("Player performance preferences.", "presto-player")}
20 >
21 <Group
22 title={__("Performance", "presto-player")}
23 description={__(
24 "Performance options for player loading.",
25 "presto-player"
26 )}
27 >
28 <div>
29 <ToggleControl
30 className={"presto-player__setting--module-enabled"}
31 option={{
32 id: "module_enabled",
33 name: __("Dynamically Load JavaScript", "presto-player"),
34 help: __(
35 "Dynamically load javascript modules on the page which can significantly reduce javascript size and increase performance.",
36 "presto-player"
37 ),
38 }}
39 value={settings?.presto_player_performance?.module_enabled}
40 optionName="performance"
41 />
42 {!!settings?.presto_player_performance?.module_enabled && (
43 <Notice
44 css={css`
45 background: #f3f4f5 !important;
46 `}
47 className="presto-notice"
48 status="info"
49 isDismissible={false}
50 >
51 <div>
52 <strong>{__("Please Note", "presto-player")}</strong>
53 </div>
54 <div>
55 {__(
56 "You may need to exclude the player script from combining, as well as enable CORS requests for some CDNs.",
57 "presto-player"
58 )}{" "}
59 <ExternalLink href="https://prestoplayer.com/docs/performance-preferences-explained#global-player-performance-setting">
60 {__("Learn More", "presto-player")}
61 </ExternalLink>
62 </div>
63 </Notice>
64 )}
65 </div>
66 <ToggleControl
67 className={"presto-player__setting--module-enabled"}
68 option={{
69 id: "automations",
70 name: __(
71 "Enable Ajax Requests for Progress Integrations",
72 "presto-player"
73 ),
74 help: __(
75 "Keep this on unless you do not plan on using automation, LMS or membership integrations.",
76 "presto-player"
77 ),
78 }}
79 value={
80 settings?.presto_player_performance?.automations === undefined
81 ? true
82 : settings?.presto_player_performance?.automations
83 }
84 optionName="performance"
85 />
86 </Group>
87 </Page>
88 );
89 };
90