bare theme

This commit is contained in:
cupcakearmy
2019-08-25 18:40:12 +02:00
parent d5ee4e217f
commit 4741aad8fa
3 changed files with 42 additions and 0 deletions

23
theme/functions.php Normal file
View File

@@ -0,0 +1,23 @@
<?php
add_theme_support( 'post-thumbnails' );
add_theme_support( 'html5');
add_filter( 'wp_headers', function ( $headers ) {
$headers['Content-Security-Policy'] = "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; report-uri csp@nicco.io";
$headers['X-Content-Type-Options'] = 'nosniff';
$headers['X-Frame-Options'] = "deny";
$headers['Strict-Transport-Security'] = "max-age=31536000";
$headers['Referrer-Policy'] = "origin";
// Enable in for production
// return $headers;
} );
add_action( 'wp_enqueue_scripts', function () {
// JS
wp_enqueue_script( 'theme-js', get_template_directory_uri() . '/dist/js/index.js' );
// CSS
wp_enqueue_style( 'theme-css', get_template_directory_uri() . '/dist/styles/index.css' );
} );