block-styles.php 770 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php declare( strict_types = 1 ); ?>
  2. <?php
  3. /**
  4. * Seedlet Theme: Block Styles
  5. *
  6. * @package Seedlet
  7. * @since 1.0.0
  8. */
  9. if ( function_exists( 'register_block_style' ) ) {
  10. function seedlet_register_block_styles() {
  11. /**
  12. * Register block styles
  13. */
  14. register_block_style(
  15. 'core/latest-posts',
  16. array(
  17. 'name' => 'seedlet-alternating-grid',
  18. 'label' => __( 'Alternating Grid', 'seedlet' ),
  19. 'style_handle' => 'seedlet-alternating-grid',
  20. )
  21. );
  22. register_block_style(
  23. 'a8c/blog-posts',
  24. array(
  25. 'name' => 'seedlet-alternating-grid',
  26. 'label' => __( 'Alternating Grid', 'seedlet' ),
  27. 'style_handle' => 'seedlet-alternating-grid',
  28. )
  29. );
  30. }
  31. add_action( 'init', 'seedlet_register_block_styles' );
  32. }