PluginProbe
Smash Balloon Social Post Feed – Simple Social Feeds for WordPress / 4.1.4
Smash Balloon Social Post Feed – Simple Social Feeds for WordPress v4.1.4
4.12.0 4.10.0 4.9.0 4.8.1 trunk 1.0 1.1 1.12.1 1.2.3 1.2.4 1.2.5 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.4.0 1.4.1 1.4.2 All 171 releases
custom-facebook-feed / inc / CFF_View.php
CFF_View.php
41 lines 790 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Class CFF_View
4 *
5 * This class loads view page template files on the admin dashboard area.
6 *
7 * @since 4.0
8 */
9 namespace CustomFacebookFeed;
10 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
11
12 class CFF_View {
13
14 /**
15 * Base file path of the templates
16 *
17 * @since 4.0
18 */
19 const BASE_PATH = CFF_PLUGIN_DIR . 'admin/views/';
20
21 public function __construct() {
22 }
23
24 /**
25 * Render template
26 *
27 * @param string $file
28 * @param array $data
29 *
30 * @since 4.0
31 */
32 public static function render( $file, $data = array() ) {
33 $file = str_replace( '.', '/', $file );
34 $file = self::BASE_PATH . $file . '.php';
35
36 if ( file_exists( $file ) ) {
37 if ( $data !== null && ! empty( $data ) ) extract( $data );
38 include_once $file;
39 }
40 }
41 }