🌑
Kairos
search
Ctrlk
  • Start Me Up
  • Block Making
  • Block Editing
  • Page Component
  • Tailwind
  • Study
  • Ideas
  • Troubleshooting
  • Data
  • Gutenberg
  • React
  • Forms
  • Concepts
  • Advanced Custom Fields
  • Algolia Search
  • WooCommerce
  • GraphQL
  • Syncs
gitbookPowered by GitBook
block-quoteOn this pagechevron-down

Gutenberg

Here are some helpful links for learning more about Gutenberg

hashtag
Built In Block Editing Components

Logogutenberg/packages/block-editor/src/components/inspector-controls/README.md at e8b7f87add7ad4cab39f7bbd63c38aa007738712 · WordPress/gutenbergGitHubchevron-right
Inspector Controls

hashtag
Gutenberg Packages

Logogutenberg/packages/block-library/src at 15a198cbf3603ed7b1d673b807910418c92b0468 · WordPress/gutenbergGitHubchevron-right

hashtag
getEntityRecords

LogoRequesting data in Gutenberg with getEntityRecordsRyan Welcherchevron-right

LogoCreate Select Dropdown with Posts or Terms in GutenbergMisha Rudrastyhchevron-right

hashtag
Block Library

Logogutenberg/packages/block-library/src at trunk · WordPress/gutenbergGitHubchevron-right

hashtag
Theme.JSON

LogoGlobal Settings & Styles (theme.json) – Block Editor Handbook | Developer.WordPress.orgWordPress Developer Resourceschevron-right
theme.json docs

hashtag
Locking Blocks

LogoLocking Blocks in WordPress 5.9Make WordPress Corechevron-right
locking block templates

hashtag
More Block Data

hashtag
Removing Editor Panels

We can use wp.data.dispatch to remove editor panels as shown above.

We can also toggle them open by default as you can see below.

PreviousDatachevron-leftNextReactchevron-right

Last updated 3 years ago

  • Built In Block Editing Components
  • Gutenberg Packages
  • getEntityRecords
  • Block Library
  • Theme.JSON
  • Locking Blocks
  • More Block Data
  • Removing Editor Panels
backend/plugins/gravity-platform-core/src/index.tsx
wp.domReady(() => {
	// wp.blocks.unregisterBlockStyle("core/quote", ["default", "plain", "large"]);
	// THIS CAN SHOW THE BLOCK OBJECTS IN THE CONSOLE OF THE PAGE EDITOR
	wp.blocks.getBlockTypes().forEach((block) => {
	 	console.log("block :", block);
	 });
});
backend/plugins/gravity-platform-core/src/index.tsx
wp.domReady(() => {
	wp.blocks.unregisterBlockStyle("core/quote", ["default", "plain", "large"]);
	wp.data.dispatch("core/edit-post").removeEditorPanel("discussion-panel");
	wp.data.dispatch("core/edit-post").removeEditorPanel("template");
});
if (!wp.data.select("core/edit-post").isPanelOpened("featured-image")) {
	wp.data
		.dispatch("core/edit-post")
		.toggleEditorPanelOpened("featured-image");
}