| @@ -1,19 +1,23 @@ | ||
| 1 | -<?php | |
| 2 | - | |
| 3 | - | |
| 4 | -namespace Jet_Form_Builder\Classes; | |
| 5 | - | |
| 6 | - | |
| 7 | -trait Get_Template_Trait { | |
| 8 | - /** | |
| 9 | - * Returns template path | |
| 10 | - * | |
| 11 | - * @param [type] $path [description] | |
| 12 | - * | |
| 13 | - * @return [type] [description] | |
| 14 | - */ | |
| 15 | - public function get_global_template( $path = '' ) { | |
| 16 | - return JET_FORM_BUILDER_PATH . 'templates/' . $path; | |
| 17 | - } | |
| 18 | - | |
| 19 | -} | |
| 1 | +<?php | |
| 2 | + | |
| 3 | + | |
| 4 | +namespace Jet_Form_Builder\Classes; | |
| 5 | + | |
| 6 | +// If this file is called directly, abort. | |
| 7 | +if ( ! defined( 'WPINC' ) ) { | |
| 8 | + die; | |
| 9 | +} | |
| 10 | + | |
| 11 | +trait Get_Template_Trait { | |
| 12 | + /** | |
| 13 | + * Returns template path | |
| 14 | + * | |
| 15 | + * @param [type] $path [description] | |
| 16 | + * | |
| 17 | + * @return [type] [description] | |
| 18 | + */ | |
| 19 | + public function get_global_template( $path = '' ) { | |
| 20 | + return JET_FORM_BUILDER_PATH . 'templates' . DIRECTORY_SEPARATOR . $path; | |
| 21 | + } | |
| 22 | + | |
| 23 | +} | |