Skip to content

Commit

Permalink
Rely on default ordering options for posts for now
Browse files Browse the repository at this point in the history
  • Loading branch information
kasparsd committed Mar 3, 2025
1 parent 233b9d8 commit 59c632d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/block-library/src/latest-posts/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ import {
DEFAULT_EXCERPT_LENGTH,
} from './constants';
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
import { useOrderByOptions } from '../query/utils';

/**
* Module Constants
Expand Down Expand Up @@ -161,8 +160,6 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
]
);

const orderByOptions = useOrderByOptions( 'post' );

// If a user clicks to a link prevent redirection and show a warning.
const { createWarningNotice } = useDispatch( noticeStore );
const showRedirectionPreventedNotice = ( event ) => {
Expand Down Expand Up @@ -450,7 +447,7 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {

<PanelBody title={ __( 'Sorting and filtering' ) }>
<QueryControls
{ ...{ order, orderBy, orderByOptions } }
{ ...{ order, orderBy } }
numberOfItems={ postsToShow }
onOrderChange={ ( value ) =>
setAttributes( { order: value } )
Expand Down

0 comments on commit 59c632d

Please sign in to comment.