| 1 |
<?php |
| 2 |
/** |
| 3 |
* Blank canvas. |
| 4 |
* |
| 5 |
* @package Depicter |
| 6 |
*/ |
| 7 |
|
| 8 |
if ( ! defined( 'ABSPATH' ) ) { |
| 9 |
exit; // Exit if accessed directly. |
| 10 |
} |
| 11 |
|
| 12 |
// $view_args is required to be passed |
| 13 |
|
| 14 |
$view_defaults = [ |
| 15 |
'title' => 'Depicter', |
| 16 |
'head' => '', |
| 17 |
'body_classes' => [], |
| 18 |
'content' => '', |
| 19 |
'footer' => '' |
| 20 |
]; |
| 21 |
|
| 22 |
$view_args = array_merge( $view_defaults, $view_args ); |
| 23 |
|
| 24 |
global $wp_version; |
| 25 |
extract( $view_args ); |
| 26 |
|
| 27 |
$body_classes[] = 'depicter-canvas'; |
| 28 |
$body_classes[] = 'wp-version-' . str_replace( '.', '-', $wp_version ); |
| 29 |
|
| 30 |
if ( is_rtl() ) { |
| 31 |
$body_classes[] = 'rtl'; |
| 32 |
} |
| 33 |
|
| 34 |
?> |
| 35 |
<!DOCTYPE html> |
| 36 |
<html <?php language_attributes(); ?>> |
| 37 |
<head> |
| 38 |
<meta charset="utf-8" /> |
| 39 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 40 |
<title><?php echo esc_html( $title ); ?></title> |
| 41 |
<?php echo \Depicter\Utility\Sanitize::html( $head ); ?> |
| 42 |
<script>var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>';</script> |
| 43 |
</head> |
| 44 |
<body class="<?php echo Depicter\Utility\Sanitize::attribute( implode( ' ', $body_classes ) ); ?>"> |
| 45 |
<?php echo \Depicter\Utility\Sanitize::html( $content, null, 'depicter/output' ); ?> |
| 46 |
<?php echo \Depicter\Utility\Sanitize::html( $footer ); ?> |
| 47 |
</body> |
| 48 |
</html> |
| 49 |
|