
* first commit with initial files * templates * styles * template parts * Removed errant metadata * Added create tool To use `php create.php` and answer the prompts. This will create a folder alongside this theme with the provided metadata as well as namespaced attributes refactored. * Removed a create script. (It shouldn't be here...) * 404 block pattern * remove fontSlug * removed block styles support * change slug of block pattern * added namespace to pattern * ignore this theme when pushing to the sandbox Co-authored-by: Jason Crist <jcrist@pbking.com>
58 lines
1 KiB
PHP
58 lines
1 KiB
PHP
<?php
|
|
/**
|
|
* Block Canvas functions and definitions
|
|
*
|
|
* @link https://developer.wordpress.org/themes/basics/theme-functions/
|
|
*
|
|
* @package Block Canvas
|
|
* @since Block Canvas 1.0
|
|
*/
|
|
|
|
|
|
if ( ! function_exists( 'block_canvas_support' ) ) :
|
|
|
|
/**
|
|
* Sets up theme defaults and registers support for various WordPress features.
|
|
*
|
|
* @since Block Canvas 1.0
|
|
*
|
|
* @return void
|
|
*/
|
|
function block_canvas_support() {
|
|
|
|
// Enqueue editor styles.
|
|
add_editor_style( 'style.css' );
|
|
|
|
}
|
|
|
|
endif;
|
|
|
|
add_action( 'after_setup_theme', 'block_canvas_support' );
|
|
|
|
if ( ! function_exists( 'block_canvas_styles' ) ) :
|
|
|
|
/**
|
|
* Enqueue styles.
|
|
*
|
|
* @since Block Canvas 1.0
|
|
*
|
|
* @return void
|
|
*/
|
|
function block_canvas_styles() {
|
|
|
|
// Register theme stylesheet.
|
|
wp_register_style(
|
|
'block_canvas-style',
|
|
get_template_directory_uri() . '/style.css',
|
|
array(),
|
|
wp_get_theme()->get( 'Version' )
|
|
);
|
|
|
|
// Enqueue theme stylesheet.
|
|
wp_enqueue_style( 'block_canvas-style' );
|
|
|
|
}
|
|
|
|
endif;
|
|
|
|
add_action( 'wp_enqueue_scripts', 'block_canvas_styles' );
|