Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REST API: Assign default for block renderer attributes
Previously we would pass `NULL` to `render`. While `render` provides a default `array()` value, since an explicit value is provided, it would not take effect. With this change, the endpoint assures a default value to be provided as a parameter to get the `get_item` callback that is compatible with the function signature of `WP_BlockType::render`. Alternatively, it could be considered to have separate invocations of `render`, depending on whether the request parameter is set.
- Loading branch information