-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwrapper.php
More file actions
61 lines (51 loc) · 1.31 KB
/
Copy pathwrapper.php
File metadata and controls
61 lines (51 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
/**
* Main template wrapper.
*
* Now we don't have to repeat `get_header()/get_footer()`
* in other template files all the time.
*
* @link http://scribu.net/wordpress/theme-wrappers.html
*
* @package Michelle
* @copyright WebMan Design, Oliver Juhas
*
* @since 1.0.0
*/
namespace WebManDesign\Michelle;
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
$template_path = Tool\Wrapper::$path;
get_header(
/**
* Filters get_header() parameter.
*
* @since 1.0.0
*
* @param string $name The name of the specialized header, the get_header() parameter.
* @param string $template_path The template path requesting the header.
*/
(string) apply_filters( 'michelle/get_header', '', $template_path )
);
?>
<?php
/**
* WordPress uses `include` to load the template.
* @see wp-includes/template-loader.php
*/
if ( $template_path ) {
include $template_path; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound
}
?>
<?php
get_footer(
/**
* Filters get_footer() parameter.
*
* @since 1.0.0
*
* @param string $name The name of the specialized footer, the get_footer() parameter.
* @param string $template_path The template path requesting the footer.
*/
(string) apply_filters( 'michelle/get_footer', '', $template_path )
);