functions.php 1001 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * Rainfall functions and definitions
  4. *
  5. * @link https://developer.wordpress.org/themes/basics/theme-functions/
  6. *
  7. * @package Rainfall
  8. * @since Rainfall 1.0
  9. */
  10. if ( ! function_exists( 'rainfall_support' ) ) :
  11. /**
  12. * Sets up theme defaults and registers support for various WordPress features.
  13. *
  14. * @since Rainfall 1.0
  15. *
  16. * @return void
  17. */
  18. function rainfall_support() {
  19. // Enqueue editor styles.
  20. add_editor_style( 'style.css' );
  21. }
  22. endif;
  23. add_action( 'after_setup_theme', 'rainfall_support' );
  24. if ( ! function_exists( 'rainfall_styles' ) ) :
  25. /**
  26. * Enqueue styles.
  27. *
  28. * @since Archeo 1.0
  29. *
  30. * @return void
  31. */
  32. function rainfall_styles() {
  33. // Register theme stylesheet.
  34. wp_register_style(
  35. 'rainfall-style',
  36. get_template_directory_uri() . '/style.css',
  37. array(),
  38. wp_get_theme()->get( 'Version' )
  39. );
  40. // Enqueue theme stylesheet.
  41. wp_enqueue_style( 'rainfall-style' );
  42. }
  43. endif;
  44. add_action( 'wp_enqueue_scripts', 'rainfall_styles' );