Skip to content
trunk
Switch branches/tags
Code

Latest commit

* Add preloading for /__experimental/menus endpoint.

* Add a new filter to allow to modify the data that has already been preloaded.

* Commit WIP.

* Preload more endpoints.

* Fix preload paths.

* Don't add slash if the key is empty.
Otherwise we will get urls like /wp/v2/types/?context=edit (trailing slash).

* Preload /wp/v2/types URLs.

* Commit WIP.

* 1. Fix the test.
2. Add PHPDOC blocks.
3. Remove {$editor_name}_preloaded_data filter. We are not going to use it.

* Fix indents.

* Add PHPDOC blocks to the public functions introduced in this PR.

* Add @SInCE tags.

* OPTIONS type requests should be cached the same way as GET type requets.
We must allow using cached data only once (to avoid using outdated data).

* Fix the code style.

* Use WP function build_query instead of http_build_query.

* Fix code style.

* Format the code.

* Add a new filter to modify the preloaded data.
This can be handy in many situations when we need to change the preloaded data.

* Wire up createMenuPreloadingMiddleware so that we can preload menus data separately.

* Fix PHPDOC blocks.

* Add PHPDOC block.

* Implement menu preloading middleware.

* Remove the gutenberg_navigation_get_menu_endpoint function. It's not used.

* We should only load data once.

* Add PHPDOC block.

* Fix the unit test.

* Improve test code coverage. Add a new unit test for test_gutenberg_navigation_editor_preload_menus_function_returns_correct_data

* Update lib/editor-settings.php

Co-authored-by: Pascal Birchler <[email protected]>

* Fix code style.

* Fix code style.

* Fix code style.

* Fix bug in createMenuPreloadingMiddleware.
We should send correct response for /__experimental/menu/<menuId> endpoint.

* Revert this change as it needs to be moved into a separate PR.

* Add public access modifier to the functions.

* Fix version name.

* Update packages/edit-navigation/src/utils/index.js

Co-authored-by: Adam Zielinski <[email protected]>

* Remove the yoda condition as it can be harder to read it for some people.

* 1. Format the code.
2. Don't use variable filter name. Pass the ditor_name as the second parameter.

* 1. Update PHPDOC block.
2. Remove redundant code.

* Update lib/navigation-page.php

Co-authored-by: Jonny Harris <[email protected]>

* Fix the comment.

* Make the middleware unstable.
We don't want it to become a stable API for now.
See #35402 (comment)

Co-authored-by: Pascal Birchler <[email protected]>
Co-authored-by: Adam Zielinski <[email protected]>
Co-authored-by: Jonny Harris <[email protected]>
277fee8

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time

Gutenberg

End-to-End Tests Static Analysis (Linting, License, Type checks...) Unit Tests Create Block React Native E2E Tests (iOS) React Native E2E Tests (Android)

lerna

Screenshot of the Gutenberg Editor, editing a post in WordPress

Welcome to the development hub for the WordPress Gutenberg project!

"Gutenberg" is a codename for a whole new paradigm in WordPress site building and publishing, that aims to revolutionize the entire publishing experience as much as Gutenberg did the printed word. Right now, the project is in the second phase of a four-phase process that will touch every piece of WordPress -- Editing, Customization (which includes Full Site Editing, Block Patterns, Block Directory and Block based themes), Collaboration, and Multilingual -- and is focused on a new editing experience, the block editor.

The block editor introduces a modular approach to pages and posts: each piece of content in the editor, from a paragraph to an image gallery to a headline, is its own block. And just like physical blocks, WordPress blocks can be added, arranged, and rearranged, allowing WordPress users to create media-rich pages in a visually intuitive way -- and without work-arounds like shortcodes or custom HTML.

The block editor first became available in December 2018, and we're still hard at work refining the experience, creating more and better blocks, and laying the groundwork for the next three phases of work. The Gutenberg plugin gives you the latest version of the block editor so you can join us in testing bleeding-edge features, start playing with blocks, and maybe get inspired to build your own.

Getting Started

Get hands on: check out the block editor live demo to play with a test instance of the editor.

Using Gutenberg

Developing for Gutenberg

Extending and customizing is at the heart of the WordPress platform, this is no different for the Gutenberg project. The editor and future products can be extended by third-party developers using plugins.

Review the Create a Block tutorial for the fastest way to get started extending the block editor. See the Developer Documentation for extensive tutorials, documentation, and API references.

Contribute to Gutenberg

Gutenberg is an open-source project and welcomes all contributors from code to design, from documentation to triage. The project is built by many contributors and volunteers and we'd love your help building it.

See the Contributors Handbook for all the details on how you can contribute. See CONTRIBUTING.md for the contributing guidelines.

As with all WordPress projects, we want to ensure a welcoming environment for everyone. With that in mind, all contributors are expected to follow our Code of Conduct.

Get Involved

You can join us in the #core-editor channel in Slack, see the WordPress Slack page for signup information; it is free to join.

Weekly meetings The Editor Team meets weekly on Wednesdays at 14:00 UTC in Slack. If you can not join the meeting, agenda and notes are posted to the Make WordPress Blog.

License

WordPress is free software, and is released under the terms of the GNU General Public License version 2 or (at your option) any later version. See LICENSE.md for complete license.



Code is Poetry.