block-styles.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. /**
  3. * Blockbase Theme: Block Styles
  4. *
  5. * @package Blockbase
  6. * @since 1.2.8
  7. */
  8. if ( ! function_exists( 'blockbase_register_block_styles' ) ) :
  9. function blockbase_register_block_styles() {
  10. if ( function_exists( 'register_block_style' ) ) {
  11. /**
  12. * Register block styles
  13. */
  14. register_block_style(
  15. 'core/navigation',
  16. array(
  17. 'name' => 'blockbase-navigation-improved-responsive',
  18. 'label' => __( 'Improved Responsive Navigation', 'blockbase' ),
  19. 'style_handle' => 'blockbase-navigation-improved-responsive',
  20. )
  21. );
  22. //Post meta styles with icons
  23. register_block_style(
  24. 'core/post-author',
  25. array(
  26. 'name' => 'post-author-icon',
  27. 'label' => __( 'With icon', 'blockbase' ),
  28. 'style_handle' => 'post-author-icon',
  29. )
  30. );
  31. register_block_style(
  32. 'core/post-date',
  33. array(
  34. 'name' => 'post-date-icon',
  35. 'label' => __( 'With icon', 'blockbase' ),
  36. 'style_handle' => 'post-date-icon',
  37. )
  38. );
  39. register_block_style(
  40. 'core/post-terms',
  41. array(
  42. 'name' => 'post-tag-icon',
  43. 'label' => __( 'With tag icon', 'blockbase' ),
  44. 'style_handle' => 'post-tag-icon',
  45. )
  46. );
  47. register_block_style(
  48. 'core/post-terms',
  49. array(
  50. 'name' => 'post-category-icon',
  51. 'label' => __( 'With category icon', 'blockbase' ),
  52. 'style_handle' => 'post-category-icon',
  53. )
  54. );
  55. }
  56. }
  57. endif;
  58. add_action( 'after_setup_theme', 'blockbase_register_block_styles' );