functions.php 738 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. if ( ! function_exists( 'mayland_blocks_support' ) ) :
  3. function mayland_blocks_support() {
  4. // Enqueue editor styles.
  5. add_editor_style(
  6. array(
  7. 'theme.css',
  8. )
  9. );
  10. // This theme has one menu location.
  11. register_nav_menus(
  12. array(
  13. 'primary' => __( 'Primary Navigation', 'mayland-blocks' ),
  14. )
  15. );
  16. }
  17. add_action( 'after_setup_theme', 'mayland_blocks_support' );
  18. endif;
  19. /**
  20. * Enqueue scripts and styles.
  21. */
  22. function mayland_blocks_scripts() {
  23. // Enqueue front-end styles.
  24. wp_enqueue_style( 'mayland-blocks-styles', get_stylesheet_directory_uri() . '/assets/theme.css', array( 'blockbase-ponyfill' ), wp_get_theme()->get( 'Version' ) );
  25. }
  26. add_action( 'wp_enqueue_scripts', 'mayland_blocks_scripts' );