Skip to content

Commit

Permalink
Rename backwards compatiblity to backward compatibility (#12751)
Browse files Browse the repository at this point in the history
* Rename backwards compatiblity to backward compatibility

* Remove package-lock from commit

* Update CONTRIBUTING.md

Co-Authored-By: mkaz <marcus@mkaz.com>

* Update CONTRIBUTING.md

Co-Authored-By: mkaz <marcus@mkaz.com>

* Whitespace in manifest
  • Loading branch information
mkaz authored and youknowriad committed Jan 9, 2019
1 parent 175c894 commit 0142e00
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 25 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ Maintaining dozens of npm packages is difficult—it can be tough to keep track

The developer who proposes a change (pull request) is responsible to choose the correct version increment (`major`, `minor`, or `patch`) according to the following guidelines:

- Major version X (X.y.z | X > 0) should be changed with any backwards-incompatible/"breaking" change. This will usually occur at the final stage of deprecating and removing of a feature.
- Minor version Y (x.Y.z | x > 0) should be changed when you add functionality or change functionality in a backwards-compatible manner. It must be incremented if any public API functionality is marked as deprecated.
- Patch version Z (x.y.Z | x > 0) should be incremented when you make backwards-compatible bug fixes.
- Major version X (X.y.z | X > 0) should be changed with any backward incompatible/"breaking" change. This will usually occur at the final stage of deprecating and removing of a feature.
- Minor version Y (x.Y.z | x > 0) should be changed when you add functionality or change functionality in a backward compatible manner. It must be incremented if any public API functionality is marked as deprecated.
- Patch version Z (x.y.Z | x > 0) should be incremented when you make backward compatible bug fixes.

When in doubt, refer to [Semantic Versioning specification](https://semver.org/).

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
This repo is the development hub for the <a href="https://make.wordpress.org/core/2017/01/04/focus-tech-and-design-leads/">editor focus in WordPress Core</a>. `Gutenberg` is the project name.

## Getting started
- **Download:** If you want to use the latest release with your WordPress site, <a href="https://wordpress.org/plugins/gutenberg/">download the latest release from the WordPress.org plugins repository</a>.
- **Download:** If you want to use the latest release with your WordPress site, <a href="https://wordpress.org/plugins/gutenberg/">download the latest release from the WordPress.org plugins repository</a>.
- **Discuss:** Conversations and discussions take place in <a href="https://wordpress.slack.com/messages/C02QB2JS7">`#core-editor` channel on the Making WordPress Slack</a>.
- **Contribute:** Development of Gutenberg happens in this GitHub repo. Get started by <a href="https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md">reading the contributing guidelines</a>.
- **Learn:** <a href="https://wordpress.org/gutenberg/">Discover more about the project on WordPress.org</a>.
Expand Down Expand Up @@ -44,7 +44,7 @@ Check out the <a href="https://github.com/WordPress/gutenberg/blob/master/docs/r

## Compatibility

Posts are backwards compatible, and shortcodes will still work. We are continuously exploring how highly-tailored meta boxes can be accommodated, and are looking at solutions ranging from a plugin to disable Gutenberg to automatically detecting whether to load Gutenberg or not. While we want to make sure the new editing experience from writing to publishing is user-friendly, we’re committed to finding a good solution for highly-tailored existing sites.
Posts are backward compatible, and shortcodes will still work. We are continuously exploring how highly-tailored meta boxes can be accommodated, and are looking at solutions ranging from a plugin to disable Gutenberg to automatically detecting whether to load Gutenberg or not. While we want to make sure the new editing experience from writing to publishing is user-friendly, we’re committed to finding a good solution for highly-tailored existing sites.

## The stages of Gutenberg

Expand Down
2 changes: 1 addition & 1 deletion docs/designers-developers/developers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ You can also filter certain aspects of the editor; this is documented on the [Ed

**Porting PHP meta boxes to blocks and Gutenberg plugins is highly encouraged!**

Discover how [Meta Box](../../../docs/designers-developers/developers/backwards-compatibility/meta-box.md) support works in Gutenberg.
Discover how [Meta Box](../../../docs/designers-developers/developers/backward-compatibility/meta-box.md) support works in Gutenberg.

## Theme Support

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Backward Compatibility
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Deprecations

Gutenberg's deprecation policy is intended to support backwards-compatibility for releases, when possible. The current deprecations are listed below and are grouped by _the version at which they will be removed completely_. If your plugin depends on these behaviors, you must update to the recommended alternative before the noted version.
Gutenberg's deprecation policy is intended to support backward compatibility for releases, when possible. The current deprecations are listed below and are grouped by _the version at which they will be removed completely_. If your plugin depends on these behaviors, you must update to the recommended alternative before the noted version.

## 4.5.0
- `Dropdown.refresh()` has been deprecated as the contained `Popover` is now automatically refreshed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ WordPress will fall back to the Classic editor, where the meta box will continue

Explicitly setting `__block_editor_compatible_meta_box` to `true` will cause WordPress to stay in Gutenberg (assuming another meta box doesn't cause a fallback).

After a meta box is converted to a block, it can be declared as existing for backwards compatibility:
After a meta box is converted to a block, it can be declared as existing for backward compatibility:

```php
add_meta_box( 'my-meta-box', 'My Meta Box', 'my_meta_box_callback',
Expand All @@ -32,7 +32,7 @@ add_meta_box( 'my-meta-box', 'My Meta Box', 'my_meta_box_callback',
);
```

When Gutenberg is used, this meta box will no longer be displayed in the meta box area, as it now only exists for backwards compatibility purposes. It will continue to display correctly in the Classic editor, should some other meta box cause a fallback.
When Gutenberg is used, this meta box will no longer be displayed in the meta box area, as it now only exists for backward compatibility purposes. It will continue to display correctly in the Classic editor, should some other meta box cause a fallback.

### Meta Box Data Collection

Expand All @@ -42,7 +42,7 @@ See `lib/register.php gutenberg_trick_plugins_into_registering_meta_boxes()`

`gutenberg_collect_meta_box_data()` is hooked in later on `admin_head`. It will run through the functions and hooks that `post.php` runs to register meta boxes; namely `add_meta_boxes`, `add_meta_boxes_{$post->post_type}`, and `do_meta_boxes`.

A copy of the global `$wp_meta_boxes` is made then filtered through `apply_filters( 'filter_gutenberg_meta_boxes', $_meta_boxes_copy );`, which will strip out any core meta boxes, standard custom taxonomy meta boxes, and any meta boxes that have declared themselves as only existing for backwards compatibility purposes.
A copy of the global `$wp_meta_boxes` is made then filtered through `apply_filters( 'filter_gutenberg_meta_boxes', $_meta_boxes_copy );`, which will strip out any core meta boxes, standard custom taxonomy meta boxes, and any meta boxes that have declared themselves as only existing for backward compatibility purposes.

Then each location for this particular type of meta box is checked for whether it is active. If it is not empty a value of true is stored, if it is empty a value of false is stored. This meta box location data is then dispatched by the editor Redux store in `INITIALIZE_META_BOX_STATE`.

Expand Down

This file was deleted.

14 changes: 7 additions & 7 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,22 +132,22 @@
"parent": "themes"
},
{
"title": "Backwards Compatibility",
"slug": "backwards-compatibility",
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/backwards-compatibility/README.md",
"title": "Backward Compatibility",
"slug": "backward-compatibility",
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/backward-compatibility/README.md",
"parent": "developers"
},
{
"title": "Deprecations",
"slug": "deprecations",
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/backwards-compatibility/deprecations.md",
"parent": "backwards-compatibility"
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/backward-compatibility/deprecations.md",
"parent": "backward-compatibility"
},
{
"title": "Meta Boxes",
"slug": "meta-box",
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/backwards-compatibility/meta-box.md",
"parent": "backwards-compatibility"
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/backward-compatibility/meta-box.md",
"parent": "backward-compatibility"
},
{
"title": "Tutorials",
Expand Down
6 changes: 3 additions & 3 deletions docs/toc.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
{"docs/designers-developers/developers/themes/README.md": [
{"docs/designers-developers/developers/themes/theme-support.md": []}
]},
{"docs/designers-developers/developers/backwards-compatibility/README.md": [
{"docs/designers-developers/developers/backwards-compatibility/deprecations.md": []},
{"docs/designers-developers/developers/backwards-compatibility/meta-box.md": []}
{"docs/designers-developers/developers/backward-compatibility/README.md": [
{"docs/designers-developers/developers/backward-compatibility/deprecations.md": []},
{"docs/designers-developers/developers/backward-compatibility/meta-box.md": []}
]},
{"docs/designers-developers/developers/tutorials/readme.md": [
{"docs/designers-developers/developers/tutorials/block-tutorial/readme.md" :[
Expand Down
2 changes: 1 addition & 1 deletion lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ function gutenberg_register_scripts_and_styles() {
wp_add_inline_script( 'wp-block-library', $script, 'before' );

// Editor Styles.
// This empty stylesheet is defined to ensure backwards compatibility.
// This empty stylesheet is defined to ensure backward compatibility.
gutenberg_override_style( 'wp-blocks', false );
$fonts_url = '';

Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/server-side-render/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

ServerSideRender is a component used for server-side rendering a preview of dynamic blocks to display in the editor. Server-side rendering in a block's `edit` function should be limited to blocks that are heavily dependent on existing PHP rendering logic that is heavily intertwined with data, particularly when there are no endpoints available.

ServerSideRender may also be used when a legacy block is provided as a backwards compatibility measure, rather than needing to re-write the deprecated code that the block may depend on.
ServerSideRender may also be used when a legacy block is provided as a backward compatibility measure, rather than needing to re-write the deprecated code that the block may depend on.

ServerSideRender should be regarded as a fallback or legacy mechanism, it is not appropriate for developing new features against.

Expand All @@ -20,7 +20,7 @@ const MyServerSideRender = () => (
block="core/archives"
attributes={ {
showPostCounts: true,
displayAsDropdown: false,
displayAsDropdown: false,
} }
/>
);
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-post/src/store/effects.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const effects = {

const state = store.getState();

// Additional data needed for backwards compatibility.
// Additional data needed for backward compatibility.
// If we do not provide this data, the post will be overridden with the default values.
const post = select( 'core/editor' ).getCurrentPost( state );
const additionalData = [
Expand Down

0 comments on commit 0142e00

Please sign in to comment.