Skip to content

Commit

Permalink
Query Loop: Change default query loop variations
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Jul 10, 2024
1 parent 28e9e41 commit 09764c0
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions packages/block-library/src/query/variations.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -60,7 +44,7 @@ const variations = [
name: 'title-date',
title: __( 'Title & Date' ),
icon: titleDate,
attributes: { ...QUERY_DEFAULT_ATTRIBUTES },
attributes: {},
innerBlocks: [
[
'core/post-template',
Expand All @@ -76,7 +60,7 @@ const variations = [
name: 'title-excerpt',
title: __( 'Title & Excerpt' ),
icon: titleExcerpt,
attributes: { ...QUERY_DEFAULT_ATTRIBUTES },
attributes: {},
innerBlocks: [
[
'core/post-template',
Expand All @@ -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',
Expand All @@ -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',
Expand Down

0 comments on commit 09764c0

Please sign in to comment.