HEX
Server: nginx/1.27.1
System: Linux in-4 5.15.0-131-generic #141-Ubuntu SMP Fri Jan 10 21:18:28 UTC 2025 x86_64
User: ilikadirect (1186)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
Upload Files
File: /storage/v6964/testingff/public_html/fdfctr/wp-content/plugins/feeds-for-youtube/inc/SBY_View.php
<?php
/**
 * Class SBY_View
 *
 * This class loads view page template files on the admin dashboard area.
 *
 * @since 2.0
 */
namespace SmashBalloon\YouTubeFeed;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

class SBY_View {

	/**
	 * Base file path of the templates
	 *
	 * @since 2.0
	 */
	const BASE_PATH = SBY_PLUGIN_DIR . 'templates/';

	public function __construct() {
	}

	/**
	 * Render template
	 *
	 * @param string $file
	 * @param array $data
	 *
	 * @since 2.0
	 */
	public static function render( $file, $data = array() ) {
		$file = str_replace( '.', '/', $file );
		$file = self::BASE_PATH . $file . '.php';

		if ( file_exists( $file ) ) {
			if ( ! empty( $data ) ) {
				extract( $data );
			}
			include_once $file;
		}
	}
}