functions.php 1003 B

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