Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Deprecated Features planned for removal in 2.4 #5398

Merged
merged 3 commits into from
Mar 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions blocks/block-description/index.js

This file was deleted.

13 changes: 0 additions & 13 deletions blocks/block-description/style.scss

This file was deleted.

23 changes: 0 additions & 23 deletions blocks/block-description/test/index.js

This file was deleted.

1 change: 0 additions & 1 deletion blocks/hooks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ import './custom-class-name';
import './deprecated';
import './generated-class-name';
import './layout';
import './matchers';
102 changes: 0 additions & 102 deletions blocks/hooks/matchers.js

This file was deleted.

6 changes: 0 additions & 6 deletions blocks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export { registerCoreBlocks } from './library';
export { default as AlignmentToolbar } from './alignment-toolbar';
export { default as BlockAlignmentToolbar } from './block-alignment-toolbar';
export { default as BlockControls } from './block-controls';
export { default as BlockDescription } from './block-description';
export { default as BlockEdit } from './block-edit';
export { default as BlockIcon } from './block-icon';
export { default as ColorPalette } from './color-palette';
Expand All @@ -27,12 +26,7 @@ export { default as InnerBlocks } from './inner-blocks';
export { default as InspectorControls } from './inspector-controls';
export { default as PlainText } from './plain-text';
export { default as MediaUpload } from './media-upload';
export { default as MediaUploadButton } from './media-upload/button';
export { default as RichText } from './rich-text';
export { default as RichTextProvider } from './rich-text/provider';
export { default as UrlInput } from './url-input';
export { default as UrlInputButton } from './url-input/button';

// Deprecated matchers
import { attr, prop, text, html, query, node, children } from './hooks/matchers';
export const source = { attr, prop, text, html, query, node, children };
54 changes: 1 addition & 53 deletions blocks/inspector-controls/index.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,7 @@
/**
* External dependencies
*/
import { forEach } from 'lodash';

/**
* WordPress dependencies
*/
import {
BaseControl,
CheckboxControl,
Fill,
RadioControl,
RangeControl,
SelectControl,
TextControl,
TextareaControl,
ToggleControl,
} from '@wordpress/components';
import { Component } from '@wordpress/element';
import { deprecated } from '@wordpress/utils';
import { Fill } from '@wordpress/components';

export default function InspectorControls( { children } ) {
return (
Expand All @@ -27,38 +10,3 @@ export default function InspectorControls( { children } ) {
</Fill>
);
}

const withDeprecation = ( componentName ) => ( OriginalComponent ) => {
class WrappedComponent extends Component {
componentDidMount() {
deprecated( `wp.blocks.InspectorControls.${ componentName }`, {
version: '2.4',
alternative: `wp.components.${ componentName }`,
plugin: 'Gutenberg',
} );
}

render() {
return (
<OriginalComponent { ...this.props } />
);
}
}
return WrappedComponent;
};

forEach(
{
BaseControl,
CheckboxControl,
RadioControl,
RangeControl,
SelectControl,
TextControl,
TextareaControl,
ToggleControl,
},
( component, componentName ) => {
InspectorControls[ componentName ] = withDeprecation( componentName )( component );
}
);
45 changes: 0 additions & 45 deletions blocks/media-upload/button.js

This file was deleted.

10 changes: 0 additions & 10 deletions data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,6 @@ export const subscribe = ( listener ) => {
* @return {*} The selector's returned value.
*/
export function select( reducerKey ) {
if ( arguments.length > 1 ) {
deprecated( 'Calling select with multiple arguments', {
version: '2.4',
plugin: 'Gutenberg',
} );

const [ , selectorKey, ...args ] = arguments;
return select( reducerKey )[ selectorKey ]( ...args );
}

return selectors[ reducerKey ];
}

Expand Down
Loading