first commit
This commit is contained in:
22
wp-content/plugins/brizy/editor/view.php
Normal file
22
wp-content/plugins/brizy/editor/view.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( 'Direct access forbidden.' );
|
||||
}
|
||||
|
||||
class Brizy_Editor_View {
|
||||
public static function render( $path, $args = array() ) {
|
||||
$file = $path . '.php';
|
||||
|
||||
if ( ! file_exists( $file ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
extract( $args );
|
||||
include $file;
|
||||
}
|
||||
|
||||
public static function get( $path, $args = array() ) {
|
||||
ob_start();
|
||||
self::render( $path, $args );
|
||||
return ob_get_clean();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user