mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-04-22 02:53:43 +03:00
33 lines
838 B
PHP
33 lines
838 B
PHP
<?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']
|
|
);
|
|
}
|