Theme 2024: Initial commit of new theme

This commit is contained in:
Kelly Dwan 2024-08-27 10:58:23 -04:00
parent 50c21b4e85
commit 512d7ba421
No known key found for this signature in database
GPG key ID: 8BA5575F3D11575D
17 changed files with 318 additions and 4 deletions

View file

@ -0,0 +1,32 @@
<?php
namespace WordPressDotOrg\Theme\FiveForTheFuture_2024;
require_once __DIR__ . '/inc/block-config.php';
/**
* Actions and filters.
*/
add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\enqueue_assets' );
/**
* Enqueue scripts and styles.
*/
function enqueue_assets() {
$asset_file = get_theme_file_path( 'build/style/index.asset.php' );
if ( ! file_exists( $asset_file ) ) {
return;
}
// The parent style is registered as `wporg-parent-2021-style`, and will be loaded unless
// explicitly unregistered. We can load any child-theme overrides by declaring the parent
// stylesheet as a dependency.
$metadata = require $asset_file;
wp_enqueue_style(
'wporg-5ftf-2024',
get_theme_file_uri( 'build/style/style-index.css' ),
array( 'wporg-parent-2021-style', 'wporg-global-fonts' ),
$metadata['version']
);
}