PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.8.13
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.8.13
1.8.13.1 1.8.13 1.8.12.3 1.8.12.2 1.8.12.1 1.8.12 1.8.11.3 1.8.11.2 1.8.11.1 1.8.11 1.6.6 1.6.60 1.6.7 1.6.8 1.6.9 1.7.0 1.7.0.1 1.7.0.11 1.7.0.12 1.7.0.14 1.7.0.2 1.7.0.3 1.7.0.5 1.7.0.6 1.7.0.7 All 212 releases
charitable / includes / admin / campaign-builder / panels / class-form.php

class-form.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.8.13, at includes/admin/campaign-builder/panels/class-form.php

80 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Form panel (Lite upgrade-prompt stub).
4 *
5 * Lite does not ship the visual form builder. This panel renders only the
6 * navigation button; clicking it opens an upgrade modal instead of switching
7 * views. The full panel is provided by Charitable Pro.
8 *
9 * @package Charitable
10 * @author David Bisset
11 * @copyright Copyright (c) 2026, WP Charitable LLC
12 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
13 * @since 1.8.10.5
14 * @version 1.8.10.5
15 */
16
17 if ( ! defined( 'ABSPATH' ) ) {
18 exit;
19 }
20
21 if ( ! class_exists( 'Charitable_Builder_Panel_Form' ) ) :
22
23 /**
24 * Form panel (Lite upgrade stub).
25 *
26 * @since 1.8.10.5
27 */
28 class Charitable_Builder_Panel_Form extends Charitable_Builder_Panel {
29
30 /**
31 * All systems go.
32 *
33 * @since 1.8.10.5
34 */
35 public function init() {
36
37 $this->name = esc_html__( 'Form', 'charitable' );
38 $this->slug = 'form';
39 $this->icon = 'panel_form.svg';
40 $this->order = 25;
41 $this->sidebar = false;
42 }
43
44 /**
45 * Render the navigation button.
46 *
47 * Overrides the base implementation so the button does not carry a
48 * `data-panel` attribute — we intercept the click in JS and open an
49 * upgrade modal rather than switching panels.
50 *
51 * @since 1.8.10.5
52 *
53 * @param mixed $campaign Current campaign object.
54 * @param string $view The current view.
55 */
56 public function button( $campaign, $view ) {
57 ?>
58 <button type="button" class="charitable-panel-<?php echo esc_attr( $this->slug ); ?>-button charitable-panel-form-upgrade">
59 <img class="topbar_icon" src="<?php echo esc_url( charitable()->get_path( 'assets', false ) . 'images/icons/' . $this->icon ); ?>" />
60 <span><?php echo esc_html( $this->name ); ?></span>
61 </button>
62 <?php
63 }
64
65 /**
66 * Suppress panel output — Lite has no Form panel content.
67 *
68 * @since 1.8.10.5
69 *
70 * @param object $campaign Current campaign object.
71 * @param string $view Active Campaign Builder view (panel).
72 */
73 public function panel_output( $campaign, $view = 'design' ) {
74 }
75 }
76
77 endif;
78
79 new Charitable_Builder_Panel_Form();
80