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' );
} );

8
theme/index.php Normal file
View File

@ -0,0 +1,8 @@
<?php get_header(); ?>
<div id="content">
<?php while ( have_posts() ) {
the_post();
the_content();
} ?>
</div>
<?php get_footer(); ?>

11
theme/style.css Normal file
View File

@ -0,0 +1,11 @@
/*
Theme Name: My Theme
Author: Niccolo Borgioli
Description: Some description
Version: 0.1
License: MIT
Tags: this, that
Author URI: https://nicco.io
License URI: https://opensource.org/licenses/MIT
Theme URI: https://github.com/CupCakeArmy/docker-wordpress
*/