extend-blocks.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /* global wp */
  2. ( function( blocks, domReady ) {
  3. var styles = [
  4. {
  5. name: "core/group",
  6. options: {
  7. name: "outline",
  8. label: "Outline",
  9. },
  10. },
  11. {
  12. name: "core/cover",
  13. options: {
  14. name: "duotone",
  15. label: "Duotone",
  16. },
  17. },
  18. {
  19. name: "core/gallery",
  20. options: {
  21. name: "duotone",
  22. label: "Duotone",
  23. },
  24. },
  25. {
  26. name: "core/image",
  27. options: {
  28. name: "duotone",
  29. label: "Duotone",
  30. },
  31. },
  32. {
  33. name: "core/latest-posts",
  34. options: {
  35. name: "duotone",
  36. label: "Duotone",
  37. },
  38. },
  39. {
  40. name: "core/paragraph",
  41. options: {
  42. name: "border-top",
  43. label: "Border Top",
  44. },
  45. },
  46. {
  47. name: "core/media-text",
  48. options: {
  49. name: "duotone",
  50. label: "Duotone",
  51. },
  52. },
  53. {
  54. name: "core/heading",
  55. options: {
  56. name: "border-top",
  57. label: "Border Top",
  58. },
  59. },
  60. {
  61. name: "core/paragraph",
  62. options: {
  63. name: "text-indent",
  64. label: "Indent",
  65. },
  66. },
  67. ];
  68. domReady( function() {
  69. styles.forEach ( function(style){
  70. blocks.registerBlockStyle( style.name, style.options );
  71. });
  72. blocks.unregisterBlockStyle( 'core/pullquote', 'solid-color' );
  73. });
  74. }( wp.blocks, wp.domReady ) );