PluginProbe
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More / 0.0.5
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More v0.0.5
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 / Traits / Helper.php

Helper.php in Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More 0.0.5, at includes/Traits/Helper.php

43 lines 810 B
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\Traits;
4
5 /**
6 * Exit if accessed directly
7 */
8 if (!defined('ABSPATH')) {
9 exit;
10 }
11
12 /**
13 * Helper trait
14 *
15 * @since 0.0.1
16 */
17 trait Helper
18 {
19 use Elements, ElementorHelper, WordPressHelper;
20
21 public function bp_template_render($filePath, $variables = array(), $print = true)
22 {
23 $output = NULL;
24 if (file_exists($filePath)) {
25 // Extract the variables to a local namespace
26 extract($variables);
27
28 // Start output buffering
29 ob_start();
30
31 // Include the template file
32 include $filePath;
33
34 // End buffering and return its contents
35 $output = ob_get_clean();
36 }
37 if ($print) {
38 print $output;
39 }
40 return $output;
41 }
42 }
43