| @@ -116,11 +116,15 @@ | ||
| 116 | 116 | |
| 117 | 117 | $row++; |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | + // When the whole object is absent Gutenberg supplies the block | |
| 121 | + // schema's complete default. Starting from an empty array here would | |
| 122 | + // create a partial object just to add row/column counts and would | |
| 123 | + // silently lose nested defaults such as search.placeholder. | |
| 120 | 124 | $table = isset($attrs['table']) && is_array($attrs['table']) |
| 121 | 125 | ? $attrs['table'] |
| 122 | - : []; | |
| 126 | + : TableAttrs::get_table_defaults(); | |
| 123 | 127 | $table['rows'] = $row; |
| 124 | 128 | $table['cols'] = $colsCount; |
| 125 | 129 | |
| 126 | 130 | $adapted = $attrs; |