Document theme behavior and format editor styles

This commit is contained in:
2026-07-26 22:08:55 +02:00
parent c5cff94d5a
commit bf41df9ad6
16 changed files with 97 additions and 19 deletions
+5
View File
@@ -16,14 +16,17 @@ function c1024_2026_setup() {
'footer' => __( 'Footer menu', 'c1024-2026' ),
) );
}
// Register theme capabilities before WordPress initializes theme-dependent features.
add_action( 'after_setup_theme', 'c1024_2026_setup' );
function c1024_2026_assets() {
wp_enqueue_style( 'c1024-2026-style', get_stylesheet_uri(), array(), '1.0.0' );
wp_enqueue_script( 'c1024-2026-theme', get_template_directory_uri() . '/assets/js/theme.js', array(), '1.0.0', true );
}
// Load public assets through WordPress so dependencies and plugin integrations remain ordered.
add_action( 'wp_enqueue_scripts', 'c1024_2026_assets' );
// These settings drive the optional front-page hero without hard-coding media or copy.
function c1024_2026_customize_register( $wp_customize ) {
$wp_customize->add_section( 'c1024_2026_home_hero', array(
'title' => __( 'Home page video hero', 'c1024-2026' ),
@@ -39,9 +42,11 @@ function c1024_2026_customize_register( $wp_customize ) {
$wp_customize->add_setting( 'c1024_2026_hero_text', array( 'sanitize_callback' => 'sanitize_textarea_field' ) );
$wp_customize->add_control( 'c1024_2026_hero_text', array( 'label' => __( 'Overlay text', 'c1024-2026' ), 'section' => 'c1024_2026_home_hero', 'type' => 'textarea' ) );
}
// Customize controls are registered only while the Customizer API is available.
add_action( 'customize_register', 'c1024_2026_customize_register' );
function c1024_2026_excerpt_more( $more ) {
return '…';
}
// Keep generated excerpts visually concise across all card-based archive loops.
add_filter( 'excerpt_more', 'c1024_2026_excerpt_more' );