Skip to content
Open
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
6 changes: 2 additions & 4 deletions src/blocks/post-carousel/post-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ import { PlainText } from '@wordpress/block-editor';
import { RawHTML } from '@wordpress/element';
import { escapeHTML } from '@wordpress/escape-html';
import { withSelect } from '@wordpress/data';
// Disable reason: We choose to use unsafe APIs in our codebase.
// eslint-disable-next-line @wordpress/no-unsafe-wp-apis
import { __experimentalGetSettings, dateI18n, format } from '@wordpress/date';
import { dateI18n, format, getSettings } from '@wordpress/date';

const PostItem = ( {
post,
Expand Down Expand Up @@ -45,7 +43,7 @@ const PostItem = ( {
excerptElement.innerHTML = excerpt;
excerpt = excerptElement.textContent || excerptElement.innerText || '';

const dateFormat = __experimentalGetSettings().formats.date; // eslint-disable-line no-restricted-syntax
const dateFormat = getSettings().formats.date;

return (
<div className="wp-block-coblocks-post-carousel__item">
Expand Down
6 changes: 2 additions & 4 deletions src/blocks/posts/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ import { compose, usePrevious } from '@wordpress/compose';
import { lazy, RawHTML, useState, useEffect, useRef } from '@wordpress/element';
import { escapeHTML } from '@wordpress/escape-html';
import { addQueryArgs } from '@wordpress/url';
// Disable reason: We choose to use unsafe APIs in our codebase.
// eslint-disable-next-line @wordpress/no-unsafe-wp-apis
import { dateI18n, format, __experimentalGetSettings } from '@wordpress/date';
import { dateI18n, format, getSettings } from '@wordpress/date';
import { withSelect } from '@wordpress/data';
import { BlockControls, RichText } from '@wordpress/block-editor';
import {
Expand Down Expand Up @@ -224,7 +222,7 @@ const PostsEdit = ( props ) => {
onClick: () => setAttributes( { listPosition: 'right' } ),
} ];

const dateFormat = __experimentalGetSettings().formats.date; // eslint-disable-line no-restricted-syntax
const dateFormat = getSettings().formats.date;

const updateStyle = ( style ) => {
const newActiveStyle = getActiveStyle( styleOptions, className );
Expand Down