functions.php 602 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * Add Editor Styles
  4. */
  5. function newtheme_editor_styles() {
  6. // Enqueue editor styles.
  7. add_editor_style(
  8. array(
  9. '/assets/theme.css',
  10. )
  11. );
  12. }
  13. add_action( 'after_setup_theme', 'newtheme_editor_styles' );
  14. /**
  15. *
  16. * Enqueue scripts and styles.
  17. */
  18. function newtheme_scripts() {
  19. wp_enqueue_style( 'newtheme-styles', get_stylesheet_directory_uri() . '/assets/theme.css', array('blockbase-ponyfill'), wp_get_theme()->get( 'Version' ) );
  20. }
  21. add_action( 'wp_enqueue_scripts', 'newtheme_scripts' );
  22. /**
  23. * Block Patterns.
  24. */
  25. require get_stylesheet_directory() . '/inc/block-patterns.php';