Skip to content

Commit

Permalink
make getTemplateInfo private
Browse files Browse the repository at this point in the history
  • Loading branch information
gigitux committed Nov 25, 2024
1 parent e395bf6 commit 1f47713
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 16 deletions.
11 changes: 0 additions & 11 deletions packages/editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -439,17 +439,6 @@ getDerivedStateFromError is used to render a fallback UI after an error has been

> **Deprecated** since 5.3, use `wp.blockEditor.getFontSizeClass` instead.
### getTemplateInfo

Helper function to retrieve the corresponding template info for a given template.

_Parameters_

- _params_ `Object`:
- _params.templateTypes_ `Array`:
- _params.templateAreas_ `Array`:
- _params.template_ `Object`:

### getTemplatePartIcon

Helper function to retrieve the corresponding icon by name.
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/components/document-bar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { decodeEntities } from '@wordpress/html-entities';
import { TEMPLATE_POST_TYPES } from '../../store/constants';
import { store as editorStore } from '../../store';
import usePageTypeBadge from '../../utils/pageTypeBadge';
import { getTemplateInfo } from '../../utils';
import { getTemplateInfo } from '../../utils/get-template-info';

/** @typedef {import("@wordpress/components").IconType} IconType */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { decodeEntities } from '@wordpress/html-entities';
*/
import { store as editorStore } from '../../store';
import { unlock } from '../../lock-unlock';
import { getTemplateInfo } from '../../utils';
import { getTemplateInfo } from '../../utils/get-template-info';

export default function EntityRecordItem( { record, checked, onChange } ) {
const { name, kind, title, key } = record;
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/components/post-card-panel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
import { unlock } from '../../lock-unlock';
import PostActions from '../post-actions';
import usePageTypeBadge from '../../utils/pageTypeBadge';
import { getTemplateInfo } from '../../utils';
import { getTemplateInfo } from '../../utils/get-template-info';

export default function PostCardPanel( {
postType,
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/private-apis.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
GlobalStylesProvider,
} from './components/global-styles-provider';
import { registerCoreBlockBindingsSources } from './bindings/api';
import { getTemplateInfo } from './utils';
import { getTemplateInfo } from './utils/get-template-info';

const { store: interfaceStore, ...remainingInterfaceApis } = interfaceApis;

Expand Down
1 change: 0 additions & 1 deletion packages/editor/src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ import mediaUpload from './media-upload';
export { mediaUpload };
export { cleanForSlug } from './url.js';
export { getTemplatePartIcon } from './get-template-part-icon';
export { getTemplateInfo } from './get-template-info';

0 comments on commit 1f47713

Please sign in to comment.