| Server IP : 68.178.247.200 / Your IP : 216.73.217.131 Web Server : Apache System : Linux p3plzcpnl489463.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64 User : x9dppmxs4rgd ( 8559391) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/x9dppmxs4rgd/public_html/wp-content/plugins/paypal-donations/src/PayPalDonations/ |
Upload File : |
<?php
/**
* Class for MVC like View Handling in WordPress.
*
* @package PayPal Donations
* @author Johan Steen <artstorm at gmail dot com>
*/
class PayPalDonations_View
{
/**
* Render a View.
*
* @param string $view View to render.
* @param array $data Data to be used within the view.
* @return string The processed view.
*/
public static function render($view, $data = null)
{
// Handle data
($data) ? extract($data) : null;
ob_start();
include(plugin_dir_path(__FILE__).'../../views/'.$view.'.php');
$view = ob_get_contents();
ob_end_clean();
// Optimize the view by removing linefeeds and multiple spaces
if (isset($pd_options['remove_lf'])) {
$view = trim(preg_replace('/\s+/', ' ', $view));
}
return $view;
}
}