mirror of
https://github.com/cupcakearmy/wordpress-template.git
synced 2024-10-09 07:43:34 +02:00
bare theme
This commit is contained in:
parent
d5ee4e217f
commit
4741aad8fa
23
theme/functions.php
Normal file
23
theme/functions.php
Normal 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
8
theme/index.php
Normal 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
11
theme/style.css
Normal 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
|
||||
*/
|
Loading…
Reference in New Issue
Block a user