| @@ -20,33 +20,8 @@ | ||
| 20 | 20 | trait Helper |
| 21 | 21 | { |
| 22 | 22 | use Elements, ElementorHelper, WordPressHelper, TemplateQuery; |
| 23 | 23 | |
| 24 | - public function bp_template_render($filePath, $variables = array(), $print = true) | |
| 25 | - { | |
| 26 | - $output = NULL; | |
| 27 | - | |
| 28 | - if (file_exists($filePath)) { | |
| 29 | - // Extract the variables to a local namespace | |
| 30 | - extract($variables); | |
| 31 | - | |
| 32 | - // Start output buffering | |
| 33 | - ob_start(); | |
| 34 | - | |
| 35 | - // Include the template file | |
| 36 | - include $filePath; | |
| 37 | - | |
| 38 | - // End buffering and return its contents | |
| 39 | - $output = ob_get_clean(); | |
| 40 | - } | |
| 41 | - | |
| 42 | - if ( $print ) { | |
| 43 | - print $output; | |
| 44 | - } | |
| 45 | - | |
| 46 | - return $output; | |
| 47 | - } | |
| 48 | - | |
| 49 | 24 | /** |
| 50 | 25 | * List of allowed html tag for wp_kses |
| 51 | 26 | * |
| 52 | 27 | * bp_allowed_tags |