functions.php 1.0 KB

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