diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index e0d40a35d1216..11d6e28151474 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -429,7 +429,7 @@ Display a list of all pages. ([Source](https://github.com/WordPress/gutenberg/tr - **Name:** core/page-list - **Category:** widgets - **Supports:** ~~html~~, ~~reusable~~ -- **Attributes:** __unstableMaxPages +- **Attributes:** ## Paragraph diff --git a/packages/block-library/src/navigation/index.php b/packages/block-library/src/navigation/index.php index 5173f96040b4d..33e1ebdbab56d 100644 --- a/packages/block-library/src/navigation/index.php +++ b/packages/block-library/src/navigation/index.php @@ -307,9 +307,6 @@ function block_core_navigation_get_fallback_blocks() { $page_list_fallback = array( array( 'blockName' => 'core/page-list', - 'attrs' => array( - '__unstableMaxPages' => 4, - ), ), ); diff --git a/packages/block-library/src/page-list/block.json b/packages/block-library/src/page-list/block.json index 89309cad22b04..3068a1fb8bc00 100644 --- a/packages/block-library/src/page-list/block.json +++ b/packages/block-library/src/page-list/block.json @@ -7,11 +7,7 @@ "description": "Display a list of all pages.", "keywords": [ "menu", "navigation" ], "textdomain": "default", - "attributes": { - "__unstableMaxPages": { - "type": "number" - } - }, + "attributes": {}, "usesContext": [ "textColor", "customTextColor", diff --git a/packages/block-library/src/page-list/index.php b/packages/block-library/src/page-list/index.php index fbb83a1fd9407..ceffd4730a32d 100644 --- a/packages/block-library/src/page-list/index.php +++ b/packages/block-library/src/page-list/index.php @@ -299,11 +299,6 @@ function render_block_core_page_list( $attributes, $content, $block ) { $nested_pages = block_core_page_list_nest_pages( $top_level_pages, $pages_with_children ); - // Limit the number of items to be visually displayed. - if ( ! empty( $attributes['__unstableMaxPages'] ) ) { - $nested_pages = array_slice( $nested_pages, 0, $attributes['__unstableMaxPages'] ); - } - $is_navigation_child = array_key_exists( 'showSubmenuIcon', $block->context ); $open_submenus_on_click = array_key_exists( 'openSubmenusOnClick', $block->context ) ? $block->context['openSubmenusOnClick'] : false;