PluginProbe
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More / 2.4.1
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More v2.4.1
2.4.1 2.4.0 2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.2 2.2.1 2.2.0 2.1.2 2.1.1 trunk 0.0.1 0.0.2 0.0.3 0.0.4 0.0.5 0.0.6 0.0.7 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 All 68 releases
better-payment / includes / Campaign / Elements / ProElementSchemas.php

ProElementSchemas.php in Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More 2.4.1, at includes/Campaign/Elements/ProElementSchemas.php

49 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Better_Payment\Lite\Campaign\Elements;
4
5 if ( ! defined( 'ABSPATH' ) ) {
6 exit;
7 }
8
9 /**
10 * Fatal guard for Better Payment Pro 1.4.3 and older. Holds no schema.
11 *
12 * The Donors Wall, FAQ and Video schemas and default settings ship with Pro
13 * (better-payment-pro/includes/Campaign/ProElementSchemas.php); a free install gets
14 * {@see ProElementStubs}. Lite's transitional copy of the schemas was deleted when
15 * ProCompatibility::MIN_PRO_VERSION reached 1.4.4.
16 *
17 * What stays is only what Pro 1.4.3 reads directly: its `BuilderElements` aliases
18 * these constants at class-constant time and calls {@see self::default_video_url()},
19 * so removing them would fatal every campaign render on a site that updated Lite
20 * before Pro. Pro 1.4.4+ reads its own class. Pinned by
21 * tests/Unit/ProCouplingContractTest.php; delete this file once no supported site
22 * can run Pro 1.4.3.
23 *
24 * @deprecated Kept only so Better Payment Pro <= 1.4.3 does not fatal.
25 */
26 class ProElementSchemas {
27
28 /**
29 * The video a newly added Video element starts with.
30 *
31 * Pro 1.4.3's `BuilderElements::DEFAULT_VIDEO_URL` aliases this constant.
32 */
33 const DEFAULT_VIDEO_URL = 'https://www.youtube.com/watch?v=jeXG-4SOlZE';
34
35 /**
36 * Seconds into {@see self::DEFAULT_VIDEO_URL} that playback starts.
37 */
38 const DEFAULT_VIDEO_START = 2;
39
40 /**
41 * Filterable default video URL.
42 *
43 * @return string
44 */
45 public static function default_video_url(): string {
46 return (string) apply_filters( 'better_payment/campaign/default_video_url', self::DEFAULT_VIDEO_URL );
47 }
48 }
49