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 / compat / charitable-twentyseventeen-compat-functions.php

charitable-twentyseventeen-compat-functions.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.8.13, at includes/compat/charitable-twentyseventeen-compat-functions.php

37 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Functions to improve compatibility with Twenty Seventeen.
4 *
5 * @package Charitable/Functions/Compatibility
6 * @author David Bisset
7 * @copyright Copyright (c) 2023, WP Charitable LLC
8 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
9 * @since 1.6.22
10 * @version 1.6.22
11 */
12
13 // Exit if accessed directly.
14 if ( ! defined( 'ABSPATH' ) ) {
15 exit;
16 }
17
18 /**
19 * In Twenty Seventeen, add a hidden sidebar to avoid a Javascript error.
20 *
21 * On the donation page, there is no sidebar, and Twenty Seventeen throws
22 * an error as a result, which can pause other Javascript processing.
23 *
24 * @see https://core.trac.wordpress.org/ticket/41050
25 *
26 * @since 1.6.22
27 *
28 * @return void
29 */
30 function charitable_compat_twentyseventeen_missing_sidebar() {
31 if ( charitable_is_page( 'campaign_donation', array( 'strict' => true ) ) ) {
32 echo '<div id="secondary" class="charitable-hidden"></div>';
33 }
34 }
35
36 add_action( 'charitable_donation_form_after', 'charitable_compat_twentyseventeen_missing_sidebar' );
37