Lines:
1 to 100 of 141
<?php /** * Twenty Twenty functions and definitions * * @link https://developer.wordpress.org/themes/basics/theme-functions/ * * @package WordPress * @subpackage Twenty_Twenty * @since Twenty Twenty 1.0 */ /** * Table of Contents: * Theme Support * Required Files * Register Styles * Register Scripts * Register Menus * Custom Logo * WP Body Open * Register Sidebars * Enqueue Block Editor Assets * Enqueue Classic Editor Styles * Block Editor Settings */ /* function twentytwenty_theme_support() – Sets up theme defaults and registers support for various WordPress features. */ add_action( 'after_setup_theme', 'twentytwenty_theme_support' ); /** * REQUIRED FILES * Include required files. */ require get_template_directory() . '/inc/template-tags.php'; // Handle SVG icons. require get_template_directory() . '/classes/class-twentytwenty-svg-icons.php'; require get_template_directory() . '/inc/svg-icons.php'; // Handle Customizer settings. require get_template_directory() . '/classes/class-twentytwenty-customize.php'; // Require Separator Control class. require get_template_directory() . '/classes/class-twentytwenty-separator-control.php'; // Custom comment walker. require get_template_directory() . '/classes/class-twentytwenty-walker-comment.php'; // Custom page walker. require get_template_directory() . '/classes/class-twentytwenty-walker-page.php'; // Custom script loader class. require get_template_directory() . '/classes/class-twentytwenty-script-loader.php'; // Non-latin language handling. require get_template_directory() . '/classes/class-twentytwenty-non-latin-languages.php'; // Custom CSS. require get_template_directory() . '/inc/custom-css.php'; // Block Patterns. require get_template_directory() . '/inc/block-patterns.php'; /* function twentytwenty_register_styles() – Register and Enqueue Styles. */ add_action( 'wp_enqueue_scripts', 'twentytwenty_register_styles' ); /* function twentytwenty_register_scripts() – Register and Enqueue Scripts. */ add_action( 'wp_enqueue_scripts', 'twentytwenty_register_scripts' ); /* function twentytwenty_skip_link_focus_fix() – Fix skip link focus in IE11. */ add_action( 'wp_print_footer_scripts', 'twentytwenty_skip_link_focus_fix' ); /* function twentytwenty_non_latin_languages() – Enqueue non-latin language styles */ add_action( 'wp_enqueue_scripts', 'twentytwenty_non_latin_languages' ); /* function twentytwenty_menus() – Register navigation menus uses wp_nav_menu in five places. */ add_action( 'init', 'twentytwenty_menus' ); /* function twentytwenty_get_custom_logo() – Get the information about the logo. */ add_filter( 'get_custom_logo', 'twentytwenty_get_custom_logo' ); if ( ! function_exists( 'wp_body_open' ) ) { /* function wp_body_open() – Fire the wp_body_open action. */ } /* function twentytwenty_skip_link() – Include a skip to content link at the top of the page so that users can bypass the menu. */ add_action( 'wp_body_open', 'twentytwenty_skip_link', 5 ); /* function twentytwenty_sidebar_registration() – Register widget areas. */