From 09764c0adb0d23e332f9d91d3dca01fff3dd4fab Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Wed, 10 Jul 2024 15:14:45 +0200 Subject: [PATCH] Query Loop: Change default query loop variations --- .../block-library/src/query/variations.js | 24 ++++--------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/packages/block-library/src/query/variations.js b/packages/block-library/src/query/variations.js index 1970d9947916b5..8160d3e20891cd 100644 --- a/packages/block-library/src/query/variations.js +++ b/packages/block-library/src/query/variations.js @@ -14,22 +14,6 @@ import { imageDateTitle, } from './icons'; -const QUERY_DEFAULT_ATTRIBUTES = { - query: { - perPage: 3, - pages: 0, - offset: 0, - postType: 'post', - order: 'desc', - orderBy: 'date', - author: '', - search: '', - exclude: [], - sticky: '', - inherit: false, - }, -}; - const variations = [ { name: 'posts-list', @@ -60,7 +44,7 @@ const variations = [ name: 'title-date', title: __( 'Title & Date' ), icon: titleDate, - attributes: { ...QUERY_DEFAULT_ATTRIBUTES }, + attributes: {}, innerBlocks: [ [ 'core/post-template', @@ -76,7 +60,7 @@ const variations = [ name: 'title-excerpt', title: __( 'Title & Excerpt' ), icon: titleExcerpt, - attributes: { ...QUERY_DEFAULT_ATTRIBUTES }, + attributes: {}, innerBlocks: [ [ 'core/post-template', @@ -92,7 +76,7 @@ const variations = [ name: 'title-date-excerpt', title: __( 'Title, Date, & Excerpt' ), icon: titleDateExcerpt, - attributes: { ...QUERY_DEFAULT_ATTRIBUTES }, + attributes: {}, innerBlocks: [ [ 'core/post-template', @@ -112,7 +96,7 @@ const variations = [ name: 'image-date-title', title: __( 'Image, Date, & Title' ), icon: imageDateTitle, - attributes: { ...QUERY_DEFAULT_ATTRIBUTES }, + attributes: {}, innerBlocks: [ [ 'core/post-template',