block-styles.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * Skatepark Theme: Block Styles
  4. *
  5. * @package Skatepark
  6. * @since 1.0.0
  7. */
  8. if ( ! function_exists( 'skatepark_register_block_styles' ) ) :
  9. function skatepark_register_block_styles() {
  10. if ( function_exists( 'register_block_style' ) ) {
  11. /**
  12. * Register block styles
  13. */
  14. register_block_style(
  15. 'core/heading',
  16. array(
  17. 'name' => 'skatepark-heading-border',
  18. 'label' => __( 'Top Border', 'skatepark' ),
  19. 'style_handle' => 'skatepark-heading-border',
  20. )
  21. );
  22. register_block_style(
  23. 'core/image',
  24. array(
  25. 'name' => 'skatepark-aside-caption',
  26. 'label' => __( 'Aside caption', 'skatepark' ),
  27. 'style_handle' => 'skatepark-aside-caption',
  28. )
  29. );
  30. register_block_style(
  31. 'core/quote',
  32. array(
  33. 'name' => 'side-quote',
  34. 'label' => __( 'Side quote', 'skatepark' ),
  35. 'style_handle' => 'side-quote',
  36. )
  37. );
  38. register_block_style(
  39. 'core/quote',
  40. array(
  41. 'name' => 'testimonial-quote',
  42. 'label' => __( 'Testimonial', 'skatepark' ),
  43. 'style_handle' => 'testimonial-quote',
  44. )
  45. );
  46. }
  47. }
  48. endif;
  49. add_action( 'after_setup_theme', 'skatepark_register_block_styles' );