diff --git a/blocks/query/block.json b/blocks/query/block.json index 94a577bd..8080ee99 100644 --- a/blocks/query/block.json +++ b/blocks/query/block.json @@ -31,10 +31,6 @@ ], "type": "string" }, - "maxNumberOfPosts": { - "default": 10, - "type": "number" - }, "minNumberOfPosts": { "default": 1, "type": "number" diff --git a/blocks/query/edit.tsx b/blocks/query/edit.tsx index 08439766..dcdba75e 100644 --- a/blocks/query/edit.tsx +++ b/blocks/query/edit.tsx @@ -47,6 +47,7 @@ interface Window { allowedPostTypes: Array; allowedTaxonomies: Array; parselyAvailable: string, + maxPosts: number, }; } @@ -62,7 +63,6 @@ export default function Edit({ attributes: { backfillPosts = [], deduplication = 'inherit', - maxNumberOfPosts = 10, minNumberOfPosts = 1, numberOfPosts = 5, offset = 0, @@ -82,6 +82,7 @@ export default function Edit({ allowedPostTypes = [], allowedTaxonomies = [], parselyAvailable = 'false', + maxPosts = 10, } = {}, } = (window as any as Window); @@ -326,14 +327,14 @@ export default function Edit({ title={__('Setup', 'wp-curate')} initialOpen > - {minNumberOfPosts !== undefined && minNumberOfPosts !== maxNumberOfPosts ? ( + {minNumberOfPosts !== undefined && minNumberOfPosts !== maxPosts ? ( ) : null} $allowed_post_types, 'allowedTaxonomies' => $allowed_taxonomies, 'parselyAvailable' => $parsely_available ? 'true' : 'false', + 'maxPosts' => $max_posts, ] ); } diff --git a/blocks/query/types.ts b/blocks/query/types.ts index 947fde22..a442b45f 100644 --- a/blocks/query/types.ts +++ b/blocks/query/types.ts @@ -2,7 +2,6 @@ interface EditProps { attributes: { backfillPosts?: number[]; deduplication?: string; - maxNumberOfPosts?: number; minNumberOfPosts?: number; numberOfPosts?: number; offset?: number;