functions.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. if ( ! function_exists( 'quadrat_support' ) ) :
  3. function quadrat_support() {
  4. // Enqueue editor styles.
  5. add_editor_style(
  6. array(
  7. '/assets/theme.css',
  8. )
  9. );
  10. // Add support for core custom logo.
  11. add_theme_support(
  12. 'custom-logo',
  13. array(
  14. 'height' => 35,
  15. 'width' => 150,
  16. 'flex-width' => true,
  17. 'flex-height' => true,
  18. )
  19. );
  20. // This theme uses wp_nav_menu() in two locations.
  21. register_nav_menus(
  22. array(
  23. 'primary' => __( 'Primary Navigation', 'quadrat' ),
  24. )
  25. );
  26. remove_theme_support( 'block-templates' );
  27. }
  28. add_action( 'after_setup_theme', 'quadrat_support' );
  29. endif;
  30. /**
  31. * Enqueue scripts and styles.
  32. */
  33. function quadrat_scripts() {
  34. // Enqueue front-end styles.
  35. wp_enqueue_style( 'quadrat-styles', get_stylesheet_directory_uri() . '/assets/theme.css', array( 'blockbase-ponyfill' ), wp_get_theme()->get( 'Version' ) );
  36. }
  37. add_action( 'wp_enqueue_scripts', 'quadrat_scripts' );
  38. /**
  39. * Block Patterns.
  40. */
  41. require get_stylesheet_directory() . '/inc/block-patterns.php';
  42. /**
  43. * Block Styles.
  44. */
  45. require get_stylesheet_directory() . '/inc/block-styles.php';