functions.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 starter content
  11. include get_stylesheet_directory() . '/inc/starter-content.php';
  12. add_theme_support(
  13. 'starter-content',
  14. $quadrat_starter_content
  15. );
  16. // This theme uses wp_nav_menu() in two locations.
  17. register_nav_menus(
  18. array(
  19. 'primary' => __( 'Primary Navigation', 'quadrat' ),
  20. )
  21. );
  22. }
  23. add_action( 'after_setup_theme', 'quadrat_support' );
  24. endif;
  25. /**
  26. * Enqueue scripts and styles.
  27. */
  28. function quadrat_scripts() {
  29. // Enqueue front-end styles.
  30. wp_enqueue_style( 'quadrat-styles', get_stylesheet_directory_uri() . '/assets/theme.css', array( 'blockbase-ponyfill' ), wp_get_theme()->get( 'Version' ) );
  31. }
  32. add_action( 'wp_enqueue_scripts', 'quadrat_scripts' );
  33. /**
  34. * Block Patterns.
  35. */
  36. require get_stylesheet_directory() . '/inc/block-patterns.php';
  37. /**
  38. * Block Styles.
  39. */
  40. require get_stylesheet_directory() . '/inc/block-styles.php';