| @@ -934,28 +934,24 @@ | ||
| 934 | 934 | self::register_pro_elements(); |
| 935 | 935 | } |
| 936 | 936 | |
| 937 | 937 | /** |
| 938 | - * Register the three Pro-only elements (Donors Wall, FAQ, Video) with their | |
| 939 | - * FULL control schemas, flagged `pro => true`. | |
| 938 | + * Register the three Pro-only elements (Donors Wall, FAQ, Video) as lock stubs. | |
| 940 | 939 | * |
| 941 | - * These used to be label-and-icon stubs with an empty `settingsSchema`, which | |
| 942 | - * left a free user staring at a bare "upgrade" panel — no way to see what the | |
| 943 | - * element actually does or what it can be configured to do. Lite now ships the | |
| 944 | - * complete schema (see {@see ProElementSchemas}) so the builder can render | |
| 945 | - * every control, disabled, behind a locked banner. | |
| 940 | + * Pro owns their control schemas and default settings. Lite registers only | |
| 941 | + * {@see ProElementStubs} — label, icon, the `pro` flag and an upgrade feature | |
| 942 | + * list — so a free user can drop, select, move and delete the element, see its | |
| 943 | + * mock preview, and read what Pro adds. Better Payment Pro 1.4.4+ replaces the | |
| 944 | + * entries with its full definitions on `better_payment/campaign_elements` | |
| 945 | + * (default priority) and attaches the renderers on | |
| 946 | + * `better_payment/campaign/render_element_{type}`. | |
| 946 | 947 | * |
| 947 | - * The `pro` flag stays on the schema whether or not Pro is installed. Nothing | |
| 948 | - * reads it as an entitlement — locking is decided everywhere by the live | |
| 949 | - * `better_payment/pro_enabled` filter, evaluated per request, so a campaign | |
| 950 | - * saved while Pro was active gets no special treatment once Pro is gone. | |
| 951 | - * | |
| 952 | - * Pro no longer overrides these entries. It only attaches renderers on | |
| 953 | - * `better_payment/campaign/render_element_{type}`; that filter having a | |
| 954 | - * listener IS the unlock. | |
| 948 | + * The `pro` flag stays on every definition whether or not Pro is installed. | |
| 949 | + * Nothing reads it as an entitlement — locking is decided by the live | |
| 950 | + * `better_payment/pro_enabled` filter, per request. | |
| 955 | 951 | */ |
| 956 | 952 | private static function register_pro_elements(): void { |
| 957 | - foreach ( ProElementSchemas::get_all() as $type => $schema ) { | |
| 958 | - ElementRegistry::register( $type, array_merge( $schema, [ 'pro' => true ] ) ); | |
| 953 | + foreach ( ProElementStubs::get_all() as $type => $stub ) { | |
| 954 | + ElementRegistry::register( $type, $stub ); | |
| 959 | 955 | } |
| 960 | 956 | } |
| 961 | 957 | } |